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.
Files changed (115) hide show
  1. package/LICENSE +21 -93
  2. package/README.md +5 -3
  3. package/package.json +2 -2
  4. package/src/dashboard/dist/data/convoys/demo-api-v2.json +3 -3
  5. package/src/dashboard/dist/data/convoys/demo-auth-revamp.json +4 -4
  6. package/src/dashboard/dist/data/convoys/demo-dashboard-ui.json +12 -12
  7. package/src/dashboard/dist/data/convoys/demo-data-pipeline.json +3 -3
  8. package/src/dashboard/dist/data/convoys/demo-deploy-ci.json +1 -1
  9. package/src/dashboard/dist/data/convoys/demo-docs-update.json +7 -7
  10. package/src/dashboard/dist/data/convoys/demo-perf-opt.json +4 -4
  11. package/src/dashboard/node_modules/.vite/deps/_metadata.json +6 -6
  12. package/src/dashboard/public/data/convoys/demo-api-v2.json +3 -3
  13. package/src/dashboard/public/data/convoys/demo-auth-revamp.json +4 -4
  14. package/src/dashboard/public/data/convoys/demo-dashboard-ui.json +12 -12
  15. package/src/dashboard/public/data/convoys/demo-data-pipeline.json +3 -3
  16. package/src/dashboard/public/data/convoys/demo-deploy-ci.json +1 -1
  17. package/src/dashboard/public/data/convoys/demo-docs-update.json +7 -7
  18. package/src/dashboard/public/data/convoys/demo-perf-opt.json +4 -4
  19. package/src/orchestrator/customizations/stack/sanity-config.md +43 -0
  20. package/src/orchestrator/customizations/stack/supabase-config.md +53 -0
  21. package/src/orchestrator/plugins/astro/REFERENCE.md +5 -0
  22. package/src/orchestrator/plugins/astro/SKILL.md +22 -29
  23. package/src/orchestrator/plugins/chrome-devtools/REFERENCE.md +9 -0
  24. package/src/orchestrator/plugins/chrome-devtools/SKILL.md +10 -55
  25. package/src/orchestrator/plugins/contentful/REFERENCE.md +16 -0
  26. package/src/orchestrator/plugins/contentful/SKILL.md +69 -29
  27. package/src/orchestrator/plugins/convex/REFERENCE.md +9 -0
  28. package/src/orchestrator/plugins/convex/SKILL.md +13 -1
  29. package/src/orchestrator/plugins/cypress/REFERENCE.md +5 -0
  30. package/src/orchestrator/plugins/cypress/SKILL.md +29 -93
  31. package/src/orchestrator/plugins/figma/REFERENCE.md +18 -0
  32. package/src/orchestrator/plugins/figma/SKILL.md +41 -66
  33. package/src/orchestrator/plugins/jira/REFERENCE.md +9 -0
  34. package/src/orchestrator/plugins/jira/SKILL.md +26 -114
  35. package/src/orchestrator/plugins/linear/SKILL.md +42 -109
  36. package/src/orchestrator/plugins/netlify/REFERENCE.md +33 -0
  37. package/src/orchestrator/plugins/netlify/SKILL.md +34 -64
  38. package/src/orchestrator/plugins/nextjs/REFERENCE.md +73 -0
  39. package/src/orchestrator/plugins/nextjs/SKILL.md +49 -138
  40. package/src/orchestrator/plugins/notion/SKILL.md +26 -168
  41. package/src/orchestrator/plugins/notion/TEMPLATES.md +88 -0
  42. package/src/orchestrator/plugins/nx/REFERENCE.md +10 -0
  43. package/src/orchestrator/plugins/nx/SKILL.md +12 -12
  44. package/src/orchestrator/plugins/playwright/REFERENCE.md +12 -0
  45. package/src/orchestrator/plugins/playwright/SKILL.md +33 -98
  46. package/src/orchestrator/plugins/prisma/REFERENCE.md +42 -0
  47. package/src/orchestrator/plugins/prisma/SKILL.md +18 -68
  48. package/src/orchestrator/plugins/resend/REFERENCE.md +61 -0
  49. package/src/orchestrator/plugins/resend/SKILL.md +23 -137
  50. package/src/orchestrator/plugins/sanity/SKILL.md +50 -3
  51. package/src/orchestrator/plugins/slack/REFERENCE.md +24 -0
  52. package/src/orchestrator/plugins/slack/SKILL.md +36 -111
  53. package/src/orchestrator/plugins/strapi/REFERENCE.md +35 -0
  54. package/src/orchestrator/plugins/strapi/SKILL.md +60 -24
  55. package/src/orchestrator/plugins/supabase/REFERENCE.md +9 -0
  56. package/src/orchestrator/plugins/supabase/SKILL.md +44 -16
  57. package/src/orchestrator/plugins/teams/REFERENCE.md +36 -0
  58. package/src/orchestrator/plugins/teams/SKILL.md +35 -85
  59. package/src/orchestrator/plugins/trello/REFERENCE.md +9 -0
  60. package/src/orchestrator/plugins/trello/SKILL.md +25 -97
  61. package/src/orchestrator/plugins/turborepo/REFERENCE.md +9 -0
  62. package/src/orchestrator/plugins/turborepo/SKILL.md +13 -1
  63. package/src/orchestrator/plugins/vercel/SKILL.md +45 -52
  64. package/src/orchestrator/plugins/vitest/SKILL.md +10 -14
  65. package/src/orchestrator/prompts/create-skill.prompt.md +62 -20
  66. package/src/orchestrator/prompts/generate-convoy.prompt.md +6 -0
  67. package/src/orchestrator/prompts/generate-prd.prompt.md +4 -0
  68. package/src/orchestrator/skills/accessibility-standards/REFERENCE.md +34 -0
  69. package/src/orchestrator/skills/accessibility-standards/SKILL.md +6 -3
  70. package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +48 -0
  71. package/src/orchestrator/skills/agent-hooks/SKILL.md +41 -65
  72. package/src/orchestrator/skills/agent-memory/KNOWLEDGE-GRAPH.md +49 -0
  73. package/src/orchestrator/skills/agent-memory/SKILL.md +30 -67
  74. package/src/orchestrator/skills/api-patterns/SKILL.md +29 -1
  75. package/src/orchestrator/skills/backbone-scaffolding/EXAMPLES.md +16 -0
  76. package/src/orchestrator/skills/backbone-scaffolding/SKILL.md +99 -0
  77. package/src/orchestrator/skills/code-commenting/SKILL.md +1 -1
  78. package/src/orchestrator/skills/context-map/REFERENCE.md +70 -0
  79. package/src/orchestrator/skills/context-map/SKILL.md +28 -55
  80. package/src/orchestrator/skills/data-engineering/REFERENCE.md +55 -0
  81. package/src/orchestrator/skills/data-engineering/SKILL.md +40 -34
  82. package/src/orchestrator/skills/decomposition/REFERENCE.md +28 -0
  83. package/src/orchestrator/skills/decomposition/SKILL.md +15 -30
  84. package/src/orchestrator/skills/deployment-infrastructure/SKILL.md +31 -65
  85. package/src/orchestrator/skills/documentation-standards/SKILL.md +31 -50
  86. package/src/orchestrator/skills/documentation-standards/WRITING-GUIDE.md +39 -0
  87. package/src/orchestrator/skills/fast-review/REFERENCE.md +30 -0
  88. package/src/orchestrator/skills/fast-review/SKILL.md +11 -31
  89. package/src/orchestrator/skills/frontend-design/COMPONENTS.md +113 -0
  90. package/src/orchestrator/skills/frontend-design/REFERENCE.md +36 -0
  91. package/src/orchestrator/skills/frontend-design/SKILL.md +36 -85
  92. package/src/orchestrator/skills/git-workflow/SKILL.md +13 -2
  93. package/src/orchestrator/skills/memory-merger/REFERENCE.md +20 -0
  94. package/src/orchestrator/skills/memory-merger/SKILL.md +29 -38
  95. package/src/orchestrator/skills/observability-logging/SKILL.md +5 -12
  96. package/src/orchestrator/skills/orchestration-protocols/REFERENCE.md +42 -0
  97. package/src/orchestrator/skills/orchestration-protocols/SKILL.md +54 -41
  98. package/src/orchestrator/skills/panel-majority-vote/REFERENCE.md +55 -0
  99. package/src/orchestrator/skills/panel-majority-vote/SKILL.md +30 -75
  100. package/src/orchestrator/skills/performance-optimization/SKILL.md +41 -1
  101. package/src/orchestrator/skills/project-consistency/SKILL.md +50 -89
  102. package/src/orchestrator/skills/project-consistency/TEMPLATES.md +39 -0
  103. package/src/orchestrator/skills/react-development/REFERENCE.md +7 -0
  104. package/src/orchestrator/skills/react-development/SKILL.md +50 -42
  105. package/src/orchestrator/skills/security-hardening/SKILL.md +88 -1
  106. package/src/orchestrator/skills/self-improvement/LESSON-CATEGORIES.md +36 -0
  107. package/src/orchestrator/skills/self-improvement/SKILL.md +19 -25
  108. package/src/orchestrator/skills/seo-patterns/REFERENCE.md +54 -0
  109. package/src/orchestrator/skills/seo-patterns/SKILL.md +20 -88
  110. package/src/orchestrator/skills/session-checkpoints/CHECKPOINT-TEMPLATE.md +58 -0
  111. package/src/orchestrator/skills/session-checkpoints/SKILL.md +34 -58
  112. package/src/orchestrator/skills/team-lead-reference/SKILL.md +37 -30
  113. package/src/orchestrator/skills/testing-workflow/SKILL.md +55 -2
  114. package/src/orchestrator/skills/validation-gates/REFERENCE.md +50 -0
  115. package/src/orchestrator/skills/validation-gates/SKILL.md +39 -35
