gspec 1.6.0 → 1.10.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 +4 -7
- package/bin/gspec.js +275 -8
- package/commands/gspec.analyze.md +2 -4
- package/commands/gspec.architect.md +2 -3
- package/commands/gspec.feature.md +37 -7
- package/commands/gspec.implement.md +14 -19
- package/commands/gspec.migrate.md +1 -2
- package/commands/gspec.practices.md +3 -1
- package/commands/gspec.research.md +1 -1
- package/commands/gspec.stack.md +11 -6
- package/commands/gspec.style.md +18 -23
- package/dist/antigravity/gspec-analyze/SKILL.md +2 -4
- package/dist/antigravity/gspec-architect/SKILL.md +3 -4
- package/dist/antigravity/gspec-feature/SKILL.md +39 -9
- package/dist/antigravity/gspec-implement/SKILL.md +15 -20
- package/dist/antigravity/gspec-migrate/SKILL.md +6 -7
- package/dist/antigravity/gspec-practices/SKILL.md +4 -2
- package/dist/antigravity/gspec-profile/SKILL.md +1 -1
- package/dist/antigravity/gspec-research/SKILL.md +4 -4
- package/dist/antigravity/gspec-stack/SKILL.md +12 -7
- package/dist/antigravity/gspec-style/SKILL.md +19 -24
- package/dist/claude/gspec-analyze/SKILL.md +2 -4
- package/dist/claude/gspec-architect/SKILL.md +3 -4
- package/dist/claude/gspec-feature/SKILL.md +39 -9
- package/dist/claude/gspec-implement/SKILL.md +15 -20
- package/dist/claude/gspec-migrate/SKILL.md +6 -7
- package/dist/claude/gspec-practices/SKILL.md +4 -2
- package/dist/claude/gspec-profile/SKILL.md +1 -1
- package/dist/claude/gspec-research/SKILL.md +4 -4
- package/dist/claude/gspec-stack/SKILL.md +12 -7
- package/dist/claude/gspec-style/SKILL.md +19 -24
- package/dist/codex/gspec-analyze/SKILL.md +2 -4
- package/dist/codex/gspec-architect/SKILL.md +3 -4
- package/dist/codex/gspec-feature/SKILL.md +39 -9
- package/dist/codex/gspec-implement/SKILL.md +15 -20
- package/dist/codex/gspec-migrate/SKILL.md +6 -7
- package/dist/codex/gspec-practices/SKILL.md +4 -2
- package/dist/codex/gspec-profile/SKILL.md +1 -1
- package/dist/codex/gspec-research/SKILL.md +4 -4
- package/dist/codex/gspec-stack/SKILL.md +12 -7
- package/dist/codex/gspec-style/SKILL.md +19 -24
- package/dist/cursor/gspec-analyze.mdc +2 -4
- package/dist/cursor/gspec-architect.mdc +3 -4
- package/dist/cursor/gspec-feature.mdc +39 -9
- package/dist/cursor/gspec-implement.mdc +15 -20
- package/dist/cursor/gspec-migrate.mdc +6 -7
- package/dist/cursor/gspec-practices.mdc +4 -2
- package/dist/cursor/gspec-profile.mdc +1 -1
- package/dist/cursor/gspec-research.mdc +4 -4
- package/dist/cursor/gspec-stack.mdc +12 -7
- package/dist/cursor/gspec-style.mdc +19 -24
- package/dist/opencode/gspec-analyze/SKILL.md +168 -0
- package/dist/opencode/gspec-architect/SKILL.md +361 -0
- package/dist/opencode/gspec-feature/SKILL.md +204 -0
- package/dist/opencode/gspec-implement/SKILL.md +200 -0
- package/dist/opencode/gspec-migrate/SKILL.md +118 -0
- package/dist/opencode/gspec-practices/SKILL.md +137 -0
- package/dist/opencode/gspec-profile/SKILL.md +221 -0
- package/dist/opencode/gspec-research/SKILL.md +302 -0
- package/dist/opencode/gspec-stack/SKILL.md +305 -0
- package/dist/opencode/gspec-style/SKILL.md +224 -0
- package/package.json +3 -1
- package/starters/features/about-page.md +98 -0
- package/starters/features/contact-form.md +147 -0
- package/starters/features/contact-page.md +103 -0
- package/starters/features/home-page.md +103 -0
- package/starters/features/responsive-navbar.md +113 -0
- package/starters/features/services-page.md +103 -0
- package/starters/features/site-footer.md +121 -0
- package/starters/features/theme-switcher.md +124 -0
- package/starters/practices/tdd-pipeline-first.md +192 -0
- package/starters/stacks/astro-tailwind-github-pages.md +283 -0
- package/starters/stacks/nextjs-supabase-vercel.md +319 -0
- package/starters/stacks/nextjs-vercel-typescript.md +264 -0
- package/starters/styles/clean-professional.md +316 -0
- package/starters/styles/dark-minimal-developer.md +442 -0
- package/templates/spec-sync.md +2 -2
- package/commands/gspec.epic.md +0 -228
- package/dist/antigravity/gspec-epic/SKILL.md +0 -232
- package/dist/claude/gspec-epic/SKILL.md +0 -233
- package/dist/codex/gspec-epic/SKILL.md +0 -232
- package/dist/cursor/gspec-epic.mdc +0 -231
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gspec-style
|
|
3
|
+
description: Generate a visual style guide with design tokens, color palette, and component patterns
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a senior UI/UX Designer and Design Systems Architect at a high-performing software company.
|
|
7
|
+
|
|
8
|
+
Your task is to take the provided application description (which may be vague or detailed) and produce a **Visual Style Guide** that clearly defines the visual design language, UI patterns, and design system for the application. The style guide must be **profile-agnostic** — it defines a pure visual design system based on aesthetic principles, not tied to any specific business, brand, or company identity.
|
|
9
|
+
|
|
10
|
+
You should:
|
|
11
|
+
- Create a cohesive and modern visual design system
|
|
12
|
+
- Define reusable design tokens and patterns
|
|
13
|
+
- Focus on accessibility, consistency, and user experience
|
|
14
|
+
- Choose colors based on aesthetic harmony, readability, and functional purpose — NOT brand association
|
|
15
|
+
- Ask clarifying questions when essential information is missing rather than guessing
|
|
16
|
+
- When asking questions, offer 2-3 specific suggestions to guide the discussion
|
|
17
|
+
- Provide clear guidance for designers and developers
|
|
18
|
+
- Be comprehensive yet practical
|
|
19
|
+
- **Never reference or derive styles from a company name, logo, brand identity, or business profile**
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Output Rules
|
|
24
|
+
|
|
25
|
+
- Output **ONLY** a single Markdown document
|
|
26
|
+
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
27
|
+
- Begin the file with YAML frontmatter containing the gspec version:
|
|
28
|
+
```
|
|
29
|
+
---
|
|
30
|
+
gspec-version: 1.10.0
|
|
31
|
+
---
|
|
32
|
+
```
|
|
33
|
+
The frontmatter must be the very first content in the file, before the main heading.
|
|
34
|
+
- **Before generating the document**, ask clarifying questions if:
|
|
35
|
+
- The desired visual mood or aesthetic direction is unclear (e.g., minimal, bold, warm, technical)
|
|
36
|
+
- The target platforms are unspecified
|
|
37
|
+
- Dark mode / theme requirements are unknown
|
|
38
|
+
- The application category or domain is unclear (affects functional color choices)
|
|
39
|
+
- **When asking questions**, offer 2-3 specific suggestions to guide the discussion
|
|
40
|
+
- **The style guide must not include profile details** — you CAN derive colors, typography, or visual identity from any business name, logo, and brand if prompted to do so, however it should NOT include details of the business including company name, business offerings, etc. Base all design decisions on aesthetic principles, usability, and the functional needs of the application category
|
|
41
|
+
- Include visual descriptions and specifications
|
|
42
|
+
- Use color codes (hex, RGB, HSL) for all colors
|
|
43
|
+
- Specify exact font families, weights, and sizes
|
|
44
|
+
- Include spacing scales and measurement systems
|
|
45
|
+
- Provide examples where helpful
|
|
46
|
+
- **Mark sections as "Not Applicable"** when they don't apply to this application
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Required Sections
|
|
51
|
+
|
|
52
|
+
### 1. Overview
|
|
53
|
+
- Design vision statement
|
|
54
|
+
- Target platforms (web, mobile, desktop)
|
|
55
|
+
- Visual personality (e.g., clean & minimal, bold & expressive, warm & approachable, technical & precise)
|
|
56
|
+
- Design rationale — why this aesthetic fits the application category and its users
|
|
57
|
+
|
|
58
|
+
### 2. Color Palette
|
|
59
|
+
|
|
60
|
+
#### Primary Colors
|
|
61
|
+
- Main accent and action colors with hex codes
|
|
62
|
+
- Selection rationale (aesthetic harmony, readability, functional purpose)
|
|
63
|
+
- Usage guidelines for each
|
|
64
|
+
|
|
65
|
+
#### Secondary Colors
|
|
66
|
+
- Supporting and complementary colors
|
|
67
|
+
- When and how to use them
|
|
68
|
+
|
|
69
|
+
#### Neutral Colors
|
|
70
|
+
- Grays and backgrounds
|
|
71
|
+
- Text colors for different contexts
|
|
72
|
+
|
|
73
|
+
#### Semantic Colors
|
|
74
|
+
- Success, warning, error, info states
|
|
75
|
+
- Accessibility contrast ratios
|
|
76
|
+
|
|
77
|
+
### 3. Typography
|
|
78
|
+
|
|
79
|
+
#### Font Families
|
|
80
|
+
- Primary font (headings)
|
|
81
|
+
- Secondary font (body text)
|
|
82
|
+
- Monospace font (code, if applicable)
|
|
83
|
+
- Font sources (Google Fonts, custom, etc.)
|
|
84
|
+
|
|
85
|
+
#### Type Scale
|
|
86
|
+
- Heading levels (H1-H6) with sizes and weights
|
|
87
|
+
- Body text sizes (large, regular, small)
|
|
88
|
+
- Line heights and letter spacing
|
|
89
|
+
- Responsive scaling guidelines
|
|
90
|
+
|
|
91
|
+
### 4. Spacing & Layout
|
|
92
|
+
|
|
93
|
+
#### Spacing Scale
|
|
94
|
+
- Base unit (e.g., 4px, 8px)
|
|
95
|
+
- Spacing values (xs, sm, md, lg, xl, etc.)
|
|
96
|
+
- Margin and padding conventions
|
|
97
|
+
|
|
98
|
+
#### Grid System
|
|
99
|
+
- Column structure
|
|
100
|
+
- Breakpoints for responsive design
|
|
101
|
+
- Container max-widths
|
|
102
|
+
|
|
103
|
+
#### Layout Patterns
|
|
104
|
+
- Common layout structures
|
|
105
|
+
- Component spacing rules
|
|
106
|
+
|
|
107
|
+
### 5. Themes
|
|
108
|
+
|
|
109
|
+
#### Light Mode
|
|
110
|
+
- Background, surface, and text colors
|
|
111
|
+
- Component color adjustments
|
|
112
|
+
|
|
113
|
+
#### Dark Mode
|
|
114
|
+
- Background, surface, and text colors
|
|
115
|
+
- Component color adjustments
|
|
116
|
+
- Contrast considerations
|
|
117
|
+
|
|
118
|
+
### 6. Component Styling
|
|
119
|
+
|
|
120
|
+
> **Focus on visual styling only** — colors, borders, typography, spacing, and state appearances. Do NOT define component structure, layout behavior, or interaction patterns (those belong in feature PRDs). The goal is to answer "what does it look like?" not "how does it work?"
|
|
121
|
+
|
|
122
|
+
#### Buttons
|
|
123
|
+
- Color treatments for primary, secondary, ghost variants
|
|
124
|
+
- States: default, hover, active, disabled appearances
|
|
125
|
+
- Sizes and border radius
|
|
126
|
+
|
|
127
|
+
#### Form Elements
|
|
128
|
+
- Input field colors, borders, and focus ring styles
|
|
129
|
+
- Label and helper text typography
|
|
130
|
+
- Validation state colors (error, success)
|
|
131
|
+
|
|
132
|
+
#### Cards & Containers
|
|
133
|
+
- Background colors and border styles
|
|
134
|
+
- Shadow elevations and corner radius
|
|
135
|
+
|
|
136
|
+
#### Navigation Elements
|
|
137
|
+
- Link colors: default, hover, active states
|
|
138
|
+
- Background treatments for navigation surfaces
|
|
139
|
+
|
|
140
|
+
### 7. Visual Effects
|
|
141
|
+
|
|
142
|
+
#### Shadows & Elevation
|
|
143
|
+
- Shadow levels (0-5 or similar)
|
|
144
|
+
- When to use each level
|
|
145
|
+
|
|
146
|
+
#### Border Radius
|
|
147
|
+
- Standard radius values
|
|
148
|
+
- Usage guidelines
|
|
149
|
+
|
|
150
|
+
#### Transitions & Animations
|
|
151
|
+
- Duration standards (fast, medium, slow)
|
|
152
|
+
- Easing functions
|
|
153
|
+
- Animation principles
|
|
154
|
+
- Loading states, skeleton screens, page transitions
|
|
155
|
+
|
|
156
|
+
### 8. Iconography
|
|
157
|
+
|
|
158
|
+
> **The style guide is the single authority for icon library choices.** The stack document defines the CSS framework and component library (e.g., shadcn/ui); the style guide defines which icon set is used. This separation ensures icon decisions are driven by design rationale (visual consistency, stroke style) while component library decisions remain with the technology stack (framework compatibility).
|
|
159
|
+
|
|
160
|
+
#### Icon Library
|
|
161
|
+
- Specific icon library recommendation with rationale
|
|
162
|
+
- Outlined vs filled style
|
|
163
|
+
- Stroke width
|
|
164
|
+
- Size standards
|
|
165
|
+
|
|
166
|
+
#### Usage Guidelines
|
|
167
|
+
- When to use icons
|
|
168
|
+
- Icon-text spacing
|
|
169
|
+
|
|
170
|
+
### 9. Imagery & Media
|
|
171
|
+
|
|
172
|
+
#### Photography Style
|
|
173
|
+
- Image treatment guidelines
|
|
174
|
+
- Aspect ratios
|
|
175
|
+
- Placeholder patterns
|
|
176
|
+
|
|
177
|
+
#### Illustrations
|
|
178
|
+
- Style guidelines (if applicable)
|
|
179
|
+
- Color usage in illustrations
|
|
180
|
+
|
|
181
|
+
### 10. Accessibility
|
|
182
|
+
|
|
183
|
+
#### Contrast Requirements
|
|
184
|
+
- WCAG compliance level (AA or AAA)
|
|
185
|
+
- Minimum contrast ratios
|
|
186
|
+
|
|
187
|
+
#### Focus States
|
|
188
|
+
- Keyboard navigation indicators
|
|
189
|
+
- Focus ring styles
|
|
190
|
+
|
|
191
|
+
#### Text Accessibility
|
|
192
|
+
- Minimum font sizes
|
|
193
|
+
- Line length recommendations
|
|
194
|
+
|
|
195
|
+
### 11. Responsive Design
|
|
196
|
+
|
|
197
|
+
#### Breakpoints
|
|
198
|
+
- Mobile, tablet, desktop thresholds
|
|
199
|
+
- Scaling strategies
|
|
200
|
+
|
|
201
|
+
#### Mobile-Specific Patterns
|
|
202
|
+
- Touch target sizes
|
|
203
|
+
- Mobile navigation patterns
|
|
204
|
+
|
|
205
|
+
### 12. Usage Examples
|
|
206
|
+
|
|
207
|
+
#### Component Combinations
|
|
208
|
+
- Common UI patterns
|
|
209
|
+
- Page layout examples
|
|
210
|
+
- Do's and don'ts
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Tone & Style
|
|
215
|
+
|
|
216
|
+
- Clear, prescriptive, design-focused
|
|
217
|
+
- Visually descriptive
|
|
218
|
+
- Practical and implementable
|
|
219
|
+
- Designed for both designers and developers
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Input Application Description
|
|
224
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gspec",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Install gspec specification commands for Claude Code, Cursor, and other AI tools",
|
|
5
5
|
"main": "bin/gspec.js",
|
|
6
6
|
"type": "module",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"dist/",
|
|
13
13
|
"commands/",
|
|
14
14
|
"templates/",
|
|
15
|
+
"starters/",
|
|
15
16
|
"README.md"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
"build:cursor": "node scripts/build.js cursor",
|
|
21
22
|
"build:antigravity": "node scripts/build.js antigravity",
|
|
22
23
|
"build:codex": "node scripts/build.js codex",
|
|
24
|
+
"build:opencode": "node scripts/build.js opencode",
|
|
23
25
|
"prepublishOnly": "npm run build"
|
|
24
26
|
},
|
|
25
27
|
"author": "Baller Software",
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
gspec-version: 1.8.0
|
|
3
|
+
description: Company story, mission, team bios, and values section
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# About Page
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A static About page that tells the story of the business and communicates its mission. The page gives visitors a sense of who is behind the brand, why the business exists, and what it stands for — building trust and credibility beyond the service offerings presented on the home page.
|
|
11
|
+
|
|
12
|
+
## Users & Use Cases
|
|
13
|
+
|
|
14
|
+
**Primary users:** Prospective clients evaluating the business before making contact.
|
|
15
|
+
|
|
16
|
+
**Key use cases:**
|
|
17
|
+
|
|
18
|
+
1. A prospective client wants to understand the people and values behind the business before deciding to engage, so they visit the About page to assess credibility and alignment.
|
|
19
|
+
2. A referral wants to learn more about the company's background and story to confirm the recommendation they received.
|
|
20
|
+
3. A visitor who has reviewed the services offered navigates to the About page to understand the mission and philosophy that drives those services.
|
|
21
|
+
|
|
22
|
+
## Scope
|
|
23
|
+
|
|
24
|
+
**In scope:**
|
|
25
|
+
|
|
26
|
+
- Company story section explaining the background and origin of the business
|
|
27
|
+
- Mission or purpose statement section articulating why the business exists and what it stands for
|
|
28
|
+
- Responsive layout that works across desktop, tablet, and mobile devices
|
|
29
|
+
- Static content coded directly into the page
|
|
30
|
+
|
|
31
|
+
**Out of scope:**
|
|
32
|
+
|
|
33
|
+
- Team member bios, headshots, or leadership profiles
|
|
34
|
+
- Calls-to-action, contact forms, or conversion elements
|
|
35
|
+
- Company timeline or milestones visualization
|
|
36
|
+
- Client testimonials or social proof
|
|
37
|
+
- Dynamic or CMS-managed content
|
|
38
|
+
|
|
39
|
+
**Deferred ideas:**
|
|
40
|
+
|
|
41
|
+
- Team or leadership section with bios and photos
|
|
42
|
+
- Company values displayed as distinct visual cards or icons
|
|
43
|
+
- Historical timeline or key milestones section
|
|
44
|
+
- Awards, certifications, or accreditations display
|
|
45
|
+
|
|
46
|
+
## Capabilities
|
|
47
|
+
|
|
48
|
+
- [ ] **P0**: Company story section communicates the background and origin of the business
|
|
49
|
+
- Section includes a heading and one or more paragraphs of narrative text
|
|
50
|
+
- Content is readable and well-structured without feeling like a wall of text
|
|
51
|
+
- Section is visually distinct from the mission section
|
|
52
|
+
|
|
53
|
+
- [ ] **P0**: Mission or purpose statement section articulates why the business exists
|
|
54
|
+
- Mission statement is presented with visual emphasis (e.g., larger text, distinct styling) to differentiate it from the narrative story
|
|
55
|
+
- Statement is concise and scannable — ideally 1-3 sentences
|
|
56
|
+
- Section is visually separated from the company story section
|
|
57
|
+
|
|
58
|
+
- [ ] **P0**: Page is fully responsive across common device sizes
|
|
59
|
+
- Layout adapts cleanly to desktop (1024px+), tablet (768px), and mobile (375px) viewports
|
|
60
|
+
- No horizontal scrolling on any viewport
|
|
61
|
+
- Text remains readable at all sizes
|
|
62
|
+
|
|
63
|
+
- [ ] **P1**: Page structure supports scannability
|
|
64
|
+
- Clear visual hierarchy guides the visitor through the content in a logical order
|
|
65
|
+
- Sections are separated with adequate spacing to avoid a dense, text-heavy appearance
|
|
66
|
+
- Page can be skimmed in under 15 seconds to get the gist of the business
|
|
67
|
+
|
|
68
|
+
- [ ] **P2**: Semantic page structure supports accessibility
|
|
69
|
+
- Page uses proper heading hierarchy (single h1, logical h2/h3 nesting)
|
|
70
|
+
- Content is navigable via keyboard
|
|
71
|
+
- Sufficient color contrast for all text elements
|
|
72
|
+
|
|
73
|
+
## Dependencies
|
|
74
|
+
|
|
75
|
+
- **Home Page** ([home-page.md](home-page.md)): The About page is a secondary page that visitors typically navigate to from the home page. Navigation between pages should be consistent.
|
|
76
|
+
|
|
77
|
+
## Assumptions & Risks
|
|
78
|
+
|
|
79
|
+
**Assumptions:**
|
|
80
|
+
|
|
81
|
+
- The business has a defined story or background narrative that can be summarized for the page.
|
|
82
|
+
- A mission or purpose statement exists or can be drafted prior to implementation.
|
|
83
|
+
- Static content is acceptable; content updates will be infrequent and handled by developers.
|
|
84
|
+
|
|
85
|
+
**Key risks:**
|
|
86
|
+
|
|
87
|
+
- **Content readiness:** The page depends on finalized copy for the company story and mission statement. Mitigation: use realistic placeholder content during development so layout and structure can be validated independently.
|
|
88
|
+
- **Text-heavy appearance:** An About page with only narrative content can feel dense and uninviting. Mitigation: ensure the design uses adequate spacing, visual hierarchy, and section separation to maintain readability.
|
|
89
|
+
|
|
90
|
+
## Success Metrics
|
|
91
|
+
|
|
92
|
+
1. Visitors can identify the company's story and mission within 15 seconds of viewing the page.
|
|
93
|
+
2. The page renders correctly and is fully usable across desktop, tablet, and mobile viewports.
|
|
94
|
+
3. Content is structured into clearly distinct sections (story and mission) with visible separation.
|
|
95
|
+
|
|
96
|
+
## Implementation Context
|
|
97
|
+
|
|
98
|
+
> This feature PRD is portable and project-agnostic. During implementation, consult the project's `gspec/profile.md` (target users, positioning), `gspec/style.md` (design system), `gspec/stack.md` (technology choices), and `gspec/practices.md` (development standards) to resolve project-specific context.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
gspec-version: 1.8.0
|
|
3
|
+
description: Validated contact form with email delivery and success feedback
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Contact Form
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A reusable contact form component that lets visitors submit a structured inquiry (name, email, optional phone, and message) which triggers a server-side email to the business. Without a contact form, visitors must manually compose an email or make a phone call — adding friction that can cause drop-off at the moment of highest intent.
|
|
11
|
+
|
|
12
|
+
## Users & Use Cases
|
|
13
|
+
|
|
14
|
+
**Primary users:** Prospective clients and general visitors who want to reach the business directly from the website.
|
|
15
|
+
|
|
16
|
+
**Key use cases:**
|
|
17
|
+
|
|
18
|
+
1. A prospective client finishes reviewing services and wants to describe their needs in a message without leaving the site or opening their email client.
|
|
19
|
+
2. A visitor on a mobile device quickly fills in their name, email, and a short message using touch-friendly inputs and submits it in under a minute.
|
|
20
|
+
3. A visitor submits the form and immediately sees confirmation that their message was received, giving them confidence to move on without follow-up.
|
|
21
|
+
4. A visitor makes a validation error (e.g., malformed email) and corrects it in place without losing any of the text they already typed.
|
|
22
|
+
|
|
23
|
+
## Scope
|
|
24
|
+
|
|
25
|
+
**In scope:**
|
|
26
|
+
|
|
27
|
+
- Self-contained, reusable form component that can be placed on any page (contact page, footer CTA, standalone route)
|
|
28
|
+
- Required fields: name, email address, message body
|
|
29
|
+
- Optional field: phone number
|
|
30
|
+
- Client-side validation with inline error feedback
|
|
31
|
+
- Submission to a server-side endpoint that sends the email
|
|
32
|
+
- Clear success and error states after submission
|
|
33
|
+
- Double-submission prevention
|
|
34
|
+
- Hidden honeypot field for basic spam prevention
|
|
35
|
+
- Accessible markup (labels, focus management, error announcements)
|
|
36
|
+
- Responsive layout for mobile through desktop
|
|
37
|
+
|
|
38
|
+
**Out of scope:**
|
|
39
|
+
|
|
40
|
+
- The server-side email-sending endpoint itself (this feature defines the client-side form and its contract with the server; the endpoint is an infrastructure concern)
|
|
41
|
+
- Email templates, recipient configuration, or transport provider selection
|
|
42
|
+
- File attachments or media uploads
|
|
43
|
+
- CAPTCHA or third-party bot detection services
|
|
44
|
+
- Auto-reply or confirmation emails sent back to the submitter
|
|
45
|
+
- Analytics or event tracking for form interactions
|
|
46
|
+
- Multi-step or wizard-style form flows
|
|
47
|
+
|
|
48
|
+
**Deferred ideas:**
|
|
49
|
+
|
|
50
|
+
- Project type or inquiry category selector
|
|
51
|
+
- Preferred contact time field
|
|
52
|
+
- CAPTCHA integration if honeypot proves insufficient
|
|
53
|
+
- Auto-save or draft persistence for partially completed forms
|
|
54
|
+
- Confirmation email sent to the submitter after successful submission
|
|
55
|
+
|
|
56
|
+
## Capabilities
|
|
57
|
+
|
|
58
|
+
- [ ] **P0**: Visitor can fill in required fields (name, email, message) and submit the form
|
|
59
|
+
- Form renders name, email, and message fields, each with a visible label
|
|
60
|
+
- All three fields are required; form cannot be submitted with any of them empty
|
|
61
|
+
- On valid submission, form data is sent to a server-side endpoint as a structured payload
|
|
62
|
+
- After successful server response, a clear success message is displayed
|
|
63
|
+
|
|
64
|
+
- [ ] **P0**: Form validates input and shows inline errors before submission
|
|
65
|
+
- Empty required fields show a "required" error when the visitor attempts to submit
|
|
66
|
+
- Email field validates format and shows a specific error for malformed addresses
|
|
67
|
+
- Errors appear inline next to or below the relevant field
|
|
68
|
+
- Existing field values are preserved when validation errors are displayed
|
|
69
|
+
|
|
70
|
+
- [ ] **P0**: Form displays clear feedback for success and error outcomes
|
|
71
|
+
- On success, a thank-you or confirmation message replaces or overlays the form so the visitor knows the message was received
|
|
72
|
+
- On server error, an actionable error message is shown (e.g., "Something went wrong — please try again or contact us by phone")
|
|
73
|
+
- Feedback persists on screen until the visitor takes further action; it does not auto-dismiss
|
|
74
|
+
|
|
75
|
+
- [ ] **P0**: Submit control is guarded to prevent double submissions
|
|
76
|
+
- The submit button is disabled (or the form is otherwise guarded) while a submission request is in flight
|
|
77
|
+
- A loading indicator is visible during the request so the visitor knows the form is processing
|
|
78
|
+
|
|
79
|
+
- [ ] **P0**: Form is accessible
|
|
80
|
+
- Every input has a programmatically associated label
|
|
81
|
+
- Tab order follows a logical sequence through fields and the submit button
|
|
82
|
+
- Validation errors are announced to assistive technology (e.g., via live regions or focus management)
|
|
83
|
+
- Error messages are visible and not conveyed by color alone
|
|
84
|
+
|
|
85
|
+
- [ ] **P1**: Visitor can optionally provide a phone number
|
|
86
|
+
- An optional phone number field is displayed with a clear indication that it is not required
|
|
87
|
+
- The form submits successfully with or without a phone number value
|
|
88
|
+
- If provided, the phone number is included in the payload sent to the server
|
|
89
|
+
|
|
90
|
+
- [ ] **P1**: Form layout is responsive across device sizes
|
|
91
|
+
- On desktop, fields may be arranged in a multi-column layout where appropriate
|
|
92
|
+
- On mobile, all fields stack vertically with touch-friendly input sizes (minimum 44px tap targets)
|
|
93
|
+
- No horizontal scrolling at any viewport width
|
|
94
|
+
- Labels remain legible and inputs remain usable at all sizes
|
|
95
|
+
|
|
96
|
+
- [ ] **P1**: Hidden honeypot field deters automated spam submissions
|
|
97
|
+
- A visually hidden field is included in the form markup
|
|
98
|
+
- The field is not visible or focusable to human users
|
|
99
|
+
- If the honeypot field contains a value on submission, the form either silently discards the submission or the server rejects it
|
|
100
|
+
- Legitimate users are never affected by the honeypot mechanism
|
|
101
|
+
|
|
102
|
+
- [ ] **P1**: Key conversion pages include a call-to-action linking to the contact form
|
|
103
|
+
- Pages where visitors evaluate the business (e.g., Home, Services) include a CTA section near the bottom that directs visitors to the contact page
|
|
104
|
+
- The CTA includes a clear heading and a button or link to the contact page
|
|
105
|
+
- The CTA is visually distinct from surrounding content sections
|
|
106
|
+
- The CTA does not duplicate the full form — it links to the dedicated contact page where the form lives
|
|
107
|
+
|
|
108
|
+
- [ ] **P2**: Form is a self-contained, reusable component
|
|
109
|
+
- The form can be embedded on different pages without code duplication
|
|
110
|
+
- Placement on a page does not require page-specific modifications to the form's internal logic
|
|
111
|
+
- The server endpoint URL is configurable (e.g., via props, config, or environment) rather than hardcoded
|
|
112
|
+
|
|
113
|
+
## Dependencies
|
|
114
|
+
|
|
115
|
+
- **Contact Page** ([contact-page.md](contact-page.md)): The contact page is the primary intended host for this form component. The form should integrate visually alongside the static contact details already specified in that feature.
|
|
116
|
+
- **Form submission endpoint**: The form requires a backend that accepts the form payload and delivers the inquiry via email. This may be a server-side endpoint within the application or a third-party form service, depending on the stack's capabilities. Consult `gspec/stack.md` to determine the available approach.
|
|
117
|
+
|
|
118
|
+
> **Compatibility note**: This feature requires a form submission endpoint. Static-only stacks with no server runtime must include a third-party form submission service (check `gspec/stack.md` Section 11 — Third-Party Integrations). Full-stack stacks with backend capabilities should implement a custom server endpoint (check `gspec/stack.md` Section 5 — Backend Stack). The form's payload contract (name, email, phone, message, honeypot) remains the same regardless of approach.
|
|
119
|
+
|
|
120
|
+
## Assumptions & Risks
|
|
121
|
+
|
|
122
|
+
**Assumptions:**
|
|
123
|
+
|
|
124
|
+
- A server-side endpoint for receiving form submissions and sending email will be available at implementation time or will be built as a companion task.
|
|
125
|
+
- A single, fixed set of fields (name, email, optional phone, message) is sufficient for all expected inquiry types.
|
|
126
|
+
- The honeypot technique provides adequate spam prevention for the expected traffic level.
|
|
127
|
+
|
|
128
|
+
**Open questions:**
|
|
129
|
+
|
|
130
|
+
- Exact error response format from the server endpoint (status codes, error body structure) will be determined during implementation when the endpoint is built.
|
|
131
|
+
|
|
132
|
+
**Key risks:**
|
|
133
|
+
|
|
134
|
+
- **Server endpoint availability:** The form is inert without a functioning server endpoint. Mitigation: the form can be built and tested with a mock endpoint; the real endpoint can be connected later.
|
|
135
|
+
- **Spam volume:** A honeypot field alone may not stop sophisticated bots. Mitigation: monitor submission volume post-launch; CAPTCHA integration is a deferred enhancement if needed.
|
|
136
|
+
- **Email deliverability:** Submissions may be lost if the server-side email send fails silently. Mitigation: the server endpoint should return clear success/failure responses so the form can display accurate feedback to the visitor.
|
|
137
|
+
|
|
138
|
+
## Success Metrics
|
|
139
|
+
|
|
140
|
+
1. Visitors can successfully submit the form and receive visible confirmation on the first attempt when all fields are valid.
|
|
141
|
+
2. Validation errors prevent submission of incomplete or malformed data, and visitors can correct errors without re-entering other fields.
|
|
142
|
+
3. The form is usable and visually coherent on mobile devices (375px viewport) through desktop (1440px viewport).
|
|
143
|
+
4. Spam submissions (honeypot-caught) account for the majority of bot traffic, with minimal false positives affecting legitimate users.
|
|
144
|
+
|
|
145
|
+
## Implementation Context
|
|
146
|
+
|
|
147
|
+
> This feature PRD is portable and project-agnostic. During implementation, consult the project's `gspec/profile.md` (target users, positioning), `gspec/style.md` (design system), `gspec/stack.md` (technology choices), and `gspec/practices.md` (development standards) to resolve project-specific context.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
gspec-version: 1.8.0
|
|
3
|
+
description: Contact page layout with form, location map, and business info
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Contact Page
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A static Contact page that displays the business's contact information so visitors can easily find how to get in touch. Without a clear, dedicated contact page, prospective clients may leave the site rather than search for scattered contact details — making this a critical conversion-support page.
|
|
11
|
+
|
|
12
|
+
## Users & Use Cases
|
|
13
|
+
|
|
14
|
+
**Primary users:** Prospective clients ready to reach out to the business.
|
|
15
|
+
|
|
16
|
+
**Key use cases:**
|
|
17
|
+
|
|
18
|
+
1. A prospective client has reviewed the services and about page and is now ready to make contact — they navigate to the Contact page to find an email address or phone number.
|
|
19
|
+
2. A visitor needs the business's physical address to visit in person or send correspondence.
|
|
20
|
+
3. A returning client needs to quickly look up the business's phone number or email without digging through old communications.
|
|
21
|
+
|
|
22
|
+
## Scope
|
|
23
|
+
|
|
24
|
+
**In scope:**
|
|
25
|
+
|
|
26
|
+
- Display of core contact details: email address, phone number, and physical address
|
|
27
|
+
- Clear, scannable layout that makes each contact method immediately visible
|
|
28
|
+
- Responsive layout that works across desktop, tablet, and mobile devices
|
|
29
|
+
- Static content coded directly into the page
|
|
30
|
+
|
|
31
|
+
**Out of scope:**
|
|
32
|
+
|
|
33
|
+
- Contact form or message submission functionality (separate feature)
|
|
34
|
+
- Embedded map or location visualization
|
|
35
|
+
- Live chat, chatbot, or real-time messaging
|
|
36
|
+
- Social media links or feeds
|
|
37
|
+
- Business hours display
|
|
38
|
+
- CMS-managed or dynamically loaded content
|
|
39
|
+
|
|
40
|
+
**Deferred ideas:**
|
|
41
|
+
|
|
42
|
+
- Embedded interactive map showing the business location
|
|
43
|
+
- Business hours section
|
|
44
|
+
- Social media profile links
|
|
45
|
+
- Multiple office or branch locations
|
|
46
|
+
|
|
47
|
+
## Capabilities
|
|
48
|
+
|
|
49
|
+
- [ ] **P0**: Page displays the business email address
|
|
50
|
+
- Email address is visible without scrolling on desktop viewports
|
|
51
|
+
- Email is rendered as a clickable `mailto:` link that opens the visitor's default email client
|
|
52
|
+
- Email address is displayed as readable text (not hidden behind an icon or "Email Us" label alone)
|
|
53
|
+
|
|
54
|
+
- [ ] **P0**: Page displays the business phone number
|
|
55
|
+
- Phone number is visible and formatted for readability
|
|
56
|
+
- Phone number is rendered as a clickable `tel:` link that initiates a call on mobile devices
|
|
57
|
+
- Phone number is displayed as readable text
|
|
58
|
+
|
|
59
|
+
- [ ] **P0**: Page displays the business physical address
|
|
60
|
+
- Full mailing address is displayed in a standard, readable format
|
|
61
|
+
- Address is presented as plain text (not solely as an image)
|
|
62
|
+
|
|
63
|
+
- [ ] **P0**: Page is fully responsive across common device sizes
|
|
64
|
+
- Layout adapts cleanly to desktop (1024px+), tablet (768px), and mobile (375px) viewports
|
|
65
|
+
- No horizontal scrolling on any viewport
|
|
66
|
+
- Contact details remain legible and tappable at all sizes
|
|
67
|
+
|
|
68
|
+
- [ ] **P1**: Contact details are scannable and visually organized
|
|
69
|
+
- Each contact method (email, phone, address) is visually distinct and separated
|
|
70
|
+
- A visitor can identify all available contact methods within 5 seconds of viewing the page
|
|
71
|
+
- Clear labels or headings distinguish each contact method
|
|
72
|
+
|
|
73
|
+
- [ ] **P2**: Semantic page structure supports accessibility
|
|
74
|
+
- Page uses proper heading hierarchy (single h1, logical h2/h3 nesting)
|
|
75
|
+
- Interactive elements (links) are keyboard-navigable and have accessible labels
|
|
76
|
+
- Sufficient color contrast for all text elements
|
|
77
|
+
|
|
78
|
+
## Dependencies
|
|
79
|
+
|
|
80
|
+
- **Home Page** ([home-page.md](home-page.md)): The Contact page is a secondary page that visitors typically navigate to from the home page. Navigation between pages should be consistent.
|
|
81
|
+
|
|
82
|
+
## Assumptions & Risks
|
|
83
|
+
|
|
84
|
+
**Assumptions:**
|
|
85
|
+
|
|
86
|
+
- The business has a single set of contact details (one email, one phone number, one address) to display.
|
|
87
|
+
- Contact information is stable and changes infrequently; developer-managed updates are acceptable.
|
|
88
|
+
- Static content is acceptable for the initial version.
|
|
89
|
+
|
|
90
|
+
**Key risks:**
|
|
91
|
+
|
|
92
|
+
- **Content readiness:** The page requires finalized contact details before launch. Mitigation: use realistic placeholder content during development so layout and structure can be validated independently.
|
|
93
|
+
- **Spam exposure:** Displaying email addresses and phone numbers as plain text exposes them to automated scraping. Mitigation: accept this tradeoff for usability in the initial version; obfuscation techniques can be added later if spam becomes a problem.
|
|
94
|
+
|
|
95
|
+
## Success Metrics
|
|
96
|
+
|
|
97
|
+
1. Visitors can identify at least one contact method (email, phone, or address) within 5 seconds of viewing the page.
|
|
98
|
+
2. The page renders correctly and is fully usable across desktop, tablet, and mobile viewports.
|
|
99
|
+
3. All clickable contact methods (`mailto:` and `tel:` links) function correctly on their respective devices.
|
|
100
|
+
|
|
101
|
+
## Implementation Context
|
|
102
|
+
|
|
103
|
+
> This feature PRD is portable and project-agnostic. During implementation, consult the project's `gspec/profile.md` (target users, positioning), `gspec/style.md` (design system), `gspec/stack.md` (technology choices), and `gspec/practices.md` (development standards) to resolve project-specific context.
|