engsys 1.0.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/LICENSE +21 -0
- package/README.md +202 -0
- package/core/agents/aaron.md +152 -0
- package/core/agents/bert.md +115 -0
- package/core/agents/isabelle.md +136 -0
- package/core/agents/jody.md +150 -0
- package/core/agents/leith.md +111 -0
- package/core/agents/marcelo.md +282 -0
- package/core/agents/melvin.md +101 -0
- package/core/agents/nyx.md +152 -0
- package/core/agents/otto.md +168 -0
- package/core/agents/patricia.md +283 -0
- package/core/commands/design-audit-local.md +155 -0
- package/core/commands/design-audit.md +235 -0
- package/core/commands/design-critique.md +96 -0
- package/core/commands/file-issue.md +22 -0
- package/core/commands/generate-project.md +45 -0
- package/core/commands/implement-issue.md +37 -0
- package/core/commands/implement-project.md +40 -0
- package/core/commands/naturalize.md +61 -0
- package/core/commands/pre-push.md +29 -0
- package/core/commands/prep-review-collect.md +130 -0
- package/core/commands/prep-review-finalize.md +121 -0
- package/core/commands/prep-review-publish.md +113 -0
- package/core/commands/prep-review.md +65 -0
- package/core/commands/project-closeout.md +25 -0
- package/core/skills/agentic-eval/SKILL.md +195 -0
- package/core/skills/chrome-devtools/SKILL.md +97 -0
- package/core/skills/code-review/SKILL.md +26 -0
- package/core/skills/gh-cli/SKILL.md +2202 -0
- package/core/skills/git-commit/SKILL.md +124 -0
- package/core/skills/git-workflow-agents/SKILL.md +462 -0
- package/core/skills/git-workflow-agents/reference.md +220 -0
- package/core/skills/github-actions/SKILL.md +190 -0
- package/core/skills/github-issues/SKILL.md +154 -0
- package/core/skills/llm-structured-outputs/SKILL.md +323 -0
- package/core/skills/llm-structured-outputs/references/provider-details.md +392 -0
- package/core/skills/pre-push/SKILL.md +115 -0
- package/core/skills/refactor/SKILL.md +645 -0
- package/core/skills/web-design-reviewer/SKILL.md +371 -0
- package/core/skills/webapp-testing/SKILL.md +127 -0
- package/core/skills/webapp-testing/test-helper.js +56 -0
- package/core/templates/CLAUDE.md.tmpl +98 -0
- package/core/templates/adr-template.md +67 -0
- package/core/templates/gh-issue-templates/bug.md +39 -0
- package/core/templates/gh-issue-templates/content.md +42 -0
- package/core/templates/gh-issue-templates/enhancement.md +36 -0
- package/core/templates/gh-issue-templates/feature.md +39 -0
- package/core/templates/gh-issue-templates/infrastructure.md +41 -0
- package/core/templates/post-edit-reminders.sh.tmpl +19 -0
- package/core/templates/settings.json.tmpl +90 -0
- package/core/templates/settings.local.json.tmpl +3 -0
- package/core/workflows/agent-implementation-workflow.md +346 -0
- package/core/workflows/generate-project.md +258 -0
- package/core/workflows/implement-project-workflow.md +190 -0
- package/core/workflows/issue-tracking.md +89 -0
- package/core/workflows/project-closeout-ceremony.md +77 -0
- package/core/workflows/review-workflow.md +266 -0
- package/engsys.config.example.yaml +46 -0
- package/install +202 -0
- package/lessons-library/README.md +80 -0
- package/lessons-library/async-callbacks-verify-liveness.md +15 -0
- package/lessons-library/change-isnt-done-until-every-surface-updated.md +15 -0
- package/lessons-library/claim-then-act-for-irreversible-ops.md +16 -0
- package/lessons-library/co-commit-entangled-work.md +15 -0
- package/lessons-library/dependabot-triage-playbook.md +17 -0
- package/lessons-library/deploy-by-digest-and-verify-the-running-revision.md +15 -0
- package/lessons-library/enforce-your-guarantee-at-your-boundary.md +16 -0
- package/lessons-library/gate-changes-on-measurement-not-vibes.md +15 -0
- package/lessons-library/iac-first-no-console-changes.md +15 -0
- package/lessons-library/independent-objective-review-gate.md +15 -0
- package/lessons-library/keep-an-immutable-source-of-truth.md +15 -0
- package/lessons-library/long-agent-runs-checkpoint-not-poll.md +15 -0
- package/lessons-library/model-identity-with-stable-ids-and-provenance.md +15 -0
- package/lessons-library/operator-choices-are-first-class.md +15 -0
- package/lessons-library/prefer-tool-enforced-structured-output.md +15 -0
- package/lessons-library/prove-causation-before-acting.md +15 -0
- package/lessons-library/re-read-state-before-acting.md +14 -0
- package/lessons-library/read-layer-tolerates-unbackfilled-rows.md +15 -0
- package/lessons-library/shell-safety-pipefail-and-validate-before-teardown.md +14 -0
- package/lessons-library/shift-correctness-left-and-distrust-false-greens.md +15 -0
- package/lessons-library/stray-control-bytes-hide-changes.md +14 -0
- package/lessons-library/tests-can-assert-the-bug.md +15 -0
- package/lessons-library/verify-ground-truth-not-reports.md +15 -0
- package/lessons-library/worktrees-need-bootstrap-from-origin-main.md +15 -0
- package/lib/commands.js +356 -0
- package/lib/generate-team-avatars.mjs +251 -0
- package/lib/manifest.js +155 -0
- package/lib/render.js +135 -0
- package/lib/selftest.js +90 -0
- package/lib/util.js +89 -0
- package/lib/yaml.js +156 -0
- package/optional-agents/gary.md +86 -0
- package/optional-agents/jos.md +136 -0
- package/optional-agents/sandy.md +101 -0
- package/optional-agents/steve.md +161 -0
- package/package.json +43 -0
- package/stacks/cloud/aws/claude.fragment.md +17 -0
- package/stacks/cloud/aws/settings.fragment.json +39 -0
- package/stacks/cloud/aws/skills/aws-deployment-preflight/SKILL.md +165 -0
- package/stacks/cloud/aws/skills/cloud-architecture-aws/SKILL.md +265 -0
- package/stacks/cloud/azure/claude.fragment.md +17 -0
- package/stacks/cloud/azure/settings.fragment.json +45 -0
- package/stacks/cloud/azure/skills/azure-deployment-preflight/SKILL.md +175 -0
- package/stacks/cloud/azure/skills/cloud-architecture-azure/SKILL.md +211 -0
- package/stacks/cloud/cloudflare/claude.fragment.md +21 -0
- package/stacks/cloud/cloudflare/settings.fragment.json +31 -0
- package/stacks/cloud/cloudflare/skills/cloud-architecture-cloudflare/SKILL.md +294 -0
- package/stacks/cloud/cloudflare/skills/cloudflare-deployment-preflight/SKILL.md +175 -0
- package/stacks/cloud/gcp/claude.fragment.md +17 -0
- package/stacks/cloud/gcp/settings.fragment.json +40 -0
- package/stacks/cloud/gcp/skills/cloud-architecture-gcp/SKILL.md +208 -0
- package/stacks/cloud/gcp/skills/gcp-deployment-preflight/SKILL.md +137 -0
- package/stacks/db/mongo/skills/mongo-conventions/SKILL.md +96 -0
- package/stacks/db/prisma/claude.fragment.md +49 -0
- package/stacks/db/prisma/skills/docker-database-package-copy/SKILL.md +44 -0
- package/stacks/db/prisma/skills/prisma-conventions/SKILL.md +37 -0
- package/stacks/domain/mobile-growth/skills/apple-ads/SKILL.md +184 -0
- package/stacks/domain/mobile-growth/skills/apple-ads/references/benchmark-notes.md +47 -0
- package/stacks/domain/mobile-growth/skills/apple-ads/references/official-links.md +53 -0
- package/stacks/domain/mobile-growth/skills/google-play-growth/SKILL.md +197 -0
- package/stacks/domain/mobile-growth/skills/google-play-growth/references/benchmark-notes.md +47 -0
- package/stacks/domain/mobile-growth/skills/google-play-growth/references/official-links.md +45 -0
- package/stacks/iac/bicep/claude.fragment.md +14 -0
- package/stacks/iac/bicep/settings.fragment.json +20 -0
- package/stacks/iac/bicep/skills/iac-bicep/SKILL.md +113 -0
- package/stacks/iac/cdk/claude.fragment.md +14 -0
- package/stacks/iac/cdk/settings.fragment.json +23 -0
- package/stacks/iac/cdk/skills/iac-cdk/SKILL.md +104 -0
- package/stacks/iac/terraform/claude.fragment.md +13 -0
- package/stacks/iac/terraform/settings.fragment.json +25 -0
- package/stacks/iac/terraform/skills/iac-terraform/SKILL.md +93 -0
- package/stacks/iac/terraform/skills/terraform-conventions/SKILL.md +87 -0
- package/stacks/lang/kotlin/skills/android-testing/SKILL.md +263 -0
- package/stacks/lang/kotlin/skills/jetpack-compose/SKILL.md +264 -0
- package/stacks/lang/kotlin/skills/kotlin-coroutines/SKILL.md +329 -0
- package/stacks/lang/python/skills/python-conventions/SKILL.md +61 -0
- package/stacks/lang/shell/skills/shell-scripting/SKILL.md +110 -0
- package/stacks/lang/swift/skills/swift-concurrency/SKILL.md +423 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/approachable-concurrency.md +80 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/concurrency-patterns.md +233 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/swiftui-concurrency.md +187 -0
- package/stacks/lang/swift/skills/swift-concurrency/references/synchronization-primitives.md +341 -0
- package/stacks/lang/swift/skills/swift-testing/SKILL.md +497 -0
- package/stacks/lang/swift/skills/swift-testing/references/testing-advanced.md +106 -0
- package/stacks/lang/swift/skills/swift-testing/references/testing-patterns.md +504 -0
- package/stacks/lang/swift/skills/swiftdata/SKILL.md +334 -0
- package/stacks/lang/swift/skills/swiftdata/references/core-data-coexistence.md +504 -0
- package/stacks/lang/swift/skills/swiftdata/references/swiftdata-advanced.md +975 -0
- package/stacks/lang/swift/skills/swiftdata/references/swiftdata-queries.md +675 -0
- package/stacks/lang/swift/skills/swiftui-patterns/SKILL.md +371 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/architecture-patterns.md +486 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/deprecated-migration.md +1097 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/design-polish.md +780 -0
- package/stacks/lang/swift/skills/swiftui-patterns/references/platform-and-sharing.md +696 -0
- package/stacks/lang/typescript/skills/typescript-conventions/SKILL.md +91 -0
- package/stacks/platform/android/claude.fragment.md +40 -0
- package/stacks/platform/android/hooks/pre-push-gradle.sh +70 -0
- package/stacks/platform/android/settings.fragment.json +13 -0
- package/stacks/platform/android/skills/android-build-conventions/SKILL.md +247 -0
- package/stacks/platform/ios/claude.fragment.md +24 -0
- package/stacks/platform/ios/hooks/pre-push-xcodebuild.sh +82 -0
- package/stacks/platform/ios/settings.fragment.json +21 -0
- package/stacks/platform/ios/skills/xcodebuildmcp-simulator-logs/SKILL.md +76 -0
- package/stacks/platform/web/skills/frontend-testing/SKILL.md +246 -0
- package/stacks/platform/web/skills/react-conventions/SKILL.md +261 -0
- package/stacks/platform/web/skills/web-platform-conventions/SKILL.md +55 -0
- package/stacks/tooling/issue-tracker-github/claude.fragment.md +10 -0
- package/stacks/tooling/issue-tracker-github/settings.fragment.json +24 -0
- package/stacks/tooling/issue-tracker-github/skills/issue-tracker-github/SKILL.md +278 -0
- package/stacks/tooling/issue-tracker-linear/claude.fragment.md +17 -0
- package/stacks/tooling/issue-tracker-linear/settings.fragment.json +9 -0
- package/stacks/tooling/issue-tracker-linear/skills/issue-tracker-linear/SKILL.md +183 -0
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: web-design-reviewer
|
|
3
|
+
description: 'This skill enables visual inspection of websites running locally or remotely to identify and fix design issues. Triggers on requests like "review website design", "check the UI", "fix the layout", "find design problems". Detects issues with responsive design, accessibility, visual consistency, and layout breakage, then performs fixes at the source code level.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Web Design Reviewer
|
|
7
|
+
|
|
8
|
+
This skill enables visual inspection and validation of website design quality, identifying and fixing issues at the source code level.
|
|
9
|
+
|
|
10
|
+
## Scope of Application
|
|
11
|
+
|
|
12
|
+
- Static sites (HTML/CSS/JS)
|
|
13
|
+
- SPA frameworks such as React / Vue / Angular / Svelte
|
|
14
|
+
- Full-stack frameworks such as Next.js / Nuxt / SvelteKit
|
|
15
|
+
- CMS platforms such as WordPress / Drupal
|
|
16
|
+
- Any other web application
|
|
17
|
+
|
|
18
|
+
## Prerequisites
|
|
19
|
+
|
|
20
|
+
### Required
|
|
21
|
+
|
|
22
|
+
1. **Target website must be running**
|
|
23
|
+
- Local development server (e.g., `http://localhost:3000`)
|
|
24
|
+
- Staging environment
|
|
25
|
+
- Production environment (for read-only reviews)
|
|
26
|
+
|
|
27
|
+
2. **Browser automation must be available**
|
|
28
|
+
- Screenshot capture
|
|
29
|
+
- Page navigation
|
|
30
|
+
- DOM information retrieval
|
|
31
|
+
|
|
32
|
+
3. **Access to source code (when making fixes)**
|
|
33
|
+
- Project must exist within the workspace
|
|
34
|
+
|
|
35
|
+
## Workflow Overview
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart TD
|
|
39
|
+
A[Step 1: Information Gathering] --> B[Step 2: Visual Inspection]
|
|
40
|
+
B --> C[Step 3: Issue Fixing]
|
|
41
|
+
C --> D[Step 4: Re-verification]
|
|
42
|
+
D --> E{Issues Remaining?}
|
|
43
|
+
E -->|Yes| B
|
|
44
|
+
E -->|No| F[Completion Report]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Step 1: Information Gathering Phase
|
|
50
|
+
|
|
51
|
+
### 1.1 URL Confirmation
|
|
52
|
+
|
|
53
|
+
If the URL is not provided, ask the user:
|
|
54
|
+
|
|
55
|
+
> Please provide the URL of the website to review (e.g., `http://localhost:3000`)
|
|
56
|
+
|
|
57
|
+
### 1.2 Understanding Project Structure
|
|
58
|
+
|
|
59
|
+
When making fixes, gather the following information:
|
|
60
|
+
|
|
61
|
+
| Item | Example Question |
|
|
62
|
+
| --------------- | --------------------------------------------- |
|
|
63
|
+
| Framework | Are you using React / Vue / Next.js, etc.? |
|
|
64
|
+
| Styling Method | CSS / SCSS / Tailwind / CSS-in-JS, etc. |
|
|
65
|
+
| Source Location | Where are style files and components located? |
|
|
66
|
+
| Review Scope | Specific pages only or entire site? |
|
|
67
|
+
|
|
68
|
+
### 1.3 Automatic Project Detection
|
|
69
|
+
|
|
70
|
+
Attempt automatic detection from files in the workspace:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Detection targets:
|
|
74
|
+
├── package.json → Framework and dependencies
|
|
75
|
+
├── tsconfig.json → TypeScript usage
|
|
76
|
+
├── tailwind.config → Tailwind CSS
|
|
77
|
+
├── next.config → Next.js
|
|
78
|
+
├── vite.config → Vite
|
|
79
|
+
├── nuxt.config → Nuxt
|
|
80
|
+
└── src/ or app/ → Source directory
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### 1.4 Identifying Styling Method
|
|
84
|
+
|
|
85
|
+
| Method | Detection | Edit Target |
|
|
86
|
+
| ----------------- | ------------------- | --------------------------- |
|
|
87
|
+
| Pure CSS | `*.css` files | Global CSS or component CSS |
|
|
88
|
+
| SCSS/Sass | `*.scss`, `*.sass` | SCSS files |
|
|
89
|
+
| CSS Modules | `*.module.css` | Module CSS files |
|
|
90
|
+
| Tailwind CSS | `tailwind.config.*` | className in components |
|
|
91
|
+
| styled-components | `styled.` in code | JS/TS files |
|
|
92
|
+
| Emotion | `@emotion/` imports | JS/TS files |
|
|
93
|
+
| CSS-in-JS (other) | Inline styles | JS/TS files |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Step 2: Visual Inspection Phase
|
|
98
|
+
|
|
99
|
+
### 2.1 Page Traversal
|
|
100
|
+
|
|
101
|
+
1. Navigate to the specified URL
|
|
102
|
+
2. Capture screenshots
|
|
103
|
+
3. Retrieve DOM structure/snapshot (if possible)
|
|
104
|
+
4. If additional pages exist, traverse through navigation
|
|
105
|
+
|
|
106
|
+
### 2.2 Inspection Items
|
|
107
|
+
|
|
108
|
+
#### Layout Issues
|
|
109
|
+
|
|
110
|
+
| Issue | Description | Severity |
|
|
111
|
+
| -------------------- | ------------------------------------------------- | -------- |
|
|
112
|
+
| Element Overflow | Content overflows from parent element or viewport | High |
|
|
113
|
+
| Element Overlap | Unintended overlapping of elements | High |
|
|
114
|
+
| Alignment Issues | Grid or flex alignment problems | Medium |
|
|
115
|
+
| Inconsistent Spacing | Padding/margin inconsistencies | Medium |
|
|
116
|
+
| Text Clipping | Long text not handled properly | Medium |
|
|
117
|
+
|
|
118
|
+
#### Responsive Issues
|
|
119
|
+
|
|
120
|
+
| Issue | Description | Severity |
|
|
121
|
+
| ------------------- | ---------------------------------------------- | -------- |
|
|
122
|
+
| Non-mobile Friendly | Layout breaks on small screens | High |
|
|
123
|
+
| Breakpoint Issues | Unnatural transitions when screen size changes | Medium |
|
|
124
|
+
| Touch Targets | Buttons too small on mobile | Medium |
|
|
125
|
+
|
|
126
|
+
#### Accessibility Issues
|
|
127
|
+
|
|
128
|
+
| Issue | Description | Severity |
|
|
129
|
+
| --------------------- | ------------------------------------------------- | -------- |
|
|
130
|
+
| Insufficient Contrast | Low contrast ratio between text and background | High |
|
|
131
|
+
| No Focus State | Cannot determine state during keyboard navigation | High |
|
|
132
|
+
| Missing alt Text | No alternative text for images | Medium |
|
|
133
|
+
|
|
134
|
+
#### Visual Consistency
|
|
135
|
+
|
|
136
|
+
| Issue | Description | Severity |
|
|
137
|
+
| --------------------- | -------------------------------------------- | -------- |
|
|
138
|
+
| Font Inconsistency | Mixed font families | Medium |
|
|
139
|
+
| Color Inconsistency | Non-unified brand colors | Medium |
|
|
140
|
+
| Spacing Inconsistency | Non-uniform spacing between similar elements | Low |
|
|
141
|
+
|
|
142
|
+
### 2.3 Viewport Testing (Responsive)
|
|
143
|
+
|
|
144
|
+
Test at the following viewports:
|
|
145
|
+
|
|
146
|
+
| Name | Width | Representative Device |
|
|
147
|
+
| ------- | ------ | --------------------- |
|
|
148
|
+
| Mobile | 375px | iPhone SE/12 mini |
|
|
149
|
+
| Tablet | 768px | iPad |
|
|
150
|
+
| Desktop | 1280px | Standard PC |
|
|
151
|
+
| Wide | 1920px | Large display |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Step 3: Issue Fixing Phase
|
|
156
|
+
|
|
157
|
+
### 3.1 Issue Prioritization
|
|
158
|
+
|
|
159
|
+
```mermaid
|
|
160
|
+
block-beta
|
|
161
|
+
columns 1
|
|
162
|
+
block:priority["Priority Matrix"]
|
|
163
|
+
P1["P1: Fix Immediately\n(Layout issues affecting functionality)"]
|
|
164
|
+
P2["P2: Fix Next\n(Visual issues degrading UX)"]
|
|
165
|
+
P3["P3: Fix If Possible\n(Minor visual inconsistencies)"]
|
|
166
|
+
end
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 3.2 Identifying Source Files
|
|
170
|
+
|
|
171
|
+
Identify source files from problematic elements:
|
|
172
|
+
|
|
173
|
+
1. **Selector-based Search**
|
|
174
|
+
- Search codebase by class name or ID
|
|
175
|
+
- Explore style definitions with `grep_search`
|
|
176
|
+
|
|
177
|
+
2. **Component-based Search**
|
|
178
|
+
- Identify components from element text or structure
|
|
179
|
+
- Explore related files with `semantic_search`
|
|
180
|
+
|
|
181
|
+
3. **File Pattern Filtering**
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
Style files: src/**/*.css, styles/**/*
|
|
185
|
+
Components: src/components/**/*
|
|
186
|
+
Pages: src/pages/**, app/**
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 3.3 Applying Fixes
|
|
190
|
+
|
|
191
|
+
#### Framework-specific Fix Guidelines
|
|
192
|
+
|
|
193
|
+
See [references/framework-fixes.md](references/framework-fixes.md) for details.
|
|
194
|
+
|
|
195
|
+
#### Fix Principles
|
|
196
|
+
|
|
197
|
+
1. **Minimal Changes**: Only make the minimum changes necessary to resolve the issue
|
|
198
|
+
2. **Respect Existing Patterns**: Follow existing code style in the project
|
|
199
|
+
3. **Avoid Breaking Changes**: Be careful not to affect other areas
|
|
200
|
+
4. **Add Comments**: Add comments to explain the reason for fixes where appropriate
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Step 4: Re-verification Phase
|
|
205
|
+
|
|
206
|
+
### 4.1 Post-fix Confirmation
|
|
207
|
+
|
|
208
|
+
1. Reload browser (or wait for development server HMR)
|
|
209
|
+
2. Capture screenshots of fixed areas
|
|
210
|
+
3. Compare before and after
|
|
211
|
+
|
|
212
|
+
### 4.2 Regression Testing
|
|
213
|
+
|
|
214
|
+
- Verify that fixes haven't affected other areas
|
|
215
|
+
- Confirm responsive display is not broken
|
|
216
|
+
|
|
217
|
+
### 4.3 Iteration Decision
|
|
218
|
+
|
|
219
|
+
```mermaid
|
|
220
|
+
flowchart TD
|
|
221
|
+
A{Issues Remaining?}
|
|
222
|
+
A -->|Yes| B[Return to Step 2]
|
|
223
|
+
A -->|No| C[Proceed to Completion Report]
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Iteration Limit**: If more than 3 fix attempts are needed for a specific issue, consult the user
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Output Format
|
|
231
|
+
|
|
232
|
+
### Review Results Report
|
|
233
|
+
|
|
234
|
+
```markdown
|
|
235
|
+
# Web Design Review Results
|
|
236
|
+
|
|
237
|
+
## Summary
|
|
238
|
+
|
|
239
|
+
| Item | Value |
|
|
240
|
+
| ---------------- | ----------------------- |
|
|
241
|
+
| Target URL | {URL} |
|
|
242
|
+
| Framework | {Detected framework} |
|
|
243
|
+
| Styling | {CSS / Tailwind / etc.} |
|
|
244
|
+
| Tested Viewports | Desktop, Mobile |
|
|
245
|
+
| Issues Detected | {N} |
|
|
246
|
+
| Issues Fixed | {M} |
|
|
247
|
+
|
|
248
|
+
## Detected Issues
|
|
249
|
+
|
|
250
|
+
### [P1] {Issue Title}
|
|
251
|
+
|
|
252
|
+
- **Page**: {Page path}
|
|
253
|
+
- **Element**: {Selector or description}
|
|
254
|
+
- **Issue**: {Detailed description of the issue}
|
|
255
|
+
- **Fixed File**: `{File path}`
|
|
256
|
+
- **Fix Details**: {Description of changes}
|
|
257
|
+
- **Screenshot**: Before/After
|
|
258
|
+
|
|
259
|
+
### [P2] {Issue Title}
|
|
260
|
+
|
|
261
|
+
...
|
|
262
|
+
|
|
263
|
+
## Unfixed Issues (if any)
|
|
264
|
+
|
|
265
|
+
### {Issue Title}
|
|
266
|
+
|
|
267
|
+
- **Reason**: {Why it was not fixed/could not be fixed}
|
|
268
|
+
- **Recommended Action**: {Recommendations for user}
|
|
269
|
+
|
|
270
|
+
## Recommendations
|
|
271
|
+
|
|
272
|
+
- {Suggestions for future improvements}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## Required Capabilities
|
|
278
|
+
|
|
279
|
+
| Capability | Description | Required |
|
|
280
|
+
| ------------------- | ------------------------------- | ------------------ |
|
|
281
|
+
| Web Page Navigation | Access URLs, page transitions | ✅ |
|
|
282
|
+
| Screenshot Capture | Page image capture | ✅ |
|
|
283
|
+
| Image Analysis | Visual issue detection | ✅ |
|
|
284
|
+
| DOM Retrieval | Page structure retrieval | Recommended |
|
|
285
|
+
| File Read/Write | Source code reading and editing | Required for fixes |
|
|
286
|
+
| Code Search | Code search within project | Required for fixes |
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Reference Implementation
|
|
291
|
+
|
|
292
|
+
### Implementation with Playwright MCP
|
|
293
|
+
|
|
294
|
+
[Playwright MCP](https://github.com/microsoft/playwright-mcp) is recommended as the reference implementation for this skill.
|
|
295
|
+
|
|
296
|
+
| Capability | Playwright MCP Tool | Purpose |
|
|
297
|
+
| ---------- | -------------------------- | ---------------------------------- |
|
|
298
|
+
| Navigation | `browser_navigate` | Access URLs |
|
|
299
|
+
| Snapshot | `browser_snapshot` | Retrieve DOM structure |
|
|
300
|
+
| Screenshot | `browser_take_screenshot` | Images for visual inspection |
|
|
301
|
+
| Click | `browser_click` | Interact with interactive elements |
|
|
302
|
+
| Resize | `browser_resize` | Responsive testing |
|
|
303
|
+
| Console | `browser_console_messages` | Detect JS errors |
|
|
304
|
+
|
|
305
|
+
#### Configuration Example (MCP Server)
|
|
306
|
+
|
|
307
|
+
```json
|
|
308
|
+
{
|
|
309
|
+
"mcpServers": {
|
|
310
|
+
"playwright": {
|
|
311
|
+
"command": "npx",
|
|
312
|
+
"args": ["-y", "@playwright/mcp@latest", "--caps=vision"]
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Other Compatible Browser Automation Tools
|
|
319
|
+
|
|
320
|
+
| Tool | Features |
|
|
321
|
+
| -------------- | --------------------------------------------- |
|
|
322
|
+
| Selenium | Broad browser support, multi-language support |
|
|
323
|
+
| Puppeteer | Chrome/Chromium focused, Node.js |
|
|
324
|
+
| Cypress | Easy integration with E2E testing |
|
|
325
|
+
| WebDriver BiDi | Standardized next-generation protocol |
|
|
326
|
+
|
|
327
|
+
The same workflow can be implemented with these tools. As long as they provide the necessary capabilities (navigation, screenshot, DOM retrieval), the choice of tool is flexible.
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Best Practices
|
|
332
|
+
|
|
333
|
+
### DO (Recommended)
|
|
334
|
+
|
|
335
|
+
- ✅ Always save screenshots before making fixes
|
|
336
|
+
- ✅ Fix one issue at a time and verify each
|
|
337
|
+
- ✅ Follow the project's existing code style
|
|
338
|
+
- ✅ Confirm with user before major changes
|
|
339
|
+
- ✅ Document fix details thoroughly
|
|
340
|
+
|
|
341
|
+
### DON'T (Not Recommended)
|
|
342
|
+
|
|
343
|
+
- ❌ Large-scale refactoring without confirmation
|
|
344
|
+
- ❌ Ignoring design systems or brand guidelines
|
|
345
|
+
- ❌ Fixes that ignore performance
|
|
346
|
+
- ❌ Fixing multiple issues at once (difficult to verify)
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Troubleshooting
|
|
351
|
+
|
|
352
|
+
### Problem: Style files not found
|
|
353
|
+
|
|
354
|
+
1. Check dependencies in `package.json`
|
|
355
|
+
2. Consider the possibility of CSS-in-JS
|
|
356
|
+
3. Consider CSS generated at build time
|
|
357
|
+
4. Ask user about styling method
|
|
358
|
+
|
|
359
|
+
### Problem: Fixes not reflected
|
|
360
|
+
|
|
361
|
+
1. Check if development server HMR is working
|
|
362
|
+
2. Clear browser cache
|
|
363
|
+
3. Rebuild if project requires build
|
|
364
|
+
4. Check CSS specificity issues
|
|
365
|
+
|
|
366
|
+
### Problem: Fixes affecting other areas
|
|
367
|
+
|
|
368
|
+
1. Rollback changes
|
|
369
|
+
2. Use more specific selectors
|
|
370
|
+
3. Consider using CSS Modules or scoped styles
|
|
371
|
+
4. Consult user to confirm impact scope
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: webapp-testing
|
|
3
|
+
description: Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Web Application Testing
|
|
7
|
+
|
|
8
|
+
This skill enables comprehensive testing and debugging of local web applications using Playwright automation.
|
|
9
|
+
|
|
10
|
+
## When to Use This Skill
|
|
11
|
+
|
|
12
|
+
Use this skill when you need to:
|
|
13
|
+
|
|
14
|
+
- Test frontend functionality in a real browser
|
|
15
|
+
- Verify UI behavior and interactions
|
|
16
|
+
- Debug web application issues
|
|
17
|
+
- Capture screenshots for documentation or debugging
|
|
18
|
+
- Inspect browser console logs
|
|
19
|
+
- Validate form submissions and user flows
|
|
20
|
+
- Check responsive design across viewports
|
|
21
|
+
|
|
22
|
+
## Prerequisites
|
|
23
|
+
|
|
24
|
+
- Node.js installed on the system
|
|
25
|
+
- A locally running web application (or accessible URL)
|
|
26
|
+
- Playwright will be installed automatically if not present
|
|
27
|
+
|
|
28
|
+
## Core Capabilities
|
|
29
|
+
|
|
30
|
+
### 1. Browser Automation
|
|
31
|
+
|
|
32
|
+
- Navigate to URLs
|
|
33
|
+
- Click buttons and links
|
|
34
|
+
- Fill form fields
|
|
35
|
+
- Select dropdowns
|
|
36
|
+
- Handle dialogs and alerts
|
|
37
|
+
|
|
38
|
+
### 2. Verification
|
|
39
|
+
|
|
40
|
+
- Assert element presence
|
|
41
|
+
- Verify text content
|
|
42
|
+
- Check element visibility
|
|
43
|
+
- Validate URLs
|
|
44
|
+
- Test responsive behavior
|
|
45
|
+
|
|
46
|
+
### 3. Debugging
|
|
47
|
+
|
|
48
|
+
- Capture screenshots
|
|
49
|
+
- View console logs
|
|
50
|
+
- Inspect network requests
|
|
51
|
+
- Debug failed tests
|
|
52
|
+
|
|
53
|
+
## Usage Examples
|
|
54
|
+
|
|
55
|
+
### Example 1: Basic Navigation Test
|
|
56
|
+
|
|
57
|
+
```javascript
|
|
58
|
+
// Navigate to a page and verify title
|
|
59
|
+
await page.goto("http://localhost:3000");
|
|
60
|
+
const title = await page.title();
|
|
61
|
+
console.log("Page title:", title);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Example 2: Form Interaction
|
|
65
|
+
|
|
66
|
+
```javascript
|
|
67
|
+
// Fill out and submit a form
|
|
68
|
+
await page.fill("#username", "testuser");
|
|
69
|
+
await page.fill("#password", "password123");
|
|
70
|
+
await page.click('button[type="submit"]');
|
|
71
|
+
await page.waitForURL("**/dashboard");
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Example 3: Screenshot Capture
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
// Capture a screenshot for debugging
|
|
78
|
+
await page.screenshot({ path: "debug.png", fullPage: true });
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Guidelines
|
|
82
|
+
|
|
83
|
+
1. **Always verify the app is running** - Check that the local server is accessible before running tests
|
|
84
|
+
2. **Use explicit waits** - Wait for elements or navigation to complete before interacting
|
|
85
|
+
3. **Capture screenshots on failure** - Take screenshots to help debug issues
|
|
86
|
+
4. **Clean up resources** - Always close the browser when done
|
|
87
|
+
5. **Handle timeouts gracefully** - Set reasonable timeouts for slow operations
|
|
88
|
+
6. **Test incrementally** - Start with simple interactions before complex flows
|
|
89
|
+
7. **Use selectors wisely** - Prefer data-testid or role-based selectors over CSS classes
|
|
90
|
+
|
|
91
|
+
## Common Patterns
|
|
92
|
+
|
|
93
|
+
### Pattern: Wait for Element
|
|
94
|
+
|
|
95
|
+
```javascript
|
|
96
|
+
await page.waitForSelector("#element-id", { state: "visible" });
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Pattern: Check if Element Exists
|
|
100
|
+
|
|
101
|
+
```javascript
|
|
102
|
+
const exists = (await page.locator("#element-id").count()) > 0;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Pattern: Get Console Logs
|
|
106
|
+
|
|
107
|
+
```javascript
|
|
108
|
+
page.on("console", (msg) => console.log("Browser log:", msg.text()));
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Pattern: Handle Errors
|
|
112
|
+
|
|
113
|
+
```javascript
|
|
114
|
+
try {
|
|
115
|
+
await page.click("#button");
|
|
116
|
+
} catch (error) {
|
|
117
|
+
await page.screenshot({ path: "error.png" });
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Limitations
|
|
123
|
+
|
|
124
|
+
- Requires Node.js environment
|
|
125
|
+
- Cannot test native mobile apps (use React Native Testing Library instead)
|
|
126
|
+
- May have issues with complex authentication flows
|
|
127
|
+
- Some modern frameworks may require specific configuration
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper utilities for web application testing with Playwright
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Wait for a condition to be true with timeout
|
|
7
|
+
* @param {Function} condition - Function that returns boolean
|
|
8
|
+
* @param {number} timeout - Timeout in milliseconds
|
|
9
|
+
* @param {number} interval - Check interval in milliseconds
|
|
10
|
+
*/
|
|
11
|
+
async function waitForCondition(condition, timeout = 5000, interval = 100) {
|
|
12
|
+
const startTime = Date.now();
|
|
13
|
+
while (Date.now() - startTime < timeout) {
|
|
14
|
+
if (await condition()) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
18
|
+
}
|
|
19
|
+
throw new Error("Condition not met within timeout");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Capture browser console logs
|
|
24
|
+
* @param {Page} page - Playwright page object
|
|
25
|
+
* @returns {Array} Array of console messages
|
|
26
|
+
*/
|
|
27
|
+
function captureConsoleLogs(page) {
|
|
28
|
+
const logs = [];
|
|
29
|
+
page.on("console", (msg) => {
|
|
30
|
+
logs.push({
|
|
31
|
+
type: msg.type(),
|
|
32
|
+
text: msg.text(),
|
|
33
|
+
timestamp: new Date().toISOString(),
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
return logs;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Take screenshot with automatic naming
|
|
41
|
+
* @param {Page} page - Playwright page object
|
|
42
|
+
* @param {string} name - Base name for screenshot
|
|
43
|
+
*/
|
|
44
|
+
async function captureScreenshot(page, name) {
|
|
45
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
46
|
+
const filename = `${name}-${timestamp}.png`;
|
|
47
|
+
await page.screenshot({ path: filename, fullPage: true });
|
|
48
|
+
console.log(`Screenshot saved: ${filename}`);
|
|
49
|
+
return filename;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = {
|
|
53
|
+
waitForCondition,
|
|
54
|
+
captureConsoleLogs,
|
|
55
|
+
captureScreenshot,
|
|
56
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Claude Code working notes
|
|
2
|
+
|
|
3
|
+
{{PROJECT_DESCRIPTION}}
|
|
4
|
+
|
|
5
|
+
This file is loaded into every Claude Code session in this repo. Keep it tight; link out to `docs/` for depth.
|
|
6
|
+
|
|
7
|
+
## Communication
|
|
8
|
+
|
|
9
|
+
Layer these on top of the system defaults:
|
|
10
|
+
|
|
11
|
+
- Factual tone. Don't say "fixed!" / "works!" — say "changes applied" or "ready for testing". **Ship ≠ verified** until the human confirms end-to-end.
|
|
12
|
+
- Push back on weak assumptions instead of agreeing politely.
|
|
13
|
+
- No PII in logs. No ad-hoc loggers in production app code — use the project's logging convention. Log route templates, not raw paths. Never log tokens, cookies, email addresses, IPs, or authorization headers.
|
|
14
|
+
|
|
15
|
+
## Model strategy
|
|
16
|
+
|
|
17
|
+
{{MODEL_STRATEGY}}
|
|
18
|
+
|
|
19
|
+
{{STACK_FRAGMENTS}}
|
|
20
|
+
|
|
21
|
+
## Code review (local, before push)
|
|
22
|
+
|
|
23
|
+
Review happens **locally before `git push`** — run a local code review with the built-in `/code-review` skill so PRs open already-reviewed.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git fetch origin # so origin/main is current before scoping the diff
|
|
27
|
+
# then run a local code review with the built-in /code-review skill against origin/main
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Triage: fix **Critical** + **Warning**; **Info** at discretion. Cap at ~2 passes. Compare against `origin/main`, not local `main` (local main is often stale). For deeper passes the built-in `/security-review` command is also available. Skill: [`.claude/skills/code-review/SKILL.md`](.claude/skills/code-review/SKILL.md).
|
|
31
|
+
|
|
32
|
+
## Git / PR conventions
|
|
33
|
+
|
|
34
|
+
- **Never** `git push origin main`. Direct main commits go via PR.
|
|
35
|
+
- **Open PRs as draft** (`gh pr create --draft`); mark Ready only after the local CLI review is resolved and checks are green.
|
|
36
|
+
- Branches: `agent/<phase-or-project-slug>` for batches, `agent/<n>-<slug>` for single-issue work.
|
|
37
|
+
- Commit messages: `type(scope): subject (#issue)`. Types: `feat | fix | chore | docs | test | refactor | style | perf | build | ci | revert`. No `enh:` — use `feat:`.
|
|
38
|
+
- PR closes syntax: **one keyword per line**. `Closes #1, #2` only closes #1 — use `Closes #1` then `Closes #2` on separate lines.
|
|
39
|
+
- Stacked branches: after each upstream merge, `git fetch origin && git rebase origin/main`; already-applied commits → `git rebase --skip`; then `git push --force-with-lease`. **Never** `git push --force`.
|
|
40
|
+
- Write PR/issue/commit bodies to a file under `tmp/` with the Write tool, then pass `--body-file`/`--file`. **No heredocs** — they mangle newlines.
|
|
41
|
+
- Commit/push only when the user asks. End commit messages with the `Co-Authored-By: Claude` trailer.
|
|
42
|
+
|
|
43
|
+
## Filing issues
|
|
44
|
+
|
|
45
|
+
1. **Investigate first** — search, root cause, real fix. No band-aids.
|
|
46
|
+
2. **Write the body to `tmp/issue-body-{slug}.md`** with the Write tool (no heredocs).
|
|
47
|
+
3. **Create with `gh`**: `gh issue create --body-file tmp/issue-body-{slug}.md`.
|
|
48
|
+
4. Report back: issue number, URL, short RCA + fix summary, labels.
|
|
49
|
+
|
|
50
|
+
Quality over speed. Typos / one-liners — just fix.
|
|
51
|
+
|
|
52
|
+
## Tool preference order
|
|
53
|
+
|
|
54
|
+
Prefer the most direct, scriptable tool first; fall back to MCP, then manual:
|
|
55
|
+
|
|
56
|
+
| Need | First | Fallback |
|
|
57
|
+
| ----------------------------- | -------------------------------- | ------------------------------------------- |
|
|
58
|
+
| GitHub issues / PRs / Actions | `gh` CLI | `github` MCP (when `gh` auth/network fails) |
|
|
59
|
+
| GitHub ProjectV2 (boards) | `gh project` / `gh api graphql` | — MCP can't do ProjectV2 |
|
|
60
|
+
| Browser automation (testing) | `playwright` MCP | direct Playwright API |
|
|
61
|
+
| Browser debugging (UI) | `chrome-devtools` MCP | manual DevTools |
|
|
62
|
+
|
|
63
|
+
General rule: **gh CLI > MCP > manual/UI fallback.**
|
|
64
|
+
|
|
65
|
+
## MCP servers
|
|
66
|
+
|
|
67
|
+
{{MCP_SERVERS}}
|
|
68
|
+
|
|
69
|
+
Project-scoped config lives in [`.mcp.json`](.mcp.json). Approve each server on first startup.
|
|
70
|
+
|
|
71
|
+
## Slash commands
|
|
72
|
+
|
|
73
|
+
Imported into [`.claude/commands/`](.claude/commands/):
|
|
74
|
+
|
|
75
|
+
{{COMMANDS_LIST}}
|
|
76
|
+
|
|
77
|
+
## Hooks
|
|
78
|
+
|
|
79
|
+
A `PostToolUse` hook on `Edit|Write|MultiEdit` runs `.claude/hooks/post-edit-reminders.sh`, which emits one-time nudges after edits to sensitive files. It is wired in [`.claude/settings.json`](.claude/settings.json).
|
|
80
|
+
|
|
81
|
+
## Memory & rules
|
|
82
|
+
|
|
83
|
+
When the user says "remember this" / "create a rule" — drop a memory file in the memory dir (format in the system prompt). If the guidance should apply to **anyone** in this repo, add it here or to a nested `CLAUDE.md` instead. Don't ask first — "remember" means write it.
|
|
84
|
+
|
|
85
|
+
## Lessons
|
|
86
|
+
|
|
87
|
+
{{LESSONS_NOTE}}
|
|
88
|
+
|
|
89
|
+
<!--
|
|
90
|
+
ENGSYS:PROJECT-FACTS region.
|
|
91
|
+
The installer (and/or the model during init) fills the block below with project-specific
|
|
92
|
+
facts: stack details, service names, conventions, key paths, north star, etc.
|
|
93
|
+
`engsys update` regenerates everything OUTSIDE this region but NEVER overwrites what's
|
|
94
|
+
between the START and END markers. Hand-edit freely inside it.
|
|
95
|
+
-->
|
|
96
|
+
<!-- ENGSYS:PROJECT-FACTS:START -->
|
|
97
|
+
{{PROJECT_FACTS}}
|
|
98
|
+
<!-- ENGSYS:PROJECT-FACTS:END -->
|