@@ -0,0 +1,39 @@
1
+ > Parent: [SKILL.md](./SKILL.md)
2
+
3
+ ## Prompt Templates — Foundation & Page Tasks
4
+
5
+ ### Foundation Setup — Prompt (copy-paste)
6
+
7
+ ````markdown
8
+ ## Foundation Setup — [project description]
9
+
10
+ **Aesthetic:** [2-3 word direction] — [one sentence]
11
+
12
+ Create `[path]/tokens.css`: palette (intent-named), fluid typography (clamp()), spacing (4px base), motion, shadows, radius, breakpoints.
13
+ Create `[path]/Layout.[tsx|astro|vue]`: responsive container, site header (nav: [labels]), footer, document head.
14
+ Create `[path]/ui/`: Button, Card, Heading, Text, Link, Section, Container, Grid — tokens only, zero hardcoded values; `variant`/`size`/`className` API.
15
+
16
+ **Style Guide:** Tone: [formal/casual]. Terminology: [key terms]. Page structure: [hero → ... → CTA].
17
+
18
+ **Acceptance Criteria:** Zero hardcoded hex/px · Layout responsive at 320/768/1280px · Fluid typography via clamp() · Fonts loaded efficiently
19
+ ````
20
+
21
+ ### Page Task — Prompt (copy-paste)
22
+
23
+ ````markdown
24
+ ## Build [Page Name] Page — [purpose, audience, primary action]
25
+
26
+ **MANDATORY refs:** tokens: `[path]/tokens.css` (no new values) · Layout: `[path]/Layout.[ext]` (wrap all content) · UI: `[path]/ui/` (import, don't recreate) · Aesthetic: [2-3 words] · Tone: [tone] · Terms: [glossary]
27
+
28
+ **Content:** [sections, copy direction, media] **Structure:** [hero → ... → CTA]
29
+
30
+ **Acceptance Criteria:** Shared Layout used · Zero hardcoded values · UI components imported · Tone/terminology match · Responsive 320/768/1280px · [page-specific]
31
+ ````
32
+
33
+ ### How to use
34
+
35
+ - Copy the appropriate template into the foundation or page task tracker issue.
36
+ - Replace bracketed placeholders (`[path]`, `[Aesthetic]`) with exact values from the foundation task outputs.
37
+ - Attach paths to tokens, Layout, and UI component library explicitly in the prompt.
38
+
39
+ Last Updated: 2026-03-31
@@ -0,0 +1,7 @@
1
+ > Parent: [SKILL.md](./SKILL.md)
2
+
3
+ Reference materials for React development guidance.
4
+
5
+ - See `src/orchestrator/skills/react-development/SKILL.md` for concise rules and quick examples.
6
+
7
+ Examples, deep-dive topics, and extended patterns (performance, forms, advanced typing) live here when needed.
@@ -1,71 +1,79 @@
1
1
  ---
2
2
  name: react-development
3
- description: "React development standards for functional components, hooks, TypeScript integration, state management, styling, and testing patterns. Use when creating or modifying React components, custom hooks, or component tests."
3
+ description: "Enforces naming conventions, prop typing patterns, file structure, and test coverage standards. Use when creating or modifying React components, custom hooks, or component tests. Trigger terms: React app, .tsx files, testing library, custom hooks, functional components"
4
4
  ---
5
5
 
6
6
  # React Development Standards
7
7
 
8
- Modern React patterns https://react.dev.
8
+ <!-- Concrete actions moved into description and workflows; trigger terms are in frontmatter -->
9
9
 
10
- ## Architecture & Components
10
+ ## New Component Workflow
11
11
 
12
- - Functional components + hooks; composition over inheritance.
13
- - Feature/domain folders; separate presentational and container components.
14
- - PascalCase names; single responsibility; destructure props; never mutate props/state.
15
- - `<>...</>` to avoid extra DOM nodes; props validated via TypeScript.
12
+ 1. **Create file** `ComponentName.tsx` in the feature folder; co-locate `ComponentName.module.scss` and `ComponentName.test.tsx`
13
+ 2. **Define interface** — export `ComponentNameProps` with TypeScript; destructure in function signature
14
+ 3. **Implement** functional component with hooks; use CSS Modules for styling
15
+ 4. **Test** RTL behavioral tests; cover render, interaction, edge cases, accessibility
16
+ 5. **Verify** — lint + type-check + test pass; visually confirm in browser if UI
16
17
 
17
- ## TypeScript
18
+ ## Architecture & Components (concise)
18
19
 
19
- - Interfaces for props, state, event handlers, refs, and API responses.
20
- - Generic components where appropriate; union types for variants.
21
- - Built-ins: `React.FC`, `React.ComponentProps`, etc.
22
- - Strict mode in `tsconfig.json`; shared types in `interfaces/`.
20
+ - Functional components with hooks. Follow domain/feature folder structure and co-locate tests/styles with components.
21
+ - PascalCase names; destructure props; use TypeScript interfaces for props.
23
22
 
24
- ## State & Hooks
23
+ ```tsx
24
+ interface UserCardProps { name: string; role: string }
25
+ export function UserCard({ name, role }: UserCardProps) {
26
+ return (
27
+ <div data-testid="user-card">
28
+ <h3>{name}</h3>
29
+ <span>{role}</span>
30
+ </div>
31
+ );
32
+ }
33
+ ```
25
34
 
26
- | Concern | Tool |
27
- |---------|------|
28
- | Local state | `useState` |
29
- | Complex state | `useReducer` |
30
- | Cross-tree state | `useContext` |
31
- | Server state | React Query |
32
- | DOM / mutable ref | `useRef` |
33
- | Perf optimization | `useMemo` / `useCallback` |
35
+ ## TypeScript
34
36
 
35
- - `useEffect`: proper deps, cleanup to prevent leaks.
36
- - Hooks only at top level; extract reusable logic to custom hooks.
37
+ - Use interfaces for props and shared types; keep strict mode enabled in `tsconfig.json`. See [REFERENCE.md](REFERENCE.md) for detailed TypeScript patterns.
37
38
 
38
39
  ## Styling
39
40
 
40
41
  - **CSS Modules** (`.module.scss`) co-located with components.
41
42
  - Sass for advanced features; variables/mixins from shared libraries.
42
- - Mobile-first responsive; CSS custom properties for theming.
43
+ - CSS custom properties for theming.
43
44
 
44
- ## Performance
45
+ <!-- Performance guidance trimmed; follow project-specific conventions and benchmark when needed. -->
45
46
 
46
- - Stable `key` props; `React.memo` where warranted.
47
- - Code-split with `React.lazy` + `Suspense`; dynamic imports.
48
- - Avoid anonymous functions in render; virtual scrolling for large lists.
49
- - `ErrorBoundary` for graceful degradation.
47
+ ## Testing
50
48
 
51
- ## Data Fetching
49
+ - React Testing Library (behavior, not implementation); Jest runner.
50
+ - Co-locate tests next to components; mock external deps and API calls.
51
+ - Test accessibility and keyboard navigation; verify component public surface via unit tests.
52
52
 
53
- - Libraries: React Query, SWR, or Apollo Client.
54
- - Always handle loading/error/success; cancel on unmount; optimistic updates.
53
+ ```tsx
54
+ import { render, screen } from '@testing-library/react';
55
+ import { UserCard } from './UserCard';
55
56
 
56
- ## Forms
57
+ test('renders user info', () => {
58
+ render(<UserCard name="Alice" role="Admin" />);
59
+ expect(screen.getByText('Alice')).toBeInTheDocument();
60
+ expect(screen.getByTestId('user-card')).toBeInTheDocument();
61
+ });
62
+ ```
57
63
 
58
- - Controlled components; React Hook Form + Zod for validation.
59
- - Accessibility: labels, ARIA attributes; debounced validation.
64
+ ## Verification commands + error recovery
60
65
 
61
- ## Testing
66
+ Run these as part of your PR validation pipeline or locally:
62
67
 
63
- - React Testing Library (behavior, not implementation); Jest runner.
64
- - Co-locate tests in `__tests__`; mock external deps and API calls.
65
- - Test accessibility and keyboard navigation.
66
- - **CRITICAL**: Never mix static imports and `require()` for lazy-loaded libs in tests — use `jest.requireMock()` / `jest.requireActual()`.
68
+ ```bash
69
+ pnpm lint # fixable issues: pnpm lint --fix
70
+ pnpm typecheck # run `pnpm tsc --noEmit` if alias not present
71
+ pnpm test # rerun failing tests with `pnpm test -- -t <name>`
72
+ pnpm build # ensure production build succeeds
73
+ ```
74
+
75
+ If `lint` fails: run `pnpm lint --fix` and re-run. If `typecheck` fails: inspect reported files; add missing types. If tests fail: run with `--runInBand` to collect stack traces and reproduce locally.
67
76
 
68
77
  ## Security
69
78
 
70
- - Sanitize inputs (XSS); validate/escape before rendering.
71
- - HTTPS for external APIs; no sensitive data in localStorage/sessionStorage; CSP headers.
79
+ - Follow project conventions for input sanitization, secret handling, and CSP. See **api-patterns** for validation patterns.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: security-hardening
3
- description: "Security architecture including authentication, authorization, RLS policies, security headers, CSP, input validation, API security, and OAuth patterns. Use when implementing auth flows, writing RLS policies, configuring security headers, validating inputs, or auditing security."
3
+ description: "Security architecture including authentication, authorization, RLS policies, CSP, input validation, and API security. Use when implementing auth flows, writing RLS policies, configuring CSP/headers, validating inputs, or auditing security. Trigger terms: RLS, CSP, Server Actions, Zod, auth flow"
4
4
  ---
5
5
 
6
6
  # Security Hardening
@@ -43,6 +43,39 @@ Principle of least privilege. External domains are project-specific (see deploym
43
43
 
44
44
  **Note:** `'unsafe-inline'`/`'unsafe-eval'` may be required in dev mode — use nonces/hashes in production.
45
45
 
46
+ **Examples** — Next.js `next.config.js` headers and middleware pattern:
47
+
48
+ ```js
49
+ // next.config.js
50
+ module.exports = {
51
+ async headers() {
52
+ return [
53
+ {
54
+ source: '/(.*)',
55
+ headers: [
56
+ {
57
+ key: 'Content-Security-Policy',
58
+ // minimal example; restrict further per app needs
59
+ value: "default-src 'self'; script-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self' https://api.example.com;",
60
+ },
61
+ ],
62
+ },
63
+ ];
64
+ },
65
+ };
66
+ ```
67
+
68
+ ```js
69
+ // middleware.js (Next.js Edge middleware example)
70
+ import { NextResponse } from 'next/server';
71
+
72
+ export function middleware(request) {
73
+ const res = NextResponse.next();
74
+ res.headers.set('Content-Security-Policy', "default-src 'self'; img-src 'self' data:;");
75
+ return res;
76
+ }
77
+ ```
78
+
46
79
  ## RLS
47
80
 
48
81
  > **SQL examples and role system:** See the **database** skill (authoritative source for RLS).
@@ -51,6 +84,51 @@ Principle of least privilege. External domains are project-specific (see deploym
51
84
  - Use `auth.uid()` for auth checks; EXISTS subqueries for role checks
52
85
  - Never rely solely on client-side authorization; never disable RLS in production
53
86
 
87
+ **RLS verification & test pattern**
88
+
89
+ 1. Confirm RLS is enabled for a table (Postgres):
90
+
91
+ ```sql
92
+ -- run in psql
93
+ SELECT relname, relrowsecurity
94
+ FROM pg_class
95
+ WHERE relname = 'your_table_name';
96
+ ```
97
+
98
+ `relrowsecurity = true` indicates RLS enabled.
99
+
100
+ 2. Test pattern: verify a user without privileges cannot read rows.
101
+
102
+ ```sql
103
+ -- As owner (create test row)
104
+ INSERT INTO your_table_name (id, owner_id, data) VALUES (1, 'owner-uid', 'secret');
105
+
106
+ -- As another_role (should return zero rows if RLS correct)
107
+ SET ROLE other_role;
108
+ SELECT * FROM your_table_name WHERE id = 1;
109
+ -- expected: 0 rows
110
+ ```
111
+
112
+ Automate this check in CI: run the enabling query and a simple positive/negative test as part of the security gate.
113
+
114
+ ## Server Action Zod example
115
+
116
+ ```ts
117
+ 'use server';
118
+ import { z } from 'zod';
119
+ import { revalidatePath } from 'next/cache';
120
+
121
+ const schema = z.object({ name: z.string().min(1), price: z.number().positive() });
122
+
123
+ export async function createItem(formData: FormData) {
124
+ const parsed = schema.safeParse(Object.fromEntries(formData.entries()));
125
+ if (!parsed.success) return { error: 'Validation failed', details: parsed.error.format() };
126
+ // insert into DB ...
127
+ revalidatePath('/items');
128
+ return { success: true };
129
+ }
130
+ ```
131
+
54
132
  ## API Security
55
133
 
56
134
  ```typescript
@@ -74,3 +152,12 @@ Input: Zod schemas in all Server Actions and route handlers; React Hook Form cli
74
152
  5. Sanitize user content (escape HTML).
75
153
  6. Parameterized queries (DB client handles automatically).
76
154
  7. Rotate secrets quarterly.
155
+
156
+ ## Implementation checklist
157
+ 1. Enable RLS on tables and add an automated enablement check in CI (example: `SELECT relrowsecurity FROM pg_class WHERE relname = 'your_table'`).
158
+ 2. Configure authentication and session middleware; verify via an integration smoke test against a protected endpoint (e.g., `/api/me`).
159
+ 3. Add CSP and security headers in `next.config.js` or middleware; validate headers with `curl -I` against a preview URL.
160
+ 4. Add Zod validation to all Server Actions and route handlers (see Zod example above).
161
+ 5. Run a security audit (RLS positive/negative tests, header validation, and input fuzzing) and block merges on failing gates.
162
+
163
+ Cross-reference: see [api-patterns/SKILL.md](../api-patterns/SKILL.md#architecture) for Server Action patterns and [session-checkpoints/SKILL.md](../session-checkpoints/SKILL.md) for checkpointing security-sensitive work.
@@ -0,0 +1,36 @@
1
+ > Parent: [SKILL.md](./SKILL.md)
2
+
3
+ # Lesson Categories & Severity
4
+
5
+ Use these tables when tagging lessons in `LESSONS-LEARNED.md`.
6
+
7
+ ## Categories
8
+
9
+ | Category | When to use |
10
+ |----------|------------|
11
+ | `bug` | Runtime errors, incorrect behavior, regressions |
12
+ | `pattern` | Reusable code or workflow pattern discovered |
13
+ | `architecture` | Structural decisions, module boundaries, data flow |
14
+ | `tooling` | Build tools, CLI, IDE, MCP, CI/CD issues |
15
+ | `testing` | Test strategy, flaky tests, coverage gaps |
16
+ | `security` | Auth, RLS, headers, secrets, input validation |
17
+ | `performance` | Rendering, bundle size, query optimization |
18
+ | `deployment` | Hosting, env vars, caching, rollback |
19
+ | `process` | Workflow, delegation, review, orchestration |
20
+ | `documentation` | Docs structure, templates, stale content |
21
+
22
+ ## Severity
23
+
24
+ | Severity | Criteria |
25
+ |----------|---------|
26
+ | `critical` | Blocks all work or causes data loss |
27
+ | `high` | Blocks a task or causes significant rework |
28
+ | `medium` | Causes friction or minor rework |
29
+ | `low` | Nice-to-know; minor efficiency improvement |
30
+
31
+ ## Tagging Format
32
+
33
+ ```
34
+ ### LES-XXX: <title>
35
+ **Category:** <category> | **Severity:** <severity> | **Date:** YYYY-MM-DD
36
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: self-improvement
3
- description: "Protocol for reading and updating the lessons-learned knowledge base. MUST be followed by ALL agents read lessons before work, write lessons after retries. This makes the agent team self-improving across sessions."
3
+ description: "Appends new entries to LESSONS-LEARNED.md via the opencastle lesson CLI, searches past lessons for matching errors, and proposes skill updates when retry patterns exceed thresholds. Use when consulting or updating LESSONS-LEARNED.md, after task failures, when capturing retrospective insights, or when a retry succeeds."
4
4
  ---
5
5
 
6
6
  # Self-Improvement Protocol
@@ -23,30 +23,24 @@ Required: `--title`, `--category`, `--severity`, `--problem` · Optional: `--wro
23
23
 
24
24
  After writing: if the lesson reveals a gap in a skill/instruction file, update that file too (prevents the pitfall at source).
25
25
 
26
- ## Categories
27
-
28
- | Category | Covers |
29
- |----------|--------|
30
- | `task-management` | Task tracker tools, issue management, workflow states |
31
- | `jira` | Jira MCP tools (Atlassian Rovo) |
32
- | `mcp-tools` | MCP server tool quirks (deferred loading, parameters) |
33
- | `codebase-tool` | Task runner CLI commands, caching, build tools |
34
- | `terminal` | Shell commands, port/process management |
35
- | `framework` | App framework, build, dev server, SSR |
36
- | `cms` | CMS content queries, schema deployment |
37
- | `database` | Database auth, migrations, RLS, SQL |
38
- | `git` | Git operations, branching, merge conflicts |
39
- | `deployment` | Deployment, environment variables, edge config |
40
- | `browser-testing` | E2E testing, screenshots, browser automation |
41
- | `general` | Anything else |
42
-
43
- ## Severity
44
-
45
- | Level | Impact |
46
- |-------|--------|
47
- | `high` | Blocks work — agent cannot proceed without the workaround |
48
- | `medium` | Wastes 5+ minutes |
49
- | `low` | Minor friction |
26
+ ## Workflow
27
+
28
+ 1. Search LESSONS-LEARNED.md for matching entries or similar errors.
29
+ 2. Attempt the task with conservative flags/options informed by lessons.
30
+ 3. On failure: retry with modified approach (up to threshold), capture error details and context.
31
+ 4. On success: run `opencastle lesson` to record the working approach.
32
+ 5. Verify: `tail -1 .opencastle/LESSONS-LEARNED.md` confirm entry has title, category, and severity. If malformed → re-run with corrected flags.
33
+ 6. If the lesson indicates a needed skill/instruction update: draft that change and propose a PR.
34
+
35
+ Quick search example:
36
+
37
+ ```bash
38
+ rg "missing CRON_SECRET" .opencastle/LESSONS-LEARNED.md || true
39
+ ```
40
+
41
+ ## Categories & Severity
42
+
43
+ Category and severity tables moved to [LESSON-CATEGORIES.md](LESSON-CATEGORIES.md). Use that file when tagging lessons.
50
44
 
51
45
  ## Quality Rules
52
46
 
@@ -0,0 +1,54 @@
1
+ > Parent: [SKILL.md](./SKILL.md)
2
+
3
+ # SEO Reference: Structured Data & Anti-Patterns
4
+
5
+ ## Structured Data Examples (JSON-LD)
6
+
7
+ ### Breadcrumb + Article example
8
+
9
+ ```tsx
10
+ function StructuredData({ breadcrumbs, article }: Props) {
11
+ const breadcrumbLd = {
12
+ '@context': 'https://schema.org', '@type': 'BreadcrumbList',
13
+ itemListElement: breadcrumbs.map((crumb, i) => ({ '@type': 'ListItem', position: i + 1, name: crumb.label, item: crumb.url })),
14
+ };
15
+ const articleLd = {
16
+ '@context': 'https://schema.org', '@type': 'Article',
17
+ headline: article.title, description: article.summary,
18
+ image: article.imageUrl, datePublished: article.publishedAt,
19
+ dateModified: article.updatedAt, author: { '@type': 'Person', name: article.author },
20
+ };
21
+ return (
22
+ <>
23
+ <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(breadcrumbLd) }} />
24
+ <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(articleLd) }} />
25
+ </>
26
+ );
27
+ }
28
+ ```
29
+
30
+ ### FAQPage example (minimal)
31
+
32
+ ```json
33
+ {
34
+ "@context": "https://schema.org",
35
+ "@type": "FAQPage",
36
+ "mainEntity": [
37
+ { "@type": "Question", "name": "Q?", "acceptedAnswer": { "@type": "Answer", "text": "A." } }
38
+ ]
39
+ }
40
+ ```
41
+
42
+ ## Validation
43
+
44
+ - Validate with Google's Rich Results Test: https://search.google.com/test/rich-results
45
+ - CLI quick-check: `curl -s https://example.com/page | pup 'script[type=application/ld+json] text{}'` then `jq .`
46
+
47
+ ## Anti-Patterns (trimmed)
48
+
49
+ - Duplicate titles across pages — produce unique, descriptive titles.
50
+ - Missing canonical URLs — add `<link rel="canonical">` to avoid duplicate content.
51
+ - Client-only rendered primary content — server-render or prerender indexable content.
52
+ - Unvalidated structured data — validate before merge and include tests in PRs.
53
+
54
+ Last Updated: 2026-03-31
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: seo-patterns
3
- description: "Technical SEO patterns for meta tags, structured data, sitemaps, URL strategy, and rendering. Use when optimizing pages for search engines or implementing SEO features."
3
+ description: "Implements technical SEO: meta tags, JSON-LD structured data, sitemaps, and crawlability fixes. Use when adding schema markup, JSON-LD, robots.txt updates, canonical URLs, Open Graph tags, or improving crawlability."
4
4
  ---
