contextos-agents 1.5.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/.agents/AGENTS.md +421 -0
- package/.agents/adapters/aider/export.js +137 -0
- package/.agents/adapters/claude/export.js +55 -0
- package/.agents/adapters/copilot/export.js +107 -0
- package/.agents/adapters/cursor/export.js +210 -0
- package/.agents/adapters/gemini/export.js +115 -0
- package/.agents/adapters/shared.js +119 -0
- package/.agents/adapters/zed/export.js +111 -0
- package/.agents/core/profiles/backend.yaml +47 -0
- package/.agents/core/profiles/enterprise.yaml +46 -0
- package/.agents/core/profiles/frontend.yaml +46 -0
- package/.agents/core/profiles/hackathon.yaml +45 -0
- package/.agents/core/profiles/mvp.yaml +43 -0
- package/.agents/core/profiles/startup.yaml +48 -0
- package/.agents/core/skills/adapters/EXAMPLES.md +19 -0
- package/.agents/core/skills/adapters/SKILL.md +105 -0
- package/.agents/core/skills/adapters/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/adapters/VALIDATION.json +12 -0
- package/.agents/core/skills/adapters/skill.yaml +10 -0
- package/.agents/core/skills/architecture-diagrams/SKILL.md +108 -0
- package/.agents/core/skills/architecture-diagrams/VALIDATION.json +12 -0
- package/.agents/core/skills/architecture-diagrams/skill.yaml +8 -0
- package/.agents/core/skills/brutalist-design/SKILL.md +150 -0
- package/.agents/core/skills/brutalist-design/VALIDATION.json +12 -0
- package/.agents/core/skills/brutalist-design/skill.yaml +8 -0
- package/.agents/core/skills/context-manager/EXAMPLES.md +19 -0
- package/.agents/core/skills/context-manager/SKILL.md +126 -0
- package/.agents/core/skills/context-manager/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/context-manager/VALIDATION.json +12 -0
- package/.agents/core/skills/context-manager/skill.yaml +10 -0
- package/.agents/core/skills/context-os/EXAMPLES.md +21 -0
- package/.agents/core/skills/context-os/SKILL.md +169 -0
- package/.agents/core/skills/context-os/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/context-os/VALIDATION.json +12 -0
- package/.agents/core/skills/context-os/packs.yaml +59 -0
- package/.agents/core/skills/context-os/references/context-rules.md +68 -0
- package/.agents/core/skills/context-os/references/pipeline.md +119 -0
- package/.agents/core/skills/context-os/references/project-graph.md +103 -0
- package/.agents/core/skills/context-os/rules.yaml +135 -0
- package/.agents/core/skills/context-os/skill.yaml +10 -0
- package/.agents/core/skills/database/EXAMPLES.md +74 -0
- package/.agents/core/skills/database/SKILL.md +101 -0
- package/.agents/core/skills/database/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/database/VALIDATION.json +11 -0
- package/.agents/core/skills/database/skill.yaml +25 -0
- package/.agents/core/skills/ddd/EXAMPLES.md +42 -0
- package/.agents/core/skills/ddd/SKILL.md +247 -0
- package/.agents/core/skills/ddd/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ddd/VALIDATION.json +12 -0
- package/.agents/core/skills/ddd/ddd.md +178 -0
- package/.agents/core/skills/ddd/skill.yaml +10 -0
- package/.agents/core/skills/decisions/EXAMPLES.md +35 -0
- package/.agents/core/skills/decisions/SKILL.md +90 -0
- package/.agents/core/skills/decisions/TROUBLESHOOTING.md +13 -0
- package/.agents/core/skills/decisions/VALIDATION.json +12 -0
- package/.agents/core/skills/decisions/skill.yaml +10 -0
- package/.agents/core/skills/docker/EXAMPLES.md +56 -0
- package/.agents/core/skills/docker/SKILL.md +63 -0
- package/.agents/core/skills/docker/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/docker/VALIDATION.json +11 -0
- package/.agents/core/skills/docker/skill.yaml +23 -0
- package/.agents/core/skills/engineering-workflow/EXAMPLES.md +57 -0
- package/.agents/core/skills/engineering-workflow/SKILL.md +343 -0
- package/.agents/core/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/engineering-workflow/VALIDATION.json +12 -0
- package/.agents/core/skills/engineering-workflow/skill.yaml +13 -0
- package/.agents/core/skills/fastapi/EXAMPLES.md +36 -0
- package/.agents/core/skills/fastapi/SKILL.md +148 -0
- package/.agents/core/skills/fastapi/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/fastapi/VALIDATION.json +12 -0
- package/.agents/core/skills/fastapi/fastapi.md +112 -0
- package/.agents/core/skills/fastapi/skill.yaml +10 -0
- package/.agents/core/skills/gemini-precision/SKILL.md +169 -0
- package/.agents/core/skills/gemini-precision/VALIDATION.json +12 -0
- package/.agents/core/skills/gemini-precision/skill.yaml +9 -0
- package/.agents/core/skills/generators/EXAMPLES.md +19 -0
- package/.agents/core/skills/generators/SKILL.md +112 -0
- package/.agents/core/skills/generators/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/generators/VALIDATION.json +12 -0
- package/.agents/core/skills/generators/skill.yaml +10 -0
- package/.agents/core/skills/generators/templates/API.md +77 -0
- package/.agents/core/skills/generators/templates/ARCHITECTURE.md +70 -0
- package/.agents/core/skills/generators/templates/DATABASE.md +42 -0
- package/.agents/core/skills/generators/templates/DECISION.md +46 -0
- package/.agents/core/skills/generators/templates/PRD.md +67 -0
- package/.agents/core/skills/generators/templates/PROJECT_GRAPH.md +56 -0
- package/.agents/core/skills/generators/templates/ROADMAP.md +51 -0
- package/.agents/core/skills/generators/templates/TASKS.md +43 -0
- package/.agents/core/skills/generators/templates/UI.md +73 -0
- package/.agents/core/skills/graphify/EXAMPLES.md +73 -0
- package/.agents/core/skills/graphify/SKILL.md +130 -0
- package/.agents/core/skills/graphify/VALIDATION.json +12 -0
- package/.agents/core/skills/graphify/skill.yaml +13 -0
- package/.agents/core/skills/gstack-roles/EXAMPLES.md +23 -0
- package/.agents/core/skills/gstack-roles/SKILL.md +152 -0
- package/.agents/core/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
- package/.agents/core/skills/gstack-roles/VALIDATION.json +12 -0
- package/.agents/core/skills/gstack-roles/skill.yaml +12 -0
- package/.agents/core/skills/impeccable-design/EXAMPLES.md +26 -0
- package/.agents/core/skills/impeccable-design/SKILL.md +201 -0
- package/.agents/core/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/impeccable-design/VALIDATION.json +12 -0
- package/.agents/core/skills/impeccable-design/skill.yaml +14 -0
- package/.agents/core/skills/interview-me/SKILL.md +97 -0
- package/.agents/core/skills/interview-me/VALIDATION.json +12 -0
- package/.agents/core/skills/interview-me/skill.yaml +8 -0
- package/.agents/core/skills/microservices/EXAMPLES.md +38 -0
- package/.agents/core/skills/microservices/SKILL.md +164 -0
- package/.agents/core/skills/microservices/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/microservices/VALIDATION.json +12 -0
- package/.agents/core/skills/microservices/microservices.md +119 -0
- package/.agents/core/skills/microservices/skill.yaml +10 -0
- package/.agents/core/skills/minimalist-design/SKILL.md +113 -0
- package/.agents/core/skills/minimalist-design/VALIDATION.json +12 -0
- package/.agents/core/skills/minimalist-design/skill.yaml +8 -0
- package/.agents/core/skills/nestjs/EXAMPLES.md +40 -0
- package/.agents/core/skills/nestjs/SKILL.md +139 -0
- package/.agents/core/skills/nestjs/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/nestjs/VALIDATION.json +12 -0
- package/.agents/core/skills/nestjs/nestjs.md +103 -0
- package/.agents/core/skills/nestjs/skill.yaml +10 -0
- package/.agents/core/skills/nextjs/EXAMPLES.md +40 -0
- package/.agents/core/skills/nextjs/SKILL.md +163 -0
- package/.agents/core/skills/nextjs/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/nextjs/VALIDATION.json +12 -0
- package/.agents/core/skills/nextjs/nextjs.md +67 -0
- package/.agents/core/skills/nextjs/skill.yaml +10 -0
- package/.agents/core/skills/node/EXAMPLES.md +80 -0
- package/.agents/core/skills/node/SKILL.md +128 -0
- package/.agents/core/skills/node/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/node/VALIDATION.json +12 -0
- package/.agents/core/skills/node/node.md +87 -0
- package/.agents/core/skills/node/skill.yaml +10 -0
- package/.agents/core/skills/performance/EXAMPLES.md +30 -0
- package/.agents/core/skills/performance/SKILL.md +75 -0
- package/.agents/core/skills/performance/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/performance/VALIDATION.json +12 -0
- package/.agents/core/skills/performance/performance.md +52 -0
- package/.agents/core/skills/performance/skill.yaml +10 -0
- package/.agents/core/skills/ponytail-mindset/EXAMPLES.md +45 -0
- package/.agents/core/skills/ponytail-mindset/SKILL.md +193 -0
- package/.agents/core/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ponytail-mindset/VALIDATION.json +12 -0
- package/.agents/core/skills/ponytail-mindset/skill.yaml +14 -0
- package/.agents/core/skills/react/EXAMPLES.md +79 -0
- package/.agents/core/skills/react/SKILL.md +132 -0
- package/.agents/core/skills/react/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/react/VALIDATION.json +12 -0
- package/.agents/core/skills/react/react.md +93 -0
- package/.agents/core/skills/react/skill.yaml +10 -0
- package/.agents/core/skills/react-best-practices/SKILL.md +155 -0
- package/.agents/core/skills/react-best-practices/VALIDATION.json +12 -0
- package/.agents/core/skills/react-best-practices/skill.yaml +10 -0
- package/.agents/core/skills/redesign-audit/SKILL.md +117 -0
- package/.agents/core/skills/redesign-audit/VALIDATION.json +12 -0
- package/.agents/core/skills/redesign-audit/skill.yaml +8 -0
- package/.agents/core/skills/security/EXAMPLES.md +64 -0
- package/.agents/core/skills/security/SKILL.md +158 -0
- package/.agents/core/skills/security/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/security/VALIDATION.json +12 -0
- package/.agents/core/skills/security/security.md +106 -0
- package/.agents/core/skills/security/skill.yaml +10 -0
- package/.agents/core/skills/soft-design/SKILL.md +108 -0
- package/.agents/core/skills/soft-design/VALIDATION.json +12 -0
- package/.agents/core/skills/soft-design/skill.yaml +8 -0
- package/.agents/core/skills/state-management/EXAMPLES.md +56 -0
- package/.agents/core/skills/state-management/SKILL.md +48 -0
- package/.agents/core/skills/state-management/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/state-management/VALIDATION.json +11 -0
- package/.agents/core/skills/state-management/skill.yaml +22 -0
- package/.agents/core/skills/subagent-orchestrator/SKILL.md +100 -0
- package/.agents/core/skills/subagent-orchestrator/VALIDATION.json +12 -0
- package/.agents/core/skills/subagent-orchestrator/skill.yaml +8 -0
- package/.agents/core/skills/system-design/EXAMPLES.md +75 -0
- package/.agents/core/skills/system-design/SKILL.md +419 -0
- package/.agents/core/skills/system-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/system-design/VALIDATION.json +12 -0
- package/.agents/core/skills/system-design/skill.yaml +13 -0
- package/.agents/core/skills/system-design/system-design.md +112 -0
- package/.agents/core/skills/testing/EXAMPLES.md +71 -0
- package/.agents/core/skills/testing/SKILL.md +70 -0
- package/.agents/core/skills/testing/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/testing/VALIDATION.json +11 -0
- package/.agents/core/skills/testing/skill.yaml +26 -0
- package/.agents/core/skills/typescript/EXAMPLES.md +64 -0
- package/.agents/core/skills/typescript/SKILL.md +112 -0
- package/.agents/core/skills/typescript/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/typescript/VALIDATION.json +12 -0
- package/.agents/core/skills/typescript/skill.yaml +10 -0
- package/.agents/core/skills/typescript/typescript.md +71 -0
- package/.agents/core/skills/ui-design/EXAMPLES.md +21 -0
- package/.agents/core/skills/ui-design/SKILL.md +124 -0
- package/.agents/core/skills/ui-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ui-design/VALIDATION.json +12 -0
- package/.agents/core/skills/ui-design/skill.yaml +10 -0
- package/.agents/core/skills/ui-design/ui.md +88 -0
- package/.agents/core/skills/ui-ux-pro/EXAMPLES.md +62 -0
- package/.agents/core/skills/ui-ux-pro/SKILL.md +375 -0
- package/.agents/core/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ui-ux-pro/VALIDATION.json +12 -0
- package/.agents/core/skills/ui-ux-pro/skill.yaml +13 -0
- package/.agents/core/skills/ux-design/EXAMPLES.md +36 -0
- package/.agents/core/skills/ux-design/SKILL.md +116 -0
- package/.agents/core/skills/ux-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ux-design/VALIDATION.json +12 -0
- package/.agents/core/skills/ux-design/skill.yaml +10 -0
- package/.agents/core/skills/ux-design/ux.md +80 -0
- package/.agents/core/skills/vercel-optimize/SKILL.md +83 -0
- package/.agents/core/skills/vercel-optimize/VALIDATION.json +12 -0
- package/.agents/core/skills/vercel-optimize/skill.yaml +10 -0
- package/.agents/core/skills/web-accessibility/EXAMPLES.md +39 -0
- package/.agents/core/skills/web-accessibility/SKILL.md +170 -0
- package/.agents/core/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/web-accessibility/VALIDATION.json +12 -0
- package/.agents/core/skills/web-accessibility/accessibility.md +63 -0
- package/.agents/core/skills/web-accessibility/skill.yaml +10 -0
- package/.agents/ctx.js +370 -0
- package/.agents/generated/claude/skills/adapters/SKILL.md +126 -0
- package/.agents/generated/claude/skills/architecture-diagrams/SKILL.md +101 -0
- package/.agents/generated/claude/skills/brutalist-design/SKILL.md +145 -0
- package/.agents/generated/claude/skills/context-manager/SKILL.md +147 -0
- package/.agents/generated/claude/skills/context-os/SKILL.md +191 -0
- package/.agents/generated/claude/skills/database/SKILL.md +191 -0
- package/.agents/generated/claude/skills/ddd/SKILL.md +305 -0
- package/.agents/generated/claude/skills/decisions/SKILL.md +134 -0
- package/.agents/generated/claude/skills/docker/SKILL.md +135 -0
- package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +414 -0
- package/.agents/generated/claude/skills/fastapi/SKILL.md +200 -0
- package/.agents/generated/claude/skills/gemini-precision/SKILL.md +161 -0
- package/.agents/generated/claude/skills/generators/SKILL.md +133 -0
- package/.agents/generated/claude/skills/graphify/SKILL.md +198 -0
- package/.agents/generated/claude/skills/gstack-roles/SKILL.md +184 -0
- package/.agents/generated/claude/skills/impeccable-design/SKILL.md +241 -0
- package/.agents/generated/claude/skills/interview-me/SKILL.md +90 -0
- package/.agents/generated/claude/skills/microservices/SKILL.md +218 -0
- package/.agents/generated/claude/skills/minimalist-design/SKILL.md +108 -0
- package/.agents/generated/claude/skills/nestjs/SKILL.md +195 -0
- package/.agents/generated/claude/skills/nextjs/SKILL.md +219 -0
- package/.agents/generated/claude/skills/node/SKILL.md +224 -0
- package/.agents/generated/claude/skills/performance/SKILL.md +121 -0
- package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +252 -0
- package/.agents/generated/claude/skills/react/SKILL.md +227 -0
- package/.agents/generated/claude/skills/react-best-practices/SKILL.md +146 -0
- package/.agents/generated/claude/skills/redesign-audit/SKILL.md +112 -0
- package/.agents/generated/claude/skills/security/SKILL.md +237 -0
- package/.agents/generated/claude/skills/soft-design/SKILL.md +103 -0
- package/.agents/generated/claude/skills/state-management/SKILL.md +120 -0
- package/.agents/generated/claude/skills/subagent-orchestrator/SKILL.md +93 -0
- package/.agents/generated/claude/skills/system-design/SKILL.md +507 -0
- package/.agents/generated/claude/skills/testing/SKILL.md +157 -0
- package/.agents/generated/claude/skills/typescript/SKILL.md +192 -0
- package/.agents/generated/claude/skills/ui-design/SKILL.md +161 -0
- package/.agents/generated/claude/skills/ui-ux-pro/SKILL.md +451 -0
- package/.agents/generated/claude/skills/ux-design/SKILL.md +168 -0
- package/.agents/generated/claude/skills/vercel-optimize/SKILL.md +76 -0
- package/.agents/generated/claude/skills/web-accessibility/SKILL.md +225 -0
- package/.agents/generated/gemini/skills/adapters/SKILL.md +135 -0
- package/.agents/generated/gemini/skills/architecture-diagrams/SKILL.md +107 -0
- package/.agents/generated/gemini/skills/brutalist-design/SKILL.md +151 -0
- package/.agents/generated/gemini/skills/context-manager/SKILL.md +156 -0
- package/.agents/generated/gemini/skills/context-os/SKILL.md +200 -0
- package/.agents/generated/gemini/skills/database/SKILL.md +200 -0
- package/.agents/generated/gemini/skills/ddd/SKILL.md +314 -0
- package/.agents/generated/gemini/skills/decisions/SKILL.md +143 -0
- package/.agents/generated/gemini/skills/docker/SKILL.md +144 -0
- package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +423 -0
- package/.agents/generated/gemini/skills/fastapi/SKILL.md +209 -0
- package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +167 -0
- package/.agents/generated/gemini/skills/generators/SKILL.md +142 -0
- package/.agents/generated/gemini/skills/graphify/SKILL.md +205 -0
- package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +193 -0
- package/.agents/generated/gemini/skills/impeccable-design/SKILL.md +250 -0
- package/.agents/generated/gemini/skills/interview-me/SKILL.md +96 -0
- package/.agents/generated/gemini/skills/microservices/SKILL.md +227 -0
- package/.agents/generated/gemini/skills/minimalist-design/SKILL.md +114 -0
- package/.agents/generated/gemini/skills/nestjs/SKILL.md +204 -0
- package/.agents/generated/gemini/skills/nextjs/SKILL.md +298 -0
- package/.agents/generated/gemini/skills/node/SKILL.md +323 -0
- package/.agents/generated/gemini/skills/performance/SKILL.md +185 -0
- package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +261 -0
- package/.agents/generated/gemini/skills/react/SKILL.md +332 -0
- package/.agents/generated/gemini/skills/react-best-practices/SKILL.md +152 -0
- package/.agents/generated/gemini/skills/redesign-audit/SKILL.md +118 -0
- package/.agents/generated/gemini/skills/security/SKILL.md +355 -0
- package/.agents/generated/gemini/skills/soft-design/SKILL.md +109 -0
- package/.agents/generated/gemini/skills/state-management/SKILL.md +129 -0
- package/.agents/generated/gemini/skills/subagent-orchestrator/SKILL.md +99 -0
- package/.agents/generated/gemini/skills/system-design/SKILL.md +631 -0
- package/.agents/generated/gemini/skills/testing/SKILL.md +166 -0
- package/.agents/generated/gemini/skills/typescript/SKILL.md +275 -0
- package/.agents/generated/gemini/skills/ui-design/SKILL.md +170 -0
- package/.agents/generated/gemini/skills/ui-ux-pro/SKILL.md +460 -0
- package/.agents/generated/gemini/skills/ux-design/SKILL.md +177 -0
- package/.agents/generated/gemini/skills/vercel-optimize/SKILL.md +82 -0
- package/.agents/generated/gemini/skills/web-accessibility/SKILL.md +300 -0
- package/.agents/mcp/runtime.py +454 -0
- package/.agents/mcp/server.mjs +189373 -0
- package/.agents/plugins.js +574 -0
- package/.agents/profiles.js +267 -0
- package/.agents/resolver.js +336 -0
- package/.agents/skills-index.json +200 -0
- package/.agents/skills.json +6 -0
- package/.agents/validate.js +500 -0
- package/LICENSE +21 -0
- package/README.md +415 -0
- package/benchmarks/gemini-issues.js +533 -0
- package/bin/index.js +458 -0
- package/package.json +70 -0
- package/registry.json +53 -0
- package/registry.schema.json +32 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Web Performance
|
|
3
|
+
description: >
|
|
4
|
+
ContextOS skill for Web Performance
|
|
5
|
+
---
|
|
6
|
+
# Web Performance & Core Web Vitals
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Enforces high-efficiency frontend and full-stack performance standards to achieve exceptional Core Web Vitals: Largest Contentful Paint (LCP < 2.5s), Interaction to Next Paint (INP < 200ms), and Cumulative Layout Shift (CLS < 0.1).
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Activate whenever analyzing, profiling, writing, or optimizing page loading speeds, network waterfalls, script bundling, animation frame rates, or data caching.
|
|
15
|
+
|
|
16
|
+
## Negative Constraints (What NOT to Do)
|
|
17
|
+
|
|
18
|
+
1. **NEVER introduce async waterfalls**: Do not chain sequential `await` calls when requests can be executed concurrently via `Promise.all()`.
|
|
19
|
+
2. **NEVER import large full libraries when only a utility is needed**: Never `import _ from 'lodash'`; use `import debounce from 'lodash/debounce'` or native alternatives.
|
|
20
|
+
3. **NEVER render images or videos without explicit aspect ratios**: Always provide `width` and `height` or `aspect-ratio` to avoid Cumulative Layout Shift (CLS).
|
|
21
|
+
4. **NEVER trigger synchronous layout thrashing**: Do not alternate between reading layout properties (`offsetHeight`, `getBoundingClientRect`) and writing styles in loops.
|
|
22
|
+
5. **NEVER animate non-composited properties**: Animate only GPU-composited CSS properties (`transform`, `opacity`). Never animate `width`, `height`, `top`, `left`, or `margin`.
|
|
23
|
+
|
|
24
|
+
## Rules & Patterns
|
|
25
|
+
|
|
26
|
+
### 1. Vercel Optimization Hierarchy by Impact
|
|
27
|
+
|
|
28
|
+
| Priority | Category | Key Optimization Target | Expected Impact |
|
|
29
|
+
|:---|:---|:---|:---|
|
|
30
|
+
| **1. CRITICAL** | **Eliminating Waterfalls** | Parallel data fetching (`Promise.all`), Suspense streaming | **30–60% faster LCP** |
|
|
31
|
+
| **2. CRITICAL** | **Bundle Size Optimization** | Direct submodule imports, `next/dynamic`, deferring 3rd party scripts | **40–70% smaller initial JS** |
|
|
32
|
+
| **3. HIGH** | **Server-Side & RSC Caching** | `React.cache()` request deduplication, edge SSR caching | **Lower TTFB & DB load** |
|
|
33
|
+
| **4. MEDIUM-HIGH** | **Client Query Optimization** | SWR / TanStack Query stale-while-revalidate, deduplication | **Zero redundant network calls** |
|
|
34
|
+
| **5. MEDIUM** | **Render & DOM Optimization** | Virtualization for large lists, state colocation, `:focus-visible` | **Smooth 60 FPS / INP < 100ms** |
|
|
35
|
+
|
|
36
|
+
### 2. Eliminating Network Waterfalls
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// [GOOD] Parallel execution
|
|
40
|
+
const [user, notifications] = await Promise.all([
|
|
41
|
+
fetchUser(),
|
|
42
|
+
fetchNotifications(),
|
|
43
|
+
]);
|
|
44
|
+
const posts = await fetchPosts(user.id);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. Layout Shift & Visual Stability (CLS < 0.1)
|
|
48
|
+
|
|
49
|
+
- **Images & Video**: Always supply `width`, `height`, and `sizes` or CSS `aspect-ratio: 16 / 9`.
|
|
50
|
+
- **Dynamic Content**: Reserve layout space for dynamically loaded widgets with min-height placeholders or skeletons.
|
|
51
|
+
- **Tabular Numbers**: Use `font-feature-settings: "tnum"` / `font-variant-numeric: tabular-nums` for counters, clocks, and tables to prevent number width jitter.
|
|
52
|
+
|
|
53
|
+
## Code Examples
|
|
54
|
+
|
|
55
|
+
See `EXAMPLES.md` for detailed performance patterns and benchmark snippets.
|
|
56
|
+
|
|
57
|
+
## Validation Checklist
|
|
58
|
+
|
|
59
|
+
- [ ] LCP target is < 2.5s with preloaded critical fonts and LCP image `priority`.
|
|
60
|
+
- [ ] No sequential `await` waterfalls in API routes or Server Components.
|
|
61
|
+
- [ ] All animated elements use only `transform` and `opacity`.
|
|
62
|
+
- [ ] `prefers-reduced-motion` media queries are respected.
|
|
63
|
+
- [ ] Large tables / lists (> 100 items) utilize virtualization.
|
|
64
|
+
|
|
65
|
+
## Common Mistakes
|
|
66
|
+
|
|
67
|
+
- Chaining independent async requests instead of using `Promise.all`.
|
|
68
|
+
- Animating layout-triggering properties (`height`, `width`, `top`) causing jank.
|
|
69
|
+
- Missing image dimensions causing layout shift when images finish loading.
|
|
70
|
+
|
|
71
|
+
## Integration Notes
|
|
72
|
+
|
|
73
|
+
- Pairs with `nextjs` and `react` for App Router caching and component lifecycle tuning.
|
|
74
|
+
- Pairs with `ui-ux-pro` for smooth animations and responsive design tokens.
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
<!-- Source: performance.md -->
|
|
78
|
+
|
|
79
|
+
# Web Performance — Best Practices
|
|
80
|
+
|
|
81
|
+
## Core Web Vitals
|
|
82
|
+
|
|
83
|
+
| Metric | Target | What it measures |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| LCP (Largest Contentful Paint) | < 2.5s | Loading performance |
|
|
86
|
+
| INP (Interaction to Next Paint) | < 200ms | Responsiveness |
|
|
87
|
+
| CLS (Cumulative Layout Shift) | < 0.1 | Visual stability |
|
|
88
|
+
|
|
89
|
+
## Loading Performance
|
|
90
|
+
|
|
91
|
+
- **Code splitting** — split by route, lazy load non-critical components
|
|
92
|
+
- **Tree shaking** — use ES modules, avoid side-effect imports
|
|
93
|
+
- **Image optimization** — WebP/AVIF, responsive srcset, lazy loading
|
|
94
|
+
- **Font loading** — `font-display: swap`, preload critical fonts
|
|
95
|
+
- **Critical CSS** — inline above-the-fold styles
|
|
96
|
+
- **Preconnect** — `<link rel="preconnect">` for third-party origins
|
|
97
|
+
|
|
98
|
+
## Runtime Performance
|
|
99
|
+
|
|
100
|
+
- **Avoid layout thrashing** — batch DOM reads and writes
|
|
101
|
+
- **Debounce/throttle** — expensive event handlers (scroll, resize, input)
|
|
102
|
+
- **Web Workers** — offload heavy computation
|
|
103
|
+
- **Virtualize long lists** — render only visible items
|
|
104
|
+
- **Avoid synchronous operations** — use async/await, requestIdleCallback
|
|
105
|
+
|
|
106
|
+
## Bundle Optimization
|
|
107
|
+
|
|
108
|
+
- **Analyze bundle** — use webpack-bundle-analyzer or similar
|
|
109
|
+
- **Dynamic imports** — `import()` for heavy libraries
|
|
110
|
+
- **Avoid barrel exports** — they prevent tree shaking
|
|
111
|
+
- **Vendor splitting** — separate vendor chunks for caching
|
|
112
|
+
- **Compression** — Brotli > gzip
|
|
113
|
+
|
|
114
|
+
## Caching Strategy
|
|
115
|
+
|
|
116
|
+
| Asset | Cache | Strategy |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| HTML | Short (5min) | Revalidate |
|
|
119
|
+
| JS/CSS (hashed) | Long (1 year) | Immutable |
|
|
120
|
+
| Images | Long (1 year) | Immutable |
|
|
121
|
+
| API responses | Depends | stale-while-revalidate |
|
|
122
|
+
| Fonts | Long (1 year) | Immutable |
|
|
123
|
+
|
|
124
|
+
## Anti-Patterns
|
|
125
|
+
|
|
126
|
+
- [FAIL] Importing entire libraries (`import _ from 'lodash'`)
|
|
127
|
+
- [FAIL] Unoptimized images (PNG > 500KB)
|
|
128
|
+
- [FAIL] Blocking scripts in `<head>` without `defer`
|
|
129
|
+
- [FAIL] Layout shifts from dynamic content (no dimensions on images)
|
|
130
|
+
- [FAIL] Premature optimization — measure first, optimize second
|
|
131
|
+
|
|
132
|
+
<!-- Source: EXAMPLES.md -->
|
|
133
|
+
|
|
134
|
+
# performance Examples — Anti-patterns vs ContextOS Standard
|
|
135
|
+
|
|
136
|
+
## Example 1: Dynamic Imports for Heavy Libraries
|
|
137
|
+
|
|
138
|
+
### Anti-pattern: Static Import of Heavy Visualizers in Initial Bundle
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
// BAD: Adds 800KB (Monaco editor or Three.js) to the critical first-paint bundle!
|
|
142
|
+
import { CodeEditor } from '@/components/CodeEditor';
|
|
143
|
+
|
|
144
|
+
export default function Page() {
|
|
145
|
+
return <div><CodeEditor /></div>;
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Best practice: ContextOS Standard (Lazy Load on Demand)
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
// GOOD: Dynamic import splits chunk, only downloads when component renders
|
|
153
|
+
import dynamic from 'next/dynamic';
|
|
154
|
+
|
|
155
|
+
const CodeEditor = dynamic(
|
|
156
|
+
() => import('@/components/CodeEditor'),
|
|
157
|
+
{ loading: () => <EditorSkeleton />, ssr: false }
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
export default function Page() {
|
|
161
|
+
return <div><CodeEditor /></div>;
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
<!-- Source: TROUBLESHOOTING.md -->
|
|
166
|
+
|
|
167
|
+
# performance Troubleshooting & Common Mistakes
|
|
168
|
+
|
|
169
|
+
## 1. Cumulative Layout Shift (CLS) from Images & Fonts
|
|
170
|
+
|
|
171
|
+
- **Symptom**: Page content jumps around as images and custom fonts load.
|
|
172
|
+
- **Root Cause**: Missing width and height attributes on image tags and FOUT (Flash of Unstyled Text).
|
|
173
|
+
- **Fix**: Always specify aspect-ratio or width/height on images, and use next/font to preload web fonts with fallback sizing.
|
|
174
|
+
|
|
175
|
+
## 2. High Interaction to Next Paint (INP)
|
|
176
|
+
|
|
177
|
+
- **Symptom**: User clicks a button and the UI freezes for 200ms+ before responding.
|
|
178
|
+
- **Root Cause**: Long task blocking the main thread during event dispatch.
|
|
179
|
+
- **Fix**: Defer non-critical state updates using startTransition() or split heavy computation with Web Workers.
|
|
180
|
+
|
|
181
|
+
## 3. Unoptimized SVG / Icon Overload
|
|
182
|
+
|
|
183
|
+
- **Symptom**: Huge DOM node count and slow initial render times.
|
|
184
|
+
- **Root Cause**: Rendering 500 inline SVG icons with complex paths.
|
|
185
|
+
- **Fix**: Use SVG sprite sheets, dynamic icon loaders, or lightweight canvas rendering for dense data visualizations.
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail-mindset
|
|
3
|
+
description: >
|
|
4
|
+
Minimalist coding mindset based on DietrichGebert/ponytail. Teaches the AI to write only what is strictly necessary. Uses a 7-rung ladder: YAGNI → reuse → stdlib → platform → deps → one-liner → minimum. Minimizes unnecessary boilerplate and over-engineering while keeping all safety, validation and security guards.
|
|
5
|
+
---
|
|
6
|
+
# ponytail-mindset
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Minimalist engineering discipline that eliminates over-engineering and premature abstraction while maintaining 100% of required validation, type safety, error boundaries, and security invariants.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Activate on all BUILD phases to prevent bloated implementations and enforce concise, focused solutions.
|
|
15
|
+
|
|
16
|
+
## Rules & Patterns
|
|
17
|
+
|
|
18
|
+
Based on [DietrichGebert/ponytail](https://github.com/DietrichGebert/ponytail).
|
|
19
|
+
|
|
20
|
+
> _He says nothing. He writes one line. It works._
|
|
21
|
+
|
|
22
|
+
**Core Impact**: Dramatically reduces code footprint by eliminating premature abstraction, YAGNI violations, and boilerplate, while keeping all safety invariants (validation, error handling, security) 100% intact.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### Core Principle
|
|
27
|
+
|
|
28
|
+
> **The best code is code you don't write.**
|
|
29
|
+
> Write only what the task strictly needs. Lazy about the solution, never about reading and understanding.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
### The 7-Rung Decision Ladder
|
|
34
|
+
|
|
35
|
+
**Before writing ANY code**, stop and check each rung in order. Stop at the first rung that holds:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
1. Does this need to exist?
|
|
39
|
+
→ No: YAGNI — skip it entirely. Don't build for "future use."
|
|
40
|
+
|
|
41
|
+
2. Already in this codebase or component library?
|
|
42
|
+
→ Yes: Reuse it. Don't rewrite. Call the existing function/component/module.
|
|
43
|
+
→ For UI: Check shadcn/ui FIRST. Before building a complex UI element from scratch, check if it exists in the component library. If yes, generate the install command: npx shadcn@latest add dialog — never manually rewrite what shadcn already provides.
|
|
44
|
+
|
|
45
|
+
3. Standard library does it?
|
|
46
|
+
→ Yes: Use it. Don't write formatDate() — use Intl.DateTimeFormat or dayjs.
|
|
47
|
+
|
|
48
|
+
4. Native platform feature?
|
|
49
|
+
→ Yes: Use it. Don't install flatpickr when <input type="date"> exists.
|
|
50
|
+
→ Exception for UI Components: If a native HTML element (like <input type="date"> or <select>) CANNOT be styled consistently across Chrome, Safari, and Firefox to match the premium design system — use the established component library (e.g., shadcn/ui <DatePicker>, <Select>) instead. Cross-browser inconsistency is a legitimate reason to NOT use native.
|
|
51
|
+
|
|
52
|
+
5. Already-installed dependency?
|
|
53
|
+
→ Yes: Use it. Don't install a new library to do what an existing one can.
|
|
54
|
+
|
|
55
|
+
6. Can it be done in one line?
|
|
56
|
+
→ Yes: One line. No abstraction layer needed.
|
|
57
|
+
|
|
58
|
+
7. Only then: write the MINIMUM that works.
|
|
59
|
+
→ No classes when a function works. No module when an inline does.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### The Rule of Three (Do Not Abstract Early)
|
|
65
|
+
|
|
66
|
+
- **First occurrence**: Write it inline directly where it is needed.
|
|
67
|
+
- **Second occurrence**: Duplicate it cleanly. Duplication is cheaper than the wrong abstraction.
|
|
68
|
+
- **Third occurrence**: Only now extract a shared helper or utility.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### 10 Concrete Over-Engineering Red Flags
|
|
73
|
+
|
|
74
|
+
1. Creating a `GenericRepository<T>` when you only have 2 database tables.
|
|
75
|
+
2. Creating a custom state machine or complex reducer for 2 boolean flags.
|
|
76
|
+
3. Adding a configuration file or environment variables for values that never change.
|
|
77
|
+
4. Writing custom retry/circuit-breaker logic when native `fetch` or SDK already handles it.
|
|
78
|
+
5. Building a generic `BaseService` with 15 hook methods implemented by only one class.
|
|
79
|
+
6. Wrapping every standard library call in a custom helper class (`StringUtils`, `DateUtils`, `ObjectUtils`).
|
|
80
|
+
7. Creating a multi-level folder structure (`domains/auth/adapters/driving/rest/controllers/dto/`) for a 30-line microservice.
|
|
81
|
+
8. Writing custom mock frameworks when Vitest/Jest/Node test runner provide standard mocks.
|
|
82
|
+
9. Installing a 50KB npm package for a 3-line utility (e.g. `left-pad`, `is-number`, `deep-clone`).
|
|
83
|
+
10. Pre-optimizing caching and indexing for endpoints serving 10 requests a day.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### The Sacred Exceptions (NEVER Cut These)
|
|
88
|
+
|
|
89
|
+
The ladder applies to features and abstractions. These 4 areas are **non-negotiable** and **never simplified away**:
|
|
90
|
+
|
|
91
|
+
#### 1. Input Validation
|
|
92
|
+
|
|
93
|
+
```javascript
|
|
94
|
+
// [GOOD] Always validate — even if "internal" API
|
|
95
|
+
function createUser(data) {
|
|
96
|
+
if (!data.email || !isValidEmail(data.email)) {
|
|
97
|
+
throw new ValidationError('Invalid email');
|
|
98
|
+
}
|
|
99
|
+
return db.insert('users', data);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// [BAD] Never skip validation for "speed"
|
|
103
|
+
function createUser(data) {
|
|
104
|
+
return db.insert('users', data); // NEVER
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
#### 2. Error Handling
|
|
109
|
+
|
|
110
|
+
```javascript
|
|
111
|
+
// [GOOD] Always handle errors explicitly
|
|
112
|
+
async function fetchUser(id) {
|
|
113
|
+
try {
|
|
114
|
+
const user = await db.findById(id);
|
|
115
|
+
if (!user) throw new NotFoundError(`User ${id} not found`);
|
|
116
|
+
return user;
|
|
117
|
+
} catch (err) {
|
|
118
|
+
logger.error('fetchUser failed', { id, err });
|
|
119
|
+
throw err;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
#### 3. Security Checks
|
|
125
|
+
|
|
126
|
+
- Authorization check BEFORE every query or mutation.
|
|
127
|
+
- Parameterized queries everywhere — zero string concatenation in SQL.
|
|
128
|
+
- Strict sanitization of all rendered HTML and markdown.
|
|
129
|
+
|
|
130
|
+
#### 4. Type Safety & Behavioral Tests
|
|
131
|
+
|
|
132
|
+
- Strict TypeScript types — no `any` evasion.
|
|
133
|
+
- Tests covering happy path, 4xx, and 5xx edge cases.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Code Examples
|
|
138
|
+
|
|
139
|
+
### Native Platform vs Over-Built Package
|
|
140
|
+
|
|
141
|
+
**Over-build**:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
npm install flatpickr
|
|
145
|
+
# Creates DatePickerWrapper.jsx (45 lines) + useDatePicker.js (30 lines) + styles (60 lines)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Ponytail approach (rung 4)**:
|
|
149
|
+
|
|
150
|
+
```html
|
|
151
|
+
<input type="date" name="date" aria-label="Appointment date" />
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Next.js App Router Server Action vs REST Endpoint
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
// Instead of /api/users/[id]/route.ts + custom fetch wrapper:
|
|
158
|
+
"use server";
|
|
159
|
+
|
|
160
|
+
export async function updateUser(id: string, data: UpdateUserInput) {
|
|
161
|
+
const session = await getSession(); // auth check — never skip
|
|
162
|
+
if (session?.userId !== id) throw new Error("Forbidden");
|
|
163
|
+
return db.users.update(id, data);
|
|
164
|
+
}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Validation Checklist
|
|
170
|
+
|
|
171
|
+
- [ ] Every new dependency has been verified: cannot be solved with native platform or existing dependencies.
|
|
172
|
+
- [ ] No single-use abstractions, wrappers, or interfaces created.
|
|
173
|
+
- [ ] Sacred exceptions preserved: 100% input validation, explicit error handling, security checks intact.
|
|
174
|
+
- [ ] All code written passes all existing unit and integration tests.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Common Mistakes
|
|
179
|
+
|
|
180
|
+
- **Cutting validation to write less code**: The goal is less architecture/boilerplate, never less safety.
|
|
181
|
+
- **Creating utilities "for future use"**: Only write utilities when used 3+ times.
|
|
182
|
+
- **Rewriting component libraries**: Building custom modals, tabs, or tooltips from scratch when shadcn/ui or Radix is already in the project.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Integration Notes
|
|
187
|
+
|
|
188
|
+
- Runs at the start of every `[PHASE: Build]` and `[PHASE: Review]`.
|
|
189
|
+
- Enforces minimalism alongside `system-design` (think at scale, implement minimally).
|
|
190
|
+
- Pairs with `impeccable-design` for UI tasks.
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
<!-- Source: EXAMPLES.md -->
|
|
194
|
+
|
|
195
|
+
# ponytail-mindset Examples — Anti-patterns vs ContextOS Standard
|
|
196
|
+
|
|
197
|
+
## Example 1: Data Formatting and Manipulation
|
|
198
|
+
|
|
199
|
+
### Anti-pattern: Over-engineered Custom Utility Class
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
// BAD: 40 lines of boilerplate for relative date formatting
|
|
203
|
+
export class DateFormatterService {
|
|
204
|
+
private static instance: DateFormatterService;
|
|
205
|
+
public static getInstance() { /* singleton boilerplate */ }
|
|
206
|
+
public formatRelative(date: Date): string {
|
|
207
|
+
const diff = Date.now() - date.getTime();
|
|
208
|
+
// 30 lines of manual math, plurals, and string building
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Best practice: ContextOS Standard (Standard Library Native API)
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
// GOOD: Native Intl API, zero bundle cost, handles all locales
|
|
217
|
+
export const formatRelativeTime = (date: Date, locale = 'en'): string => {
|
|
218
|
+
const diffDays = Math.round((date.getTime() - Date.now()) / (1000 * 60 * 60 * 24));
|
|
219
|
+
return new Intl.RelativeTimeFormat(locale, { numeric: 'auto' }).format(diffDays, 'day');
|
|
220
|
+
};
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Example 2: Component Library Reuse
|
|
226
|
+
|
|
227
|
+
### Anti-pattern: Hand-rolled Modal from Scratch
|
|
228
|
+
|
|
229
|
+
```text
|
|
230
|
+
BAD: Writing custom overlay DOM, manual scroll locking, manual focus trapping,
|
|
231
|
+
and custom keydown listeners. Burns 300+ lines of fragile code.
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Best practice: ContextOS Standard (Leverage Established Primitives)
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# GOOD: Install battle-tested primitive that handles ARIA, portals, and keyboard navigation
|
|
238
|
+
npx shadcn@latest add dialog
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
<!-- Source: TROUBLESHOOTING.md -->
|
|
242
|
+
|
|
243
|
+
# ponytail-mindset Troubleshooting & Common Mistakes
|
|
244
|
+
|
|
245
|
+
## 1. Conflating Minimalism with Cutting Safety Guards
|
|
246
|
+
|
|
247
|
+
- **Symptom**: Agent removes input validation, error handling, or security checks in the name of "less code".
|
|
248
|
+
- **Root Cause**: Misunderstanding the Ponytail principle. Ponytail cuts unnecessary abstractions, never safety invariants.
|
|
249
|
+
- **Fix**: Invariant: Always retain 100% of input sanitization, error boundaries, and type safety checks.
|
|
250
|
+
|
|
251
|
+
## 2. "Just In Case" Speculative Coding (YAGNI Violation)
|
|
252
|
+
|
|
253
|
+
- **Symptom**: Adding config options, generics, and plugin interfaces for features not requested.
|
|
254
|
+
- **Root Cause**: Premature future-proofing.
|
|
255
|
+
- **Fix**: Apply Rung 1 of the ladder: If it doesn't solve the immediate requirement, do not write it.
|
|
256
|
+
|
|
257
|
+
## 3. Reinventing Installed Dependencies
|
|
258
|
+
|
|
259
|
+
- **Symptom**: Writing a deep-clone helper when Lodash or native structuredClone is available.
|
|
260
|
+
- **Root Cause**: Skipping inspection of package.json and runtime environment.
|
|
261
|
+
- **Fix**: Inspect installed dependencies before writing utility functions.
|