opencastle 0.32.12 → 0.33.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 -93
- package/README.md +5 -3
- package/package.json +2 -2
- package/src/dashboard/dist/data/convoys/demo-api-v2.json +3 -3
- package/src/dashboard/dist/data/convoys/demo-auth-revamp.json +4 -4
- package/src/dashboard/dist/data/convoys/demo-dashboard-ui.json +12 -12
- package/src/dashboard/dist/data/convoys/demo-data-pipeline.json +3 -3
- package/src/dashboard/dist/data/convoys/demo-deploy-ci.json +1 -1
- package/src/dashboard/dist/data/convoys/demo-docs-update.json +7 -7
- package/src/dashboard/dist/data/convoys/demo-perf-opt.json +4 -4
- package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
- package/src/dashboard/public/data/convoys/demo-api-v2.json +3 -3
- package/src/dashboard/public/data/convoys/demo-auth-revamp.json +4 -4
- package/src/dashboard/public/data/convoys/demo-dashboard-ui.json +12 -12
- package/src/dashboard/public/data/convoys/demo-data-pipeline.json +3 -3
- package/src/dashboard/public/data/convoys/demo-deploy-ci.json +1 -1
- package/src/dashboard/public/data/convoys/demo-docs-update.json +7 -7
- package/src/dashboard/public/data/convoys/demo-perf-opt.json +4 -4
- package/src/orchestrator/customizations/stack/sanity-config.md +43 -0
- package/src/orchestrator/customizations/stack/supabase-config.md +53 -0
- package/src/orchestrator/plugins/astro/REFERENCE.md +5 -0
- package/src/orchestrator/plugins/astro/SKILL.md +22 -29
- package/src/orchestrator/plugins/chrome-devtools/REFERENCE.md +9 -0
- package/src/orchestrator/plugins/chrome-devtools/SKILL.md +10 -55
- package/src/orchestrator/plugins/contentful/REFERENCE.md +16 -0
- package/src/orchestrator/plugins/contentful/SKILL.md +69 -29
- package/src/orchestrator/plugins/convex/REFERENCE.md +9 -0
- package/src/orchestrator/plugins/convex/SKILL.md +13 -1
- package/src/orchestrator/plugins/cypress/REFERENCE.md +5 -0
- package/src/orchestrator/plugins/cypress/SKILL.md +29 -93
- package/src/orchestrator/plugins/figma/REFERENCE.md +18 -0
- package/src/orchestrator/plugins/figma/SKILL.md +41 -66
- package/src/orchestrator/plugins/jira/REFERENCE.md +9 -0
- package/src/orchestrator/plugins/jira/SKILL.md +26 -114
- package/src/orchestrator/plugins/linear/SKILL.md +42 -109
- package/src/orchestrator/plugins/netlify/REFERENCE.md +33 -0
- package/src/orchestrator/plugins/netlify/SKILL.md +34 -64
- package/src/orchestrator/plugins/nextjs/REFERENCE.md +73 -0
- package/src/orchestrator/plugins/nextjs/SKILL.md +49 -138
- package/src/orchestrator/plugins/notion/SKILL.md +26 -168
- package/src/orchestrator/plugins/notion/TEMPLATES.md +88 -0
- package/src/orchestrator/plugins/nx/REFERENCE.md +10 -0
- package/src/orchestrator/plugins/nx/SKILL.md +12 -12
- package/src/orchestrator/plugins/playwright/REFERENCE.md +12 -0
- package/src/orchestrator/plugins/playwright/SKILL.md +33 -98
- package/src/orchestrator/plugins/prisma/REFERENCE.md +42 -0
- package/src/orchestrator/plugins/prisma/SKILL.md +18 -68
- package/src/orchestrator/plugins/resend/REFERENCE.md +61 -0
- package/src/orchestrator/plugins/resend/SKILL.md +23 -137
- package/src/orchestrator/plugins/sanity/SKILL.md +50 -3
- package/src/orchestrator/plugins/slack/REFERENCE.md +24 -0
- package/src/orchestrator/plugins/slack/SKILL.md +36 -111
- package/src/orchestrator/plugins/strapi/REFERENCE.md +35 -0
- package/src/orchestrator/plugins/strapi/SKILL.md +60 -24
- package/src/orchestrator/plugins/supabase/REFERENCE.md +9 -0
- package/src/orchestrator/plugins/supabase/SKILL.md +44 -16
- package/src/orchestrator/plugins/teams/REFERENCE.md +36 -0
- package/src/orchestrator/plugins/teams/SKILL.md +35 -85
- package/src/orchestrator/plugins/trello/REFERENCE.md +9 -0
- package/src/orchestrator/plugins/trello/SKILL.md +25 -97
- package/src/orchestrator/plugins/turborepo/REFERENCE.md +9 -0
- package/src/orchestrator/plugins/turborepo/SKILL.md +13 -1
- package/src/orchestrator/plugins/vercel/SKILL.md +45 -52
- package/src/orchestrator/plugins/vitest/SKILL.md +10 -14
- package/src/orchestrator/prompts/create-skill.prompt.md +62 -20
- package/src/orchestrator/prompts/generate-convoy.prompt.md +6 -0
- package/src/orchestrator/prompts/generate-prd.prompt.md +4 -0
- package/src/orchestrator/skills/accessibility-standards/REFERENCE.md +34 -0
- package/src/orchestrator/skills/accessibility-standards/SKILL.md +6 -3
- package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +48 -0
- package/src/orchestrator/skills/agent-hooks/SKILL.md +41 -65
- package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +49 -0
- package/src/orchestrator/skills/agent-memory/SKILL.md +30 -67
- package/src/orchestrator/skills/api-patterns/SKILL.md +29 -1
- package/src/orchestrator/skills/backbone-scaffolding/EXAMPLES.md +16 -0
- package/src/orchestrator/skills/backbone-scaffolding/SKILL.md +99 -0
- package/src/orchestrator/skills/code-commenting/SKILL.md +1 -1
- package/src/orchestrator/skills/context-map/REFERENCE.md +70 -0
- package/src/orchestrator/skills/context-map/SKILL.md +28 -55
- package/src/orchestrator/skills/data-engineering/REFERENCE.md +55 -0
- package/src/orchestrator/skills/data-engineering/SKILL.md +40 -34
- package/src/orchestrator/skills/decomposition/REFERENCE.md +28 -0
- package/src/orchestrator/skills/decomposition/SKILL.md +15 -30
- package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +31 -65
- package/src/orchestrator/skills/documentation-standards/SKILL.md +31 -50
- package/src/orchestrator/skills/documentation-standards/WRITING-GUIDE.md +39 -0
- package/src/orchestrator/skills/fast-review/REFERENCE.md +30 -0
- package/src/orchestrator/skills/fast-review/SKILL.md +11 -31
- package/src/orchestrator/skills/frontend-design/COMPONENTS.md +113 -0
- package/src/orchestrator/skills/frontend-design/REFERENCE.md +36 -0
- package/src/orchestrator/skills/frontend-design/SKILL.md +36 -85
- package/src/orchestrator/skills/git-workflow/SKILL.md +13 -2
- package/src/orchestrator/skills/memory-merger/REFERENCE.md +20 -0
- package/src/orchestrator/skills/memory-merger/SKILL.md +29 -38
- package/src/orchestrator/skills/observability-logging/SKILL.md +5 -12
- package/src/orchestrator/skills/orchestration-protocols/REFERENCE.md +42 -0
- package/src/orchestrator/skills/orchestration-protocols/SKILL.md +54 -41
- package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +55 -0
- package/src/orchestrator/skills/panel-majority-vote/SKILL.md +30 -75
- package/src/orchestrator/skills/performance-optimization/SKILL.md +41 -1
- package/src/orchestrator/skills/project-consistency/SKILL.md +50 -89
- package/src/orchestrator/skills/project-consistency/TEMPLATES.md +39 -0
- package/src/orchestrator/skills/react-development/REFERENCE.md +7 -0
- package/src/orchestrator/skills/react-development/SKILL.md +50 -42
- package/src/orchestrator/skills/security-hardening/SKILL.md +88 -1
- package/src/orchestrator/skills/self-improvement/LESSON-CATEGORIES.md +36 -0
- package/src/orchestrator/skills/self-improvement/SKILL.md +19 -25
- package/src/orchestrator/skills/seo-patterns/REFERENCE.md +54 -0
- package/src/orchestrator/skills/seo-patterns/SKILL.md +20 -88
- package/src/orchestrator/skills/session-checkpoints/CHECKPOINT-TEMPLATE.md +58 -0
- package/src/orchestrator/skills/session-checkpoints/SKILL.md +34 -58
- package/src/orchestrator/skills/team-lead-reference/SKILL.md +37 -30
- package/src/orchestrator/skills/testing-workflow/SKILL.md +55 -2
- package/src/orchestrator/skills/validation-gates/REFERENCE.md +50 -0
- package/src/orchestrator/skills/validation-gates/SKILL.md +39 -35
|
@@ -42,28 +42,28 @@
|
|
|
42
42
|
"name": "reports/bundle-analysis.json",
|
|
43
43
|
"type": "json",
|
|
44
44
|
"task_id": "perf-t1",
|
|
45
|
-
"created_at": "2026-
|
|
45
|
+
"created_at": "2026-04-04T06:06:04.354Z"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"id": "artifact-demo-perf-opt-reports-web-vitals-improvement-md",
|
|
49
49
|
"name": "reports/web-vitals-improvement.md",
|
|
50
50
|
"type": "summary",
|
|
51
51
|
"task_id": "perf-t4",
|
|
52
|
-
"created_at": "2026-
|
|
52
|
+
"created_at": "2026-04-04T06:06:04.354Z"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"id": "artifact-demo-perf-opt-src-charts-index-ts",
|
|
56
56
|
"name": "src/charts/index.ts",
|
|
57
57
|
"type": "file",
|
|
58
58
|
"task_id": "perf-t2",
|
|
59
|
-
"created_at": "2026-
|
|
59
|
+
"created_at": "2026-04-04T06:06:04.354Z"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"id": "artifact-demo-perf-opt-src-utils-image-loader-ts",
|
|
63
63
|
"name": "src/utils/image-loader.ts",
|
|
64
64
|
"type": "file",
|
|
65
65
|
"task_id": "perf-t3",
|
|
66
|
-
"created_at": "2026-
|
|
66
|
+
"created_at": "2026-04-04T06:06:04.354Z"
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
69
|
"has_more_events": false,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Sanity CMS Configuration
|
|
2
|
+
|
|
3
|
+
<!-- Populated by `opencastle init` based on detected Sanity project. -->
|
|
4
|
+
|
|
5
|
+
Project-specific Sanity CMS details referenced by the `sanity-cms` skill.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
<!-- Sanity project ID, dataset, API version, studio location. -->
|
|
10
|
+
|
|
11
|
+
| Setting | Value |
|
|
12
|
+
|---------|-------|
|
|
13
|
+
| Project ID | |
|
|
14
|
+
| Dataset | |
|
|
15
|
+
| API Version | |
|
|
16
|
+
| Studio Path | |
|
|
17
|
+
|
|
18
|
+
## Plugins
|
|
19
|
+
|
|
20
|
+
<!-- List Sanity plugins and their purpose. -->
|
|
21
|
+
|
|
22
|
+
## Document Types
|
|
23
|
+
|
|
24
|
+
<!-- List document types with key fields. -->
|
|
25
|
+
|
|
26
|
+
| Document Type | Key Fields | Description |
|
|
27
|
+
|--------------|------------|-------------|
|
|
28
|
+
| | | |
|
|
29
|
+
|
|
30
|
+
## GROQ Examples
|
|
31
|
+
|
|
32
|
+
<!-- Provide representative GROQ query examples. -->
|
|
33
|
+
|
|
34
|
+
```groq
|
|
35
|
+
// Example: fetch all published documents of a type
|
|
36
|
+
*[_type == "page" && !(_id in path("drafts.**"))]{
|
|
37
|
+
_id, title, slug
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Key Files
|
|
42
|
+
|
|
43
|
+
<!-- List key schema, config, and query files. -->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Supabase Configuration
|
|
2
|
+
|
|
3
|
+
<!-- Populated by `opencastle init` based on detected Supabase project. -->
|
|
4
|
+
|
|
5
|
+
Project-specific Supabase details referenced by the `supabase-database` skill.
|
|
6
|
+
|
|
7
|
+
## Configuration
|
|
8
|
+
|
|
9
|
+
<!-- Supabase project URL, anon key location, service role key location. -->
|
|
10
|
+
|
|
11
|
+
| Setting | Value |
|
|
12
|
+
|---------|-------|
|
|
13
|
+
| Project URL | |
|
|
14
|
+
| Anon Key Env | `NEXT_PUBLIC_SUPABASE_URL` |
|
|
15
|
+
| Service Role Env | `SUPABASE_SERVICE_ROLE_KEY` |
|
|
16
|
+
|
|
17
|
+
## Database Schema
|
|
18
|
+
|
|
19
|
+
### Core Tables
|
|
20
|
+
|
|
21
|
+
<!-- List tables with their purpose and RLS status. -->
|
|
22
|
+
|
|
23
|
+
| Table | Purpose | RLS |
|
|
24
|
+
|-------|---------|-----|
|
|
25
|
+
| | | |
|
|
26
|
+
|
|
27
|
+
### Role System
|
|
28
|
+
|
|
29
|
+
<!-- Describe roles and their permissions. -->
|
|
30
|
+
|
|
31
|
+
| Role | Permissions |
|
|
32
|
+
|------|------------|
|
|
33
|
+
| | |
|
|
34
|
+
|
|
35
|
+
## Auth Flow
|
|
36
|
+
|
|
37
|
+
<!-- Authentication pattern: email/password, OAuth providers, session management. -->
|
|
38
|
+
|
|
39
|
+
## Migration History
|
|
40
|
+
|
|
41
|
+
<!-- List applied migrations in order. -->
|
|
42
|
+
|
|
43
|
+
| Migration | Date | Description |
|
|
44
|
+
|-----------|------|-------------|
|
|
45
|
+
| | | |
|
|
46
|
+
|
|
47
|
+
## RLS Policies
|
|
48
|
+
|
|
49
|
+
<!-- Document key RLS policies and their purpose. -->
|
|
50
|
+
|
|
51
|
+
## Key Files
|
|
52
|
+
|
|
53
|
+
<!-- List key config, migration, and type files. -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: astro-framework
|
|
3
|
-
description: "
|
|
3
|
+
description: "Creates pages/layouts, defines content collections, configures hydration directives, and wires integrations. Use when adding or modifying Astro pages, layouts, components, or content collections. Trigger terms: Astro, content collection, client:load, client:visible, astro:content"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
@@ -21,23 +21,22 @@ src/
|
|
|
21
21
|
└── assets/ # processed images
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Implement Components
|
|
25
25
|
|
|
26
|
-
**Default: Zero JS** — `.astro` components render
|
|
26
|
+
**Default: Zero JS** — author `.astro` components that render HTML with no client-side JavaScript where possible.
|
|
27
27
|
|
|
28
|
-
**Islands Architecture** —
|
|
28
|
+
**Islands Architecture** — hydrate interactivity only where needed using `client:*` directives.
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Component Example (concise)
|
|
31
31
|
|
|
32
32
|
```astro
|
|
33
33
|
---
|
|
34
34
|
interface Props { title: string; description?: string; }
|
|
35
35
|
const { title, description = 'Default description' } = Astro.props;
|
|
36
|
-
const data = await fetch('https://api.example.com/data').then(r => r.json());
|
|
37
36
|
---
|
|
38
37
|
<section>
|
|
39
38
|
<h2>{title}</h2>
|
|
40
|
-
|
|
39
|
+
<p>{description}</p>
|
|
41
40
|
</section>
|
|
42
41
|
<style>
|
|
43
42
|
section { max-width: 800px; margin: 0 auto; }
|
|
@@ -46,18 +45,22 @@ const data = await fetch('https://api.example.com/data').then(r => r.json());
|
|
|
46
45
|
|
|
47
46
|
### Client Directives (Islands)
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|-----------|-----------------|----------|
|
|
51
|
-
| `client:load` | Immediately on page load | Critical interactive UI |
|
|
52
|
-
| `client:idle` | After page is idle | Non-critical UI (analytics widgets) |
|
|
53
|
-
| `client:visible` | When element enters viewport | Below-the-fold components |
|
|
54
|
-
| `client:media="(max-width: 768px)"` | When media query matches | Mobile-only interactivity |
|
|
55
|
-
| `client:only="react"` | Client-only, no SSR | Components that can't server-render |
|
|
48
|
+
Use only the hydration directive required by the interaction to minimize shipped JS. Typical mappings:
|
|
56
49
|
|
|
57
|
-
|
|
50
|
+
- `client:load` — immediate hydration for critical interactive widgets
|
|
51
|
+
- `client:idle` — non-critical behavior after page idle
|
|
52
|
+
- `client:visible` — hydrate when visible (lazy)
|
|
53
|
+
- `client:media` — hydrate on media match
|
|
54
|
+
- `client:only` — last resort for non-SSR-able components
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
## Content Collections — Quick Workflow: add a new collection
|
|
57
|
+
1. Add collection schema in `src/content.config.ts` using `defineCollection` and Zod validators.
|
|
58
|
+
2. Create the folder under `src/content/<collection>` and add one sample `.md` or `.mdx` content file with frontmatter.
|
|
59
|
+
3. Run `pnpm build` and `pnpm dev` → run `node scripts/validate-content.js` (or your project's validation script) to verify typed collection imports.
|
|
60
|
+
4. Add a smoke query in a page that imports the collection (e.g., `const posts = await getCollection('blog')`) and confirm build-time typing.
|
|
61
|
+
5. Validation: ensure `pnpm build` exits zero and TypeScript reports no errors for collection types.
|
|
60
62
|
|
|
63
|
+
Define collections in `src/content.config.ts` (Astro v5+) using `astro:content` and export typed collections.
|
|
61
64
|
```ts
|
|
62
65
|
import { defineCollection, z } from 'astro:content';
|
|
63
66
|
import { glob } from 'astro/loaders';
|
|
@@ -117,16 +120,6 @@ Use `astro add` for react, tailwind, mdx, sitemap, node, vercel, netlify, cloudf
|
|
|
117
120
|
- **API routes**: Export `GET`/`POST` handlers from `src/pages/api/*.ts` returning `new Response(...)`.
|
|
118
121
|
- **Actions**: Use `defineAction` in `src/actions/index.ts` for type-safe server mutations with Zod validation.
|
|
119
122
|
|
|
120
|
-
## Anti-Patterns
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|-------------|---------------|-----------------|
|
|
124
|
-
| `client:load` on every component | Defeats zero-JS benefit, bloats bundle | Use `client:idle` or `client:visible` for non-critical UI |
|
|
125
|
-
| Importing large JS libraries in `.astro` | Runs at build but bundles nothing useful | Import in framework components with `client:*` |
|
|
126
|
-
| Skipping content collections for blog/docs | Manual file handling is error-prone | Use content collections with typed schemas |
|
|
127
|
-
| Hardcoding data in pages | Not maintainable, no type safety | Use content collections or fetch from APIs |
|
|
128
|
-
| Using `client:only` when SSR works | Loses SEO benefits and fast first paint | Use `client:load` or `client:visible` instead |
|
|
129
|
-
| Giant monolithic pages | Hard to maintain and test | Split into layouts + reusable components |
|
|
130
|
-
| Ignoring `astro add` for integrations | Manual config is error-prone | Use `astro add` for official integrations |
|
|
131
|
-
| Missing `alt` on images | Accessibility violation | Always provide descriptive `alt` text |
|
|
132
|
-
| Not using `astro:assets` for images | Missing optimization | Use `<Image>` from `astro:assets` |
|
|
123
|
+
## Anti-Patterns (moved to REFERENCE.md)
|
|
124
|
+
|
|
125
|
+
Extracted anti-patterns and SSR configuration details are available in `REFERENCE.md` in this directory to keep this skill focused and concise.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
> Parent: [SKILL.md](./SKILL.md)
|
|
2
|
+
|
|
3
|
+
Last Updated: 2026-03-31
|
|
4
|
+
|
|
5
|
+
Reference: Chrome DevTools MCP commands and responsive checklist
|
|
6
|
+
|
|
7
|
+
- Full MCP command table with parameter examples and common payload shapes
|
|
8
|
+
- Responsive verification scripts and `evaluate_script()` snippets
|
|
9
|
+
- Performance trace capture and analysis commands
|
|
@@ -1,27 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser-testing
|
|
3
|
-
description: "Chrome DevTools MCP
|
|
3
|
+
description: "Drive real browsers via Chrome DevTools MCP: navigate pages, capture snapshots, run responsive checks, and collect console/perf traces. Use when the user mentions: 'validate UI change in Chrome', 'capture a screenshot', 'run responsive checks', or 'collect console logs'. Trigger terms: browser testing, DevTools, console logs, screenshot, responsive testing"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
7
7
|
|
|
8
8
|
# Browser Testing with Chrome DevTools MCP
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
For project-specific test app, selectors, suites, and breakpoint config, see [testing-config.md](../../.opencastle/stack/testing-config.md).
|
|
11
11
|
|
|
12
|
-
## Purpose
|
|
13
|
-
|
|
14
|
-
After any UI change, validate in a real browser:
|
|
15
|
-
1. Start dev server if not running.
|
|
16
|
-
2. Navigate to affected pages.
|
|
17
|
-
3. Interact with UI elements (click, fill, filter).
|
|
18
|
-
4. Validate behavior and appearance.
|
|
19
|
-
5. Test edge cases (empty states, errors, boundaries).
|
|
20
|
-
6. Document findings with screenshots and pass/fail.
|
|
21
|
-
|
|
22
|
-
## Pre-Test Build Verification
|
|
23
|
-
|
|
24
|
-
**CRITICAL: Always build before browser testing.** Testing stale code wastes time. See [testing-config.md](../../.opencastle/stack/testing-config.md) for the specific build and serve commands.
|
|
25
12
|
|
|
26
13
|
## Chrome MCP Tools Reference
|
|
27
14
|
|
|
@@ -85,30 +72,27 @@ mcp_chrome-devtoo_performance_analyze_insight({ insightSetId: 'set_id', insightN
|
|
|
85
72
|
|
|
86
73
|
### 1. Setup
|
|
87
74
|
|
|
88
|
-
Start the dev server
|
|
75
|
+
Start the dev server.
|
|
89
76
|
|
|
90
77
|
### 2. Initial State
|
|
91
78
|
|
|
92
79
|
```javascript
|
|
93
80
|
mcp_chrome-devtoo_navigate_page({ type: 'url', url: 'http://localhost:<port>/places' })
|
|
94
81
|
mcp_chrome-devtoo_wait_for({ text: 'places' })
|
|
82
|
+
// If wait_for times out: verify dev server is running and URL is correct
|
|
95
83
|
mcp_chrome-devtoo_evaluate_script({
|
|
96
84
|
function: '() => ({ url: window.location.href, title: document.title })'
|
|
97
85
|
})
|
|
98
86
|
```
|
|
99
87
|
|
|
100
|
-
### 3. Test Interactions
|
|
88
|
+
### 3–4. Test Interactions & Edge Cases
|
|
101
89
|
|
|
102
90
|
```javascript
|
|
103
91
|
mcp_chrome-devtoo_click({ uid: 'filter_uid' })
|
|
104
92
|
mcp_chrome-devtoo_evaluate_script({
|
|
105
93
|
function: '() => document.querySelectorAll(".place-card").length'
|
|
106
94
|
})
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 4. Test Edge Cases
|
|
110
95
|
|
|
111
|
-
```javascript
|
|
112
96
|
mcp_chrome-devtoo_navigate_page({
|
|
113
97
|
type: 'url', url: 'http://localhost:<port>/places?q=nonexistent-venue-xyz'
|
|
114
98
|
})
|
|
@@ -121,11 +105,12 @@ mcp_chrome-devtoo_evaluate_script({
|
|
|
121
105
|
|
|
122
106
|
```javascript
|
|
123
107
|
mcp_chrome-devtoo_list_console_messages()
|
|
108
|
+
// If errors found: fix source, rebuild, reload page, and re-run from step 2
|
|
124
109
|
```
|
|
125
110
|
|
|
126
|
-
### 6. Responsive Breakpoint Testing
|
|
111
|
+
### 6. Responsive Breakpoint Testing
|
|
127
112
|
|
|
128
|
-
|
|
113
|
+
Test every UI change at all responsive breakpoints — most layout bugs surface at smaller viewports. Define breakpoints in your project's testing config.
|
|
129
114
|
|
|
130
115
|
#### How to Resize
|
|
131
116
|
|
|
@@ -138,24 +123,8 @@ mcp_chrome-devtoo_resize_page({ width: 1440, height: 900 }) // Desktop
|
|
|
138
123
|
|
|
139
124
|
#### Per-Breakpoint Verification
|
|
140
125
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
At **each** breakpoint, check:
|
|
144
|
-
|
|
145
|
-
- [ ] Layout adapts correctly — no horizontal overflow
|
|
146
|
-
- [ ] Text truncates or wraps cleanly — no overlap
|
|
147
|
-
- [ ] Interactive elements have adequate spacing and touch targets
|
|
148
|
-
- [ ] Navigation and panels collapse/expand as expected
|
|
149
|
-
- [ ] Images and cards resize proportionally
|
|
150
|
-
|
|
151
|
-
#### Responsive Testing Anti-Patterns
|
|
152
|
-
|
|
153
|
-
| Anti-Pattern | Correct Approach |
|
|
154
|
-
|---|---|
|
|
155
|
-
| Testing only at desktop width | Test at all project-defined breakpoints |
|
|
156
|
-
| Skipping resize because "it uses Tailwind" | Tailwind classes can be wrong — always verify visually |
|
|
157
|
-
| Only checking layout, not interactions | Test filter drawers, dropdowns, and modals at each size |
|
|
158
|
-
| Taking 3 screenshots (one per breakpoint) | Use `evaluate_script()` to check layout; save screenshots for failures |
|
|
126
|
+
- Verify interactions at each size (not layout only)
|
|
127
|
+
- Prefer `evaluate_script()` assertions over screenshots; reserve screenshots for failures
|
|
159
128
|
|
|
160
129
|
## Regression Re-Test Workflow
|
|
161
130
|
|
|
@@ -169,20 +138,6 @@ When re-testing after a fix:
|
|
|
169
138
|
|
|
170
139
|
If any test still fails: analyze, fix, repeat. Do NOT stop.
|
|
171
140
|
|
|
172
|
-
## Validation Checklist
|
|
173
|
-
|
|
174
|
-
- [ ] Page loads without errors (check console)
|
|
175
|
-
- [ ] Changed component renders correctly
|
|
176
|
-
- [ ] Interactive elements respond to clicks/input
|
|
177
|
-
- [ ] Filters/sorting produce correct results
|
|
178
|
-
- [ ] URL parameters sync with UI state
|
|
179
|
-
- [ ] Empty states display when appropriate
|
|
180
|
-
- [ ] Error states handle gracefully
|
|
181
|
-
- [ ] Loading states appear during async operations
|
|
182
|
-
- [ ] Keyboard navigation works, focus is visible
|
|
183
|
-
- [ ] **Responsive: Tested at Mobile, Tablet, and Desktop breakpoints**
|
|
184
|
-
- [ ] **Responsive: No horizontal overflow at any breakpoint**
|
|
185
|
-
- [ ] **Responsive: Interactions work at every breakpoint (drawers, dropdowns, modals)**
|
|
186
141
|
|
|
187
142
|
## Context Management
|
|
188
143
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
> Parent: [SKILL.md](./SKILL.md)
|
|
2
|
+
|
|
3
|
+
# Contentful Reference (REFERENCE.md)
|
|
4
|
+
|
|
5
|
+
Last Updated: 2026-03-31
|
|
6
|
+
|
|
7
|
+
## Migration & Rollback Patterns
|
|
8
|
+
|
|
9
|
+
- Best safe rollback: perform migrations in a sandbox environment and validate before promoting to `master`. If a migration is faulty, delete the sandbox and recreate it from `master` then re-run a corrected migration.
|
|
10
|
+
- Advanced rollback: write reverse migrations that undo schema changes (when feasible) and test them in sandbox.
|
|
11
|
+
|
|
12
|
+
## Validation Checklist
|
|
13
|
+
|
|
14
|
+
1. Query a representative sample of entries after migration and confirm required fields and unique constraints.
|
|
15
|
+
2. Run the site's build against sandbox content to catch runtime rendering issues.
|
|
16
|
+
3. Run integration tests that depend on the modified content types.
|
|
@@ -1,45 +1,85 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: contentful-cms
|
|
3
|
-
description: "Contentful
|
|
3
|
+
description: "Creates Contentful content types, queries entries via GraphQL/REST, runs CLI migrations, and manages assets and locales. Use when building or modifying Contentful content models, writing queries, or migrating content."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
<!-- ⚠️ This file is managed by OpenCastle. Edits will be overwritten on update. Customize in the .opencastle/ directory instead. -->
|
|
7
|
-
|
|
8
6
|
# Contentful CMS
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Critical Development Rules
|
|
13
|
-
|
|
14
|
-
1. **Always use Content Types** — define structured content types before creating entries
|
|
15
|
-
2. **Prefer GraphQL API** — use the GraphQL Content API for typed, efficient queries
|
|
16
|
-
3. **Handle localization** — Contentful fields can be localized; always specify locale in queries
|
|
17
|
-
4. **Use environments** — develop in sandbox environments, promote to master via migrations
|
|
18
|
-
5. **Migration scripts** — use the Contentful CLI migration tool for schema changes, never modify content types manually in production
|
|
19
|
-
6. **Rich Text rendering** — use `@contentful/rich-text-react-renderer` for React apps
|
|
20
|
-
7. **Asset handling** — use Contentful's Image API for responsive images with transformations
|
|
21
|
-
8. **Webhook-driven** — use webhooks for cache invalidation and rebuild triggers
|
|
22
|
-
9. **Rate limiting** — respect API rate limits (Content Delivery: 78 req/s, Management: 10 req/s)
|
|
23
|
-
10. **Keep queries in shared library** — queries belong in a shared queries library, never inline in components
|
|
8
|
+
For project-specific configuration, content types, and API keys, see [cms-config.md](../../.opencastle/stack/cms-config.md).
|
|
24
9
|
|
|
25
10
|
## Query Patterns
|
|
26
11
|
|
|
27
12
|
### GraphQL Content API
|
|
28
|
-
- Use typed GraphQL queries with code generation
|
|
29
13
|
- Leverage `sys.publishedAt` for cache invalidation
|
|
30
14
|
- Use `include` parameter to control link resolution depth
|
|
31
|
-
- Filter with `where` clauses for efficient data fetching
|
|
32
15
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
16
|
+
```typescript
|
|
17
|
+
// Example: Typed GraphQL query
|
|
18
|
+
const BLOG_POSTS_QUERY = `
|
|
19
|
+
query BlogPosts($limit: Int!, $locale: String!) {
|
|
20
|
+
blogPostCollection(limit: $limit, locale: $locale) {
|
|
21
|
+
items {
|
|
22
|
+
sys { id publishedAt }
|
|
23
|
+
title
|
|
24
|
+
slug
|
|
25
|
+
body { json }
|
|
26
|
+
featuredImage { url width height }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
```
|
|
38
32
|
|
|
39
33
|
## Content Modeling
|
|
40
34
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
35
|
+
```javascript
|
|
36
|
+
// Reference field with validation
|
|
37
|
+
blogPost.createField('author')
|
|
38
|
+
.type('Link').linkType('Entry')
|
|
39
|
+
.validations([{ linkContentType: ['person'] }]);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Prefer typed content types over JSON fields; add validation rules to all required fields.
|
|
43
|
+
|
|
44
|
+
## Migration Workflow
|
|
45
|
+
|
|
46
|
+
1. Create a sandbox environment using the Contentful web UI or API.
|
|
47
|
+
2. Write a migration script using the Contentful migration library (example below).
|
|
48
|
+
3. Run the migration against the sandbox:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
contentful space migration --space-id <SPACE_ID> --environment-id sandbox migration.js
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
4. Validate changes:
|
|
55
|
+
- Run a small validation script that queries a sample of affected entries and ensures required fields exist.
|
|
56
|
+
- If validation fails: roll back by deleting the sandbox and recreate from `master` (safe rollback), or write a reverse migration and run it.
|
|
57
|
+
5. When sandbox validation passes, promote the environment or run the migration against `master` during a maintenance window.
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
// Example: Migration script (migration.js)
|
|
61
|
+
module.exports = function (migration) {
|
|
62
|
+
const blogPost = migration.createContentType('blogPost')
|
|
63
|
+
.name('Blog Post')
|
|
64
|
+
.displayField('title');
|
|
65
|
+
blogPost.createField('title').type('Symbol').required(true);
|
|
66
|
+
blogPost.createField('slug').type('Symbol').required(true).validations([{ unique: true }]);
|
|
67
|
+
blogPost.createField('body').type('RichText');
|
|
68
|
+
};
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Validation script example (node):
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
// validate.js — exits non-zero on missing fields
|
|
75
|
+
const res = await fetch(`https://cdn.contentful.com/spaces/${SPACE}/environments/sandbox/entries?content_type=blogPost`, {
|
|
76
|
+
headers: { Authorization: `Bearer ${TOKEN}` },
|
|
77
|
+
});
|
|
78
|
+
const { items } = await res.json();
|
|
79
|
+
for (const item of items) {
|
|
80
|
+
if (!item.fields.slug) throw new Error(`Missing slug on ${item.sys.id}`);
|
|
81
|
+
}
|
|
82
|
+
console.log('OK —', items.length, 'entries validated');
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
For longer migration patterns and rollback options see [REFERENCE.md](REFERENCE.md).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
> Parent: [SKILL.md](./SKILL.md)
|
|
2
|
+
|
|
3
|
+
Last Updated: 2026-03-31
|
|
4
|
+
|
|
5
|
+
Reference: Convex patterns and safety checks
|
|
6
|
+
|
|
7
|
+
- Schema migration checklist and `npx convex deploy` notes
|
|
8
|
+
- Query/mutation examples with `returns` validators
|
|
9
|
+
- Backup/rollback using `npx convex export` / `npx convex import`
|
|
@@ -7,7 +7,7 @@ description: "Convex reactive database patterns, schema design, real-time querie
|
|
|
7
7
|
|
|
8
8
|
# Convex Database
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
For project-specific schema, functions, and deployment details, see [database-config.md](../../.opencastle/stack/database-config.md).
|
|
11
11
|
|
|
12
12
|
## Critical Development Rules
|
|
13
13
|
|
|
@@ -106,3 +106,15 @@ export const create = mutation({
|
|
|
106
106
|
- Use `npx convex dev` for local development with hot reload
|
|
107
107
|
- Schema changes are automatically migrated
|
|
108
108
|
- Use `npx convex import` / `npx convex export` for data management
|
|
109
|
+
|
|
110
|
+
## Quick Workflow: Implement a schema change and deploy
|
|
111
|
+
1. Add or modify schema in `convex/schema.ts` and run `npx convex dev` locally; confirm the dev server starts and responds (checkpoint: `http://localhost:8888` or the configured port). Run a small validation script or sample queries to verify schema changes (validation checkpoint).
|
|
112
|
+
2. Write queries/mutations with `returns` validators and unit test against the dev server.
|
|
113
|
+
3. Run `npx convex deploy` to push the change to production.
|
|
114
|
+
4. Verify real-time queries in the app, run a small data migration if required (`convex import/export`), and run a quick smoke check against your app (example):
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
curl -fsS https://<APP_URL>/health || (echo "health check failed" && exit 1)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
If an issue occurs: roll back via `npx convex import` of the last good export, fix locally, and re-deploy. After a rollback, re-run the same smoke check to confirm services are restored.
|