5
5
 
6
6
  # SEO Patterns
@@ -9,8 +9,20 @@ description: "Technical SEO patterns for meta tags, structured data, sitemaps, U
9
9
 
10
10
  - Every public page MUST have a unique `<title>` and `<meta name="description">`.
11
11
  - Structured data MUST validate against Google's Rich Results Test before shipping.
12
- - Server-render all content critical for indexing — never rely on client-side JS for primary content.
13
- - Canonical URLs are mandatory on every page to prevent duplicate content issues.
12
+ - Server-render all content critical for indexing.
13
+ - Canonical URLs are mandatory on every page.
14
+
15
+ ## Implementation Workflow
16
+
17
+ 1. Add meta tags and canonical URLs in server-rendered HTML.
18
+ - Checkpoint: every page has unique `<title>` and `<meta name="description">`.
19
+ 2. Add structured data (JSON-LD) for the page type and keep blocks server-rendered.
20
+ - Checkpoint: Rich Results Test passes with zero errors.
21
+ 3. Generate / update sitemap and reference it from `robots.txt`.
22
+ - Checkpoint: sitemap URL present in `robots.txt` and accessible.
23
+ 4. Verify robots.txt rules and ensure public pages are allowed.
24
+ - Recovery: remove accidental `Disallow:` entries and re-submit sitemap.
25
+ 5. Monitor Search Console for warnings and enhancement reports post-deploy.
14
26
 
15
27
  ## Meta Tags & Open Graph
16
28
 
@@ -33,45 +45,8 @@ export const metadata: Metadata = {
33
45
 
34
46
  **Checklist:** unique title (50-60 chars) · unique description (150-160 chars) · canonical URL · `og:title/description/image` (1200×630 px) · `og:type` · `twitter:card/title/image` · `noindex` only on admin/draft pages.
35
47
 
36
- ## Structured Data (JSON-LD)
37
-
38
- Use JSON-LD `<script>` blocks — never microdata or RDFa.
39
-
40
- | Page Type | Schema Type(s) | Required Properties |
41
- |-----------|----------------|---------------------|
42
- | Homepage | `WebSite`, `Organization` | `name`, `url`, `searchAction`, `logo` |
43
- | Detail page | `Product`, `Article`, or domain type | `name`, `description`, `image` |
44
- | Listing page | `ItemList` + `ListItem` | `itemListElement`, `position`, `url` |
45
- | Breadcrumbs | `BreadcrumbList` | `itemListElement`, `position`, `name` |
46
- | Blog post | `Article` / `BlogPosting` | `headline`, `datePublished`, `author` |
47
- | FAQ page | `FAQPage` | `mainEntity` with `Question` + `Answer` |
48
-
49
- ### Example: Breadcrumb + Article
50
-
51
- ```tsx
52
- function StructuredData({ breadcrumbs, article }: Props) {
53
- const breadcrumbLd = {
54
- '@context': 'https://schema.org', '@type': 'BreadcrumbList',
55
- itemListElement: breadcrumbs.map((crumb, i) => ({ '@type': 'ListItem', position: i + 1, name: crumb.label, item: crumb.url })),
56
- };
57
- const articleLd = {
58
- '@context': 'https://schema.org', '@type': 'Article',
59
- headline: article.title, description: article.summary,
60
- image: article.imageUrl, datePublished: article.publishedAt,
61
- dateModified: article.updatedAt, author: { '@type': 'Person', name: article.author },
62
- };
63
- return (
64
- <>
65
- <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(breadcrumbLd) }} />
66
- <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(articleLd) }} />
67
- </>
68
- );
69
- }
70
- ```
71
-
72
- Validate every block via [Google's Rich Results Test](https://search.google.com/test/rich-results) before merging. Check Search Console **Enhancements** after deployment.
73
-
74
- ## Sitemap & Crawlability
48
+ ## Structured Data & Crawlability
49
+ For structured data reference examples and detailed anti-patterns see [REFERENCE.md](./REFERENCE.md).
75
50
 
76
51
  - Generate XML sitemap dynamically from your data source (CMS, DB, filesystem).
77
52
  - Use a **sitemap index** when >50,000 URLs or >50 MB.
@@ -86,50 +61,7 @@ Disallow: /preview/
86
61
  Sitemap: https://example.com/sitemap.xml
87
62
  ```
88
63
 
89
- **Checklist:** robots.txt allows all public pages · blocks admin/API/preview · XML sitemap auto-generated and current · referenced in robots.txt · no orphan pages · page load < 3s.
90
-
91
- ## URL Strategy
92
-
93
- | Pattern | Good | Bad |
94
- |---------|------|-----|
95
- | Slug format | `/products/blue-widget` | `/products/Blue_Widget` |
96
- | Hierarchy | `/blog/2026/seo-tips` | `/blog?id=42` |
97
- | Consistency | Always `/path/` or `/path` | Mixed trailing slashes |
98
- | Parameters | `/products?sort=price` | `/products/sort/price/asc` |
99
-
100
- ```ts
101
- // next.config.ts
102
- const redirects = [
103
- { source: '/old-page', destination: '/new-page', permanent: true },
104
- { source: '/blog/:slug/amp', destination: '/blog/:slug', permanent: true },
105
- ];
106
- ```
107
-
108
- ## Rendering & Indexability
109
-
110
- Server-render all indexed content. Use semantic HTML (`<h1>`–`<h6>`, `<article>`, `<nav>`, `<main>`) for crawler structure.
111
-
112
- | Image Attribute | Purpose | Example |
113
- |-----------------|---------|---------|
114
- | `alt` | Describes for crawlers + screen readers | `alt="Blue widget on white background"` |
115
- | `loading` | Lazy-load below-fold | `loading="lazy"` |
116
- | `width` / `height` | Prevents CLS | `width={800} height={600}` |
117
- | File name | Keyword signal | `blue-widget-front.webp` |
118
- | Format | Performance + quality | WebP/AVIF with JPEG fallback |
119
-
120
- **Checklist:** primary content in initial HTML · unique `<h1>` with primary keyword · structured data in SSR HTML · descriptive `alt` on all images · no stray `noindex` · hydration preserves structured data scripts.
121
-
122
- ## Anti-Patterns
64
+ **Crawlability checklist:** robots.txt allows public pages · blocks admin/API/preview · XML sitemap auto-generated · referenced in robots.txt · no orphan pages · primary content in initial HTML · unique `<h1>` with keyword · structured data in SSR HTML · descriptive `alt` on images · no stray `noindex` · page load < 3s.
123
65
 
124
- | Anti-Pattern | Why It's Bad | Correct Approach |
125
- |---|---|---|
126
- | Duplicate `<title>` | Dilutes ranking signals | Unique, keyword-specific title per page |
127
- | Missing canonical URL | Duplicate content penalties | Add `<link rel="canonical">` to every page |
128
- | Client-only rendered content | Googlebot may miss JS | Server-render all indexable content |
129
- | Hardcoded sitemap | Goes stale | Generate sitemap dynamically |
130
- | `noindex` as "temporary" fix | Often forgotten | Fix the underlying issue |
131
- | Keyword stuffing in meta tags | Penalized by search engines | Natural, user-focused descriptions |
132
- | Missing `alt` on images | Lost image traffic + a11y failure | Descriptive alt on every meaningful image |
133
- | Unvalidated structured data | Silent errors = rich result loss | Validate with Rich Results Test before merge |
134
- | Blocking CSS/JS in robots.txt | Prevents page rendering | Only block admin/API routes |
135
- | Mixed trailing slash URLs | Splits link equity | Pick one convention, 301-redirect other |
66
+ ## Anti-Patterns & Structured Data Reference
67
+ See `REFERENCE.md` for detailed structured data examples, validation commands, and a trimmed anti-pattern checklist.
@@ -0,0 +1,58 @@
1
+ > Parent: [SKILL.md](./SKILL.md)
2
+
3
+ # Session Checkpoint Template
4
+
5
+ **Last Updated:** YYYY-MM-DD HH:MM
6
+ **Feature:** Short feature name
7
+ **Branch:** git branch name
8
+ **Tracker Issues:** TAS-XX, TAS-YY
9
+
10
+ ## Current Phase
11
+
12
+ ## Completed Work
13
+
14
+ | Task | Tracker | Agent | Status | Files |
15
+ |------|---------|-------|--------|-------|
16
+ | Description | TAS-XX | Agent | ✅ Done | file1.ts |
17
+
18
+ ## In Progress
19
+
20
+ | Task | Tracker | Agent | Status | Notes |
21
+ |------|---------|-------|--------|-------|
22
+ | Description | TAS-ZZ | Agent | 🔄 In Progress | what's done |
23
+
24
+ ## Remaining Work
25
+
26
+ | Task | Tracker | Agent | Dependencies | Files |
27
+ |------|---------|-------|-------------|-------|
28
+ | Description | TAS-AA | Agent | TAS-ZZ | file4.ts |
29
+
30
+ ## Pending Approvals
31
+
32
+ | Provider | Channel | Thread ID | Question | Posted At |
33
+ |----------|---------|-----------|----------|-----------|
34
+ | slack | C0AHAQFJ7C1 | 1772393542.345149 | Run migration on production? | 2026-03-01 14:30 |
35
+
36
+ Remove row once answered (VS Code chat reply also counts as resolved).
37
+
38
+ ## Decisions & Blockers
39
+
40
+ - Decision: rationale
41
+ - Blocker: what's needed to unblock
42
+
43
+ ## Delegation Cost Log
44
+
45
+ | # | Agent | Tracker | Model Tier | Est. Tokens | Duration | Status |
46
+ |---|-------|---------|------------|-------------|----------|--------|
47
+ | 1 | Content Engineer | TAS-XX | Standard | ~20K | 8 min | ✅ Done |
48
+
49
+ ## File Partitions
50
+
51
+ Agent A: dir1/, dir2/
52
+ Agent B: dir3/
53
+
54
+ ## Resume Instructions
55
+
56
+ 1. Check out branch `feat/xxx`
57
+ 2. Read tracker issues TAS-XX for context
58
+ 3. Start Phase N+1: [specific instructions]