@minhduydev/mdpi 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/index.js +1187 -0
- package/dist/template/.pi/.env.example +28 -0
- package/dist/template/.pi/AGENTS.md +226 -0
- package/dist/template/.pi/QUALITY.md +13 -0
- package/dist/template/.pi/README.md +452 -0
- package/dist/template/.pi/VERSION +1 -0
- package/dist/template/.pi/agents/INDEX.md +54 -0
- package/dist/template/.pi/agents/build.md +194 -0
- package/dist/template/.pi/agents/explore.md +85 -0
- package/dist/template/.pi/agents/general.md +189 -0
- package/dist/template/.pi/agents/plan.md +407 -0
- package/dist/template/.pi/agents/review.md +198 -0
- package/dist/template/.pi/agents/scout.md +142 -0
- package/dist/template/.pi/agents/vision.md +157 -0
- package/dist/template/.pi/artifacts/example/plan.md +12 -0
- package/dist/template/.pi/artifacts/example/progress.md +4 -0
- package/dist/template/.pi/artifacts/example/research.md +4 -0
- package/dist/template/.pi/artifacts/example/spec.md +16 -0
- package/dist/template/.pi/context/architecture.md +141 -0
- package/dist/template/.pi/context/fallow.md +137 -0
- package/dist/template/.pi/extensions/templates-injector.ts +76 -0
- package/dist/template/.pi/extensions/workflows-runner.ts +301 -0
- package/dist/template/.pi/guard.example.json +75 -0
- package/dist/template/.pi/prompts/INDEX.md +78 -0
- package/dist/template/.pi/prompts/audit.md +109 -0
- package/dist/template/.pi/prompts/close.md +88 -0
- package/dist/template/.pi/prompts/create.md +197 -0
- package/dist/template/.pi/prompts/fix.md +117 -0
- package/dist/template/.pi/prompts/gc.md +112 -0
- package/dist/template/.pi/prompts/init.md +206 -0
- package/dist/template/.pi/prompts/loop-check.md +87 -0
- package/dist/template/.pi/prompts/loop-init.md +157 -0
- package/dist/template/.pi/prompts/loop-review.md +90 -0
- package/dist/template/.pi/prompts/plan.md +254 -0
- package/dist/template/.pi/prompts/research.md +136 -0
- package/dist/template/.pi/prompts/ship.md +219 -0
- package/dist/template/.pi/prompts/status.md +92 -0
- package/dist/template/.pi/prompts/verify.md +154 -0
- package/dist/template/.pi/scripts/gc-check.sh +86 -0
- package/dist/template/.pi/settings.json +15 -0
- package/dist/template/.pi/skills/INDEX.md +331 -0
- package/dist/template/.pi/skills/accessibility-audit/SKILL.md +205 -0
- package/dist/template/.pi/skills/accessibility-audit/references/accessibility-checklist.md +109 -0
- package/dist/template/.pi/skills/agent-code-quality-gate/SKILL.md +131 -0
- package/dist/template/.pi/skills/api-and-interface-design/SKILL.md +159 -0
- package/dist/template/.pi/skills/behavioral-kernel/SKILL.md +92 -0
- package/dist/template/.pi/skills/brainstorming/SKILL.md +138 -0
- package/dist/template/.pi/skills/browser-testing-with-devtools/SKILL.md +90 -0
- package/dist/template/.pi/skills/chrome-devtools/SKILL.md +129 -0
- package/dist/template/.pi/skills/ci-cd-and-automation/SKILL.md +199 -0
- package/dist/template/.pi/skills/cloudflare/SKILL.md +271 -0
- package/dist/template/.pi/skills/cloudflare/references/agents-sdk/README.md +35 -0
- package/dist/template/.pi/skills/cloudflare/references/agents-sdk/api.md +100 -0
- package/dist/template/.pi/skills/cloudflare/references/agents-sdk/configuration.md +99 -0
- package/dist/template/.pi/skills/cloudflare/references/agents-sdk/gotchas.md +59 -0
- package/dist/template/.pi/skills/cloudflare/references/agents-sdk/patterns.md +89 -0
- package/dist/template/.pi/skills/cloudflare/references/ai-gateway/README.md +695 -0
- package/dist/template/.pi/skills/cloudflare/references/ai-search/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/ai-search/api.md +38 -0
- package/dist/template/.pi/skills/cloudflare/references/ai-search/configuration.md +52 -0
- package/dist/template/.pi/skills/cloudflare/references/ai-search/gotchas.md +41 -0
- package/dist/template/.pi/skills/cloudflare/references/ai-search/patterns.md +45 -0
- package/dist/template/.pi/skills/cloudflare/references/analytics-engine/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/analytics-engine/api.md +27 -0
- package/dist/template/.pi/skills/cloudflare/references/analytics-engine/configuration.md +45 -0
- package/dist/template/.pi/skills/cloudflare/references/analytics-engine/gotchas.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/analytics-engine/patterns.md +36 -0
- package/dist/template/.pi/skills/cloudflare/references/api/README.md +21 -0
- package/dist/template/.pi/skills/cloudflare/references/api/api.md +31 -0
- package/dist/template/.pi/skills/cloudflare/references/api/configuration.md +20 -0
- package/dist/template/.pi/skills/cloudflare/references/api/gotchas.md +28 -0
- package/dist/template/.pi/skills/cloudflare/references/api/patterns.md +47 -0
- package/dist/template/.pi/skills/cloudflare/references/api-shield/README.md +20 -0
- package/dist/template/.pi/skills/cloudflare/references/api-shield/api.md +78 -0
- package/dist/template/.pi/skills/cloudflare/references/api-shield/configuration.md +128 -0
- package/dist/template/.pi/skills/cloudflare/references/api-shield/gotchas.md +51 -0
- package/dist/template/.pi/skills/cloudflare/references/api-shield/patterns.md +145 -0
- package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/README.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/api.md +50 -0
- package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/configuration.md +53 -0
- package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/gotchas.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/argo-smart-routing/patterns.md +45 -0
- package/dist/template/.pi/skills/cloudflare/references/bindings/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/bindings/api.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/bindings/configuration.md +58 -0
- package/dist/template/.pi/skills/cloudflare/references/bindings/gotchas.md +35 -0
- package/dist/template/.pi/skills/cloudflare/references/bindings/patterns.md +37 -0
- package/dist/template/.pi/skills/cloudflare/references/bot-management/README.md +71 -0
- package/dist/template/.pi/skills/cloudflare/references/bot-management/api.md +168 -0
- package/dist/template/.pi/skills/cloudflare/references/bot-management/configuration.md +114 -0
- package/dist/template/.pi/skills/cloudflare/references/bot-management/gotchas.md +99 -0
- package/dist/template/.pi/skills/cloudflare/references/bot-management/patterns.md +125 -0
- package/dist/template/.pi/skills/cloudflare/references/browser-rendering/README.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/browser-rendering/api.md +54 -0
- package/dist/template/.pi/skills/cloudflare/references/browser-rendering/configuration.md +47 -0
- package/dist/template/.pi/skills/cloudflare/references/browser-rendering/gotchas.md +29 -0
- package/dist/template/.pi/skills/cloudflare/references/browser-rendering/patterns.md +29 -0
- package/dist/template/.pi/skills/cloudflare/references/c3/README.md +264 -0
- package/dist/template/.pi/skills/cloudflare/references/cache-reserve/README.md +93 -0
- package/dist/template/.pi/skills/cloudflare/references/cache-reserve/api.md +176 -0
- package/dist/template/.pi/skills/cloudflare/references/cache-reserve/configuration.md +164 -0
- package/dist/template/.pi/skills/cloudflare/references/cache-reserve/gotchas.md +203 -0
- package/dist/template/.pi/skills/cloudflare/references/cache-reserve/patterns.md +180 -0
- package/dist/template/.pi/skills/cloudflare/references/containers/README.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/containers/api.md +43 -0
- package/dist/template/.pi/skills/cloudflare/references/containers/configuration.md +56 -0
- package/dist/template/.pi/skills/cloudflare/references/containers/gotchas.md +21 -0
- package/dist/template/.pi/skills/cloudflare/references/containers/patterns.md +40 -0
- package/dist/template/.pi/skills/cloudflare/references/cron-triggers/README.md +85 -0
- package/dist/template/.pi/skills/cloudflare/references/cron-triggers/api.md +198 -0
- package/dist/template/.pi/skills/cloudflare/references/cron-triggers/configuration.md +151 -0
- package/dist/template/.pi/skills/cloudflare/references/cron-triggers/gotchas.md +129 -0
- package/dist/template/.pi/skills/cloudflare/references/cron-triggers/patterns.md +122 -0
- package/dist/template/.pi/skills/cloudflare/references/d1/README.md +92 -0
- package/dist/template/.pi/skills/cloudflare/references/d1/api.md +141 -0
- package/dist/template/.pi/skills/cloudflare/references/d1/configuration.md +127 -0
- package/dist/template/.pi/skills/cloudflare/references/d1/gotchas.md +70 -0
- package/dist/template/.pi/skills/cloudflare/references/d1/patterns.md +144 -0
- package/dist/template/.pi/skills/cloudflare/references/ddos/README.md +34 -0
- package/dist/template/.pi/skills/cloudflare/references/ddos/api.md +136 -0
- package/dist/template/.pi/skills/cloudflare/references/ddos/configuration.md +67 -0
- package/dist/template/.pi/skills/cloudflare/references/ddos/gotchas.md +114 -0
- package/dist/template/.pi/skills/cloudflare/references/ddos/patterns.md +158 -0
- package/dist/template/.pi/skills/cloudflare/references/do-storage/README.md +62 -0
- package/dist/template/.pi/skills/cloudflare/references/do-storage/api.md +89 -0
- package/dist/template/.pi/skills/cloudflare/references/do-storage/configuration.md +116 -0
- package/dist/template/.pi/skills/cloudflare/references/do-storage/gotchas.md +93 -0
- package/dist/template/.pi/skills/cloudflare/references/do-storage/patterns.md +112 -0
- package/dist/template/.pi/skills/cloudflare/references/durable-objects/README.md +125 -0
- package/dist/template/.pi/skills/cloudflare/references/durable-objects/api.md +152 -0
- package/dist/template/.pi/skills/cloudflare/references/durable-objects/configuration.md +148 -0
- package/dist/template/.pi/skills/cloudflare/references/durable-objects/gotchas.md +158 -0
- package/dist/template/.pi/skills/cloudflare/references/durable-objects/patterns.md +255 -0
- package/dist/template/.pi/skills/cloudflare/references/email-routing/README.md +18 -0
- package/dist/template/.pi/skills/cloudflare/references/email-routing/api.md +46 -0
- package/dist/template/.pi/skills/cloudflare/references/email-routing/configuration.md +63 -0
- package/dist/template/.pi/skills/cloudflare/references/email-routing/gotchas.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/email-routing/patterns.md +46 -0
- package/dist/template/.pi/skills/cloudflare/references/email-workers/README.md +598 -0
- package/dist/template/.pi/skills/cloudflare/references/hyperdrive/README.md +62 -0
- package/dist/template/.pi/skills/cloudflare/references/hyperdrive/api.md +137 -0
- package/dist/template/.pi/skills/cloudflare/references/hyperdrive/configuration.md +133 -0
- package/dist/template/.pi/skills/cloudflare/references/hyperdrive/gotchas.md +184 -0
- package/dist/template/.pi/skills/cloudflare/references/hyperdrive/patterns.md +176 -0
- package/dist/template/.pi/skills/cloudflare/references/images/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/images/api.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/images/configuration.md +45 -0
- package/dist/template/.pi/skills/cloudflare/references/images/gotchas.md +23 -0
- package/dist/template/.pi/skills/cloudflare/references/images/patterns.md +31 -0
- package/dist/template/.pi/skills/cloudflare/references/kv/README.md +60 -0
- package/dist/template/.pi/skills/cloudflare/references/kv/api.md +114 -0
- package/dist/template/.pi/skills/cloudflare/references/kv/configuration.md +92 -0
- package/dist/template/.pi/skills/cloudflare/references/kv/gotchas.md +117 -0
- package/dist/template/.pi/skills/cloudflare/references/kv/patterns.md +139 -0
- package/dist/template/.pi/skills/cloudflare/references/miniflare/README.md +64 -0
- package/dist/template/.pi/skills/cloudflare/references/miniflare/api.md +144 -0
- package/dist/template/.pi/skills/cloudflare/references/miniflare/configuration.md +203 -0
- package/dist/template/.pi/skills/cloudflare/references/miniflare/gotchas.md +187 -0
- package/dist/template/.pi/skills/cloudflare/references/miniflare/patterns.md +211 -0
- package/dist/template/.pi/skills/cloudflare/references/network-interconnect/README.md +60 -0
- package/dist/template/.pi/skills/cloudflare/references/network-interconnect/api.md +240 -0
- package/dist/template/.pi/skills/cloudflare/references/network-interconnect/configuration.md +127 -0
- package/dist/template/.pi/skills/cloudflare/references/network-interconnect/gotchas.md +171 -0
- package/dist/template/.pi/skills/cloudflare/references/network-interconnect/patterns.md +171 -0
- package/dist/template/.pi/skills/cloudflare/references/observability/README.md +18 -0
- package/dist/template/.pi/skills/cloudflare/references/observability/api.md +51 -0
- package/dist/template/.pi/skills/cloudflare/references/observability/configuration.md +60 -0
- package/dist/template/.pi/skills/cloudflare/references/observability/gotchas.md +36 -0
- package/dist/template/.pi/skills/cloudflare/references/observability/patterns.md +42 -0
- package/dist/template/.pi/skills/cloudflare/references/pages/README.md +76 -0
- package/dist/template/.pi/skills/cloudflare/references/pages/api.md +200 -0
- package/dist/template/.pi/skills/cloudflare/references/pages/configuration.md +228 -0
- package/dist/template/.pi/skills/cloudflare/references/pages/gotchas.md +161 -0
- package/dist/template/.pi/skills/cloudflare/references/pages/patterns.md +145 -0
- package/dist/template/.pi/skills/cloudflare/references/pages-functions/README.md +57 -0
- package/dist/template/.pi/skills/cloudflare/references/pages-functions/api.md +201 -0
- package/dist/template/.pi/skills/cloudflare/references/pages-functions/configuration.md +159 -0
- package/dist/template/.pi/skills/cloudflare/references/pages-functions/gotchas.md +151 -0
- package/dist/template/.pi/skills/cloudflare/references/pages-functions/patterns.md +190 -0
- package/dist/template/.pi/skills/cloudflare/references/pipelines/README.md +664 -0
- package/dist/template/.pi/skills/cloudflare/references/pulumi/README.md +107 -0
- package/dist/template/.pi/skills/cloudflare/references/pulumi/api.md +194 -0
- package/dist/template/.pi/skills/cloudflare/references/pulumi/configuration.md +216 -0
- package/dist/template/.pi/skills/cloudflare/references/pulumi/gotchas.md +223 -0
- package/dist/template/.pi/skills/cloudflare/references/pulumi/patterns.md +139 -0
- package/dist/template/.pi/skills/cloudflare/references/queues/README.md +69 -0
- package/dist/template/.pi/skills/cloudflare/references/queues/api.md +138 -0
- package/dist/template/.pi/skills/cloudflare/references/queues/configuration.md +125 -0
- package/dist/template/.pi/skills/cloudflare/references/queues/gotchas.md +112 -0
- package/dist/template/.pi/skills/cloudflare/references/queues/patterns.md +155 -0
- package/dist/template/.pi/skills/cloudflare/references/r2/README.md +61 -0
- package/dist/template/.pi/skills/cloudflare/references/r2/api.md +127 -0
- package/dist/template/.pi/skills/cloudflare/references/r2/configuration.md +76 -0
- package/dist/template/.pi/skills/cloudflare/references/r2/gotchas.md +94 -0
- package/dist/template/.pi/skills/cloudflare/references/r2/patterns.md +127 -0
- package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/README.md +18 -0
- package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/api.md +29 -0
- package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/configuration.md +39 -0
- package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/gotchas.md +20 -0
- package/dist/template/.pi/skills/cloudflare/references/r2-data-catalog/patterns.md +46 -0
- package/dist/template/.pi/skills/cloudflare/references/r2-sql/README.md +512 -0
- package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/README.md +21 -0
- package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/api.md +135 -0
- package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/configuration.md +63 -0
- package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/gotchas.md +75 -0
- package/dist/template/.pi/skills/cloudflare/references/realtime-sfu/patterns.md +102 -0
- package/dist/template/.pi/skills/cloudflare/references/realtimekit/README.md +81 -0
- package/dist/template/.pi/skills/cloudflare/references/realtimekit/api.md +164 -0
- package/dist/template/.pi/skills/cloudflare/references/realtimekit/configuration.md +147 -0
- package/dist/template/.pi/skills/cloudflare/references/realtimekit/gotchas.md +172 -0
- package/dist/template/.pi/skills/cloudflare/references/realtimekit/patterns.md +155 -0
- package/dist/template/.pi/skills/cloudflare/references/sandbox/README.md +90 -0
- package/dist/template/.pi/skills/cloudflare/references/sandbox/api.md +178 -0
- package/dist/template/.pi/skills/cloudflare/references/sandbox/configuration.md +131 -0
- package/dist/template/.pi/skills/cloudflare/references/sandbox/gotchas.md +156 -0
- package/dist/template/.pi/skills/cloudflare/references/sandbox/patterns.md +203 -0
- package/dist/template/.pi/skills/cloudflare/references/secrets-store/README.md +58 -0
- package/dist/template/.pi/skills/cloudflare/references/secrets-store/api.md +182 -0
- package/dist/template/.pi/skills/cloudflare/references/secrets-store/configuration.md +140 -0
- package/dist/template/.pi/skills/cloudflare/references/secrets-store/gotchas.md +129 -0
- package/dist/template/.pi/skills/cloudflare/references/secrets-store/patterns.md +218 -0
- package/dist/template/.pi/skills/cloudflare/references/smart-placement/README.md +91 -0
- package/dist/template/.pi/skills/cloudflare/references/smart-placement/api.md +139 -0
- package/dist/template/.pi/skills/cloudflare/references/smart-placement/configuration.md +129 -0
- package/dist/template/.pi/skills/cloudflare/references/smart-placement/gotchas.md +87 -0
- package/dist/template/.pi/skills/cloudflare/references/smart-placement/patterns.md +135 -0
- package/dist/template/.pi/skills/cloudflare/references/snippets/README.md +15 -0
- package/dist/template/.pi/skills/cloudflare/references/snippets/api.md +47 -0
- package/dist/template/.pi/skills/cloudflare/references/snippets/configuration.md +33 -0
- package/dist/template/.pi/skills/cloudflare/references/snippets/gotchas.md +21 -0
- package/dist/template/.pi/skills/cloudflare/references/snippets/patterns.md +34 -0
- package/dist/template/.pi/skills/cloudflare/references/spectrum/README.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/spectrum/api.md +24 -0
- package/dist/template/.pi/skills/cloudflare/references/spectrum/configuration.md +43 -0
- package/dist/template/.pi/skills/cloudflare/references/spectrum/gotchas.md +42 -0
- package/dist/template/.pi/skills/cloudflare/references/spectrum/patterns.md +40 -0
- package/dist/template/.pi/skills/cloudflare/references/static-assets/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/static-assets/api.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/static-assets/configuration.md +47 -0
- package/dist/template/.pi/skills/cloudflare/references/static-assets/gotchas.md +44 -0
- package/dist/template/.pi/skills/cloudflare/references/static-assets/patterns.md +42 -0
- package/dist/template/.pi/skills/cloudflare/references/stream/README.md +103 -0
- package/dist/template/.pi/skills/cloudflare/references/stream/api.md +204 -0
- package/dist/template/.pi/skills/cloudflare/references/stream/configuration.md +127 -0
- package/dist/template/.pi/skills/cloudflare/references/stream/gotchas.md +131 -0
- package/dist/template/.pi/skills/cloudflare/references/stream/patterns.md +152 -0
- package/dist/template/.pi/skills/cloudflare/references/tail-workers/README.md +640 -0
- package/dist/template/.pi/skills/cloudflare/references/terraform/README.md +76 -0
- package/dist/template/.pi/skills/cloudflare/references/terraform/api.md +159 -0
- package/dist/template/.pi/skills/cloudflare/references/terraform/configuration.md +156 -0
- package/dist/template/.pi/skills/cloudflare/references/terraform/gotchas.md +207 -0
- package/dist/template/.pi/skills/cloudflare/references/terraform/patterns.md +135 -0
- package/dist/template/.pi/skills/cloudflare/references/tunnel/README.md +82 -0
- package/dist/template/.pi/skills/cloudflare/references/tunnel/api.md +105 -0
- package/dist/template/.pi/skills/cloudflare/references/tunnel/configuration.md +113 -0
- package/dist/template/.pi/skills/cloudflare/references/tunnel/gotchas.md +115 -0
- package/dist/template/.pi/skills/cloudflare/references/tunnel/patterns.md +157 -0
- package/dist/template/.pi/skills/cloudflare/references/turn/README.md +699 -0
- package/dist/template/.pi/skills/cloudflare/references/turnstile/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/turnstile/api.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/turnstile/configuration.md +19 -0
- package/dist/template/.pi/skills/cloudflare/references/turnstile/gotchas.md +27 -0
- package/dist/template/.pi/skills/cloudflare/references/turnstile/patterns.md +41 -0
- package/dist/template/.pi/skills/cloudflare/references/vectorize/README.md +682 -0
- package/dist/template/.pi/skills/cloudflare/references/waf/README.md +14 -0
- package/dist/template/.pi/skills/cloudflare/references/waf/api.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/waf/configuration.md +44 -0
- package/dist/template/.pi/skills/cloudflare/references/waf/gotchas.md +24 -0
- package/dist/template/.pi/skills/cloudflare/references/waf/patterns.md +29 -0
- package/dist/template/.pi/skills/cloudflare/references/web-analytics/README.md +19 -0
- package/dist/template/.pi/skills/cloudflare/references/web-analytics/api.md +52 -0
- package/dist/template/.pi/skills/cloudflare/references/web-analytics/configuration.md +31 -0
- package/dist/template/.pi/skills/cloudflare/references/web-analytics/gotchas.md +28 -0
- package/dist/template/.pi/skills/cloudflare/references/web-analytics/patterns.md +52 -0
- package/dist/template/.pi/skills/cloudflare/references/workerd/README.md +47 -0
- package/dist/template/.pi/skills/cloudflare/references/workerd/api.md +199 -0
- package/dist/template/.pi/skills/cloudflare/references/workerd/configuration.md +185 -0
- package/dist/template/.pi/skills/cloudflare/references/workerd/gotchas.md +203 -0
- package/dist/template/.pi/skills/cloudflare/references/workerd/patterns.md +216 -0
- package/dist/template/.pi/skills/cloudflare/references/workers/README.md +96 -0
- package/dist/template/.pi/skills/cloudflare/references/workers/api.md +137 -0
- package/dist/template/.pi/skills/cloudflare/references/workers/configuration.md +147 -0
- package/dist/template/.pi/skills/cloudflare/references/workers/gotchas.md +99 -0
- package/dist/template/.pi/skills/cloudflare/references/workers/patterns.md +149 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-ai/README.md +116 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/README.md +48 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/api.md +169 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/configuration.md +136 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/gotchas.md +130 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-for-platforms/patterns.md +170 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-playground/README.md +16 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-playground/api.md +20 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-playground/configuration.md +3 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-playground/gotchas.md +35 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-playground/patterns.md +42 -0
- package/dist/template/.pi/skills/cloudflare/references/workers-vpc/README.md +579 -0
- package/dist/template/.pi/skills/cloudflare/references/workflows/README.md +62 -0
- package/dist/template/.pi/skills/cloudflare/references/workflows/api.md +125 -0
- package/dist/template/.pi/skills/cloudflare/references/workflows/configuration.md +177 -0
- package/dist/template/.pi/skills/cloudflare/references/workflows/gotchas.md +136 -0
- package/dist/template/.pi/skills/cloudflare/references/workflows/patterns.md +132 -0
- package/dist/template/.pi/skills/cloudflare/references/wrangler/README.md +90 -0
- package/dist/template/.pi/skills/cloudflare/references/wrangler/api.md +140 -0
- package/dist/template/.pi/skills/cloudflare/references/wrangler/configuration.md +128 -0
- package/dist/template/.pi/skills/cloudflare/references/wrangler/gotchas.md +93 -0
- package/dist/template/.pi/skills/cloudflare/references/wrangler/patterns.md +150 -0
- package/dist/template/.pi/skills/cloudflare/references/zaraz/README.md +360 -0
- package/dist/template/.pi/skills/code-cleanup/SKILL.md +232 -0
- package/dist/template/.pi/skills/code-review-and-quality/SKILL.md +344 -0
- package/dist/template/.pi/skills/code-simplification/SKILL.md +348 -0
- package/dist/template/.pi/skills/context-engineering/SKILL.md +296 -0
- package/dist/template/.pi/skills/core-data-expert/SKILL.md +117 -0
- package/dist/template/.pi/skills/core-data-expert/references/batch-operations.md +543 -0
- package/dist/template/.pi/skills/core-data-expert/references/cloudkit-integration.md +259 -0
- package/dist/template/.pi/skills/core-data-expert/references/concurrency.md +522 -0
- package/dist/template/.pi/skills/core-data-expert/references/fetch-requests.md +643 -0
- package/dist/template/.pi/skills/core-data-expert/references/glossary.md +233 -0
- package/dist/template/.pi/skills/core-data-expert/references/migration.md +393 -0
- package/dist/template/.pi/skills/core-data-expert/references/model-configuration.md +597 -0
- package/dist/template/.pi/skills/core-data-expert/references/performance.md +300 -0
- package/dist/template/.pi/skills/core-data-expert/references/persistent-history.md +553 -0
- package/dist/template/.pi/skills/core-data-expert/references/project-audit.md +60 -0
- package/dist/template/.pi/skills/core-data-expert/references/saving.md +574 -0
- package/dist/template/.pi/skills/core-data-expert/references/stack-setup.md +625 -0
- package/dist/template/.pi/skills/core-data-expert/references/testing.md +300 -0
- package/dist/template/.pi/skills/core-data-expert/references/threading.md +589 -0
- package/dist/template/.pi/skills/debugging-and-error-recovery/SKILL.md +274 -0
- package/dist/template/.pi/skills/deep-module-design/SKILL.md +218 -0
- package/dist/template/.pi/skills/defense-in-depth/SKILL.md +161 -0
- package/dist/template/.pi/skills/deprecation-and-migration/SKILL.md +186 -0
- package/dist/template/.pi/skills/design-system-audit/SKILL.md +176 -0
- package/dist/template/.pi/skills/design-taste-frontend/SKILL.md +255 -0
- package/dist/template/.pi/skills/development-lifecycle/SKILL.md +285 -0
- package/dist/template/.pi/skills/documentation-and-adrs/SKILL.md +217 -0
- package/dist/template/.pi/skills/doubt-driven-development/SKILL.md +207 -0
- package/dist/template/.pi/skills/fallow/SKILL.md +457 -0
- package/dist/template/.pi/skills/fallow/references/cli-reference.md +1905 -0
- package/dist/template/.pi/skills/fallow/references/gotchas.md +644 -0
- package/dist/template/.pi/skills/fallow/references/patterns.md +791 -0
- package/dist/template/.pi/skills/figma/SKILL.md +241 -0
- package/dist/template/.pi/skills/frontend-design/SKILL.md +262 -0
- package/dist/template/.pi/skills/frontend-design/references/animation/motion-advanced.md +224 -0
- package/dist/template/.pi/skills/frontend-design/references/animation/motion-core.md +181 -0
- package/dist/template/.pi/skills/frontend-design/references/canvas/execution.md +90 -0
- package/dist/template/.pi/skills/frontend-design/references/canvas/philosophy.md +94 -0
- package/dist/template/.pi/skills/frontend-design/references/design/color-system.md +111 -0
- package/dist/template/.pi/skills/frontend-design/references/design/interaction.md +149 -0
- package/dist/template/.pi/skills/frontend-design/references/design/typography-rules.md +106 -0
- package/dist/template/.pi/skills/frontend-design/references/design/ux-writing.md +99 -0
- package/dist/template/.pi/skills/frontend-design/references/shadcn/accessibility.md +132 -0
- package/dist/template/.pi/skills/frontend-design/references/shadcn/core-components.md +153 -0
- package/dist/template/.pi/skills/frontend-design/references/shadcn/form-components.md +158 -0
- package/dist/template/.pi/skills/frontend-design/references/shadcn/setup.md +69 -0
- package/dist/template/.pi/skills/frontend-design/references/shadcn/theming.md +152 -0
- package/dist/template/.pi/skills/frontend-design/references/tailwind/responsive.md +112 -0
- package/dist/template/.pi/skills/frontend-design/references/tailwind/utilities-layout.md +134 -0
- package/dist/template/.pi/skills/frontend-design/references/tailwind/utilities-styling.md +165 -0
- package/dist/template/.pi/skills/frontend-design/references/tailwind/v4-config.md +147 -0
- package/dist/template/.pi/skills/frontend-design/references/tailwind/v4-features.md +128 -0
- package/dist/template/.pi/skills/frontend-ui-engineering/SKILL.md +217 -0
- package/dist/template/.pi/skills/gemini-large-context/SKILL.md +238 -0
- package/dist/template/.pi/skills/git-workflow-and-versioning/SKILL.md +217 -0
- package/dist/template/.pi/skills/grill-me/SKILL.md +162 -0
- package/dist/template/.pi/skills/high-end-visual-design/SKILL.md +128 -0
- package/dist/template/.pi/skills/idea-refine/SKILL.md +195 -0
- package/dist/template/.pi/skills/idea-refine/examples.md +62 -0
- package/dist/template/.pi/skills/idea-refine/frameworks.md +63 -0
- package/dist/template/.pi/skills/idea-refine/refinement-criteria.md +56 -0
- package/dist/template/.pi/skills/incremental-implementation/SKILL.md +190 -0
- package/dist/template/.pi/skills/industrial-brutalist-ui/SKILL.md +131 -0
- package/dist/template/.pi/skills/interview-me/SKILL.md +227 -0
- package/dist/template/.pi/skills/jira/SKILL.md +306 -0
- package/dist/template/.pi/skills/loop-audit/SKILL.md +141 -0
- package/dist/template/.pi/skills/loop-cost/SKILL.md +130 -0
- package/dist/template/.pi/skills/loop-engineering/SKILL.md +175 -0
- package/dist/template/.pi/skills/minimalist-ui/SKILL.md +124 -0
- package/dist/template/.pi/skills/mockup-to-code/SKILL.md +197 -0
- package/dist/template/.pi/skills/observability-and-instrumentation/SKILL.md +202 -0
- package/dist/template/.pi/skills/opensrc/SKILL.md +297 -0
- package/dist/template/.pi/skills/opensrc/references/architecture.md +176 -0
- package/dist/template/.pi/skills/opensrc/references/cli-usage.md +176 -0
- package/dist/template/.pi/skills/opensrc/references/registry-support.md +137 -0
- package/dist/template/.pi/skills/pdf-extract/SKILL.md +461 -0
- package/dist/template/.pi/skills/performance-optimization/SKILL.md +233 -0
- package/dist/template/.pi/skills/performance-optimization/references/performance-checklist.md +85 -0
- package/dist/template/.pi/skills/planning-and-task-breakdown/SKILL.md +204 -0
- package/dist/template/.pi/skills/playwright/SKILL.md +404 -0
- package/dist/template/.pi/skills/playwright/references/agent-browser-cli.md +405 -0
- package/dist/template/.pi/skills/polar/SKILL.md +125 -0
- package/dist/template/.pi/skills/react-best-practices/SKILL.md +156 -0
- package/dist/template/.pi/skills/react-best-practices/rules/_sections.md +46 -0
- package/dist/template/.pi/skills/react-best-practices/rules/_template.md +28 -0
- package/dist/template/.pi/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/dist/template/.pi/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/dist/template/.pi/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/dist/template/.pi/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/dist/template/.pi/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/dist/template/.pi/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/dist/template/.pi/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/dist/template/.pi/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/dist/template/.pi/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/dist/template/.pi/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/dist/template/.pi/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/dist/template/.pi/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/dist/template/.pi/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/dist/template/.pi/skills/react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/dist/template/.pi/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/dist/template/.pi/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/dist/template/.pi/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/dist/template/.pi/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/dist/template/.pi/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/dist/template/.pi/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/dist/template/.pi/skills/react-best-practices/rules/server-cache-react.md +76 -0
- package/dist/template/.pi/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/dist/template/.pi/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/dist/template/.pi/skills/redesign-existing-projects/SKILL.md +217 -0
- package/dist/template/.pi/skills/resend/SKILL.md +196 -0
- package/dist/template/.pi/skills/resend/references/react-email.md +287 -0
- package/dist/template/.pi/skills/resend/references/receive-email.md +248 -0
- package/dist/template/.pi/skills/resend/references/send-email.md +318 -0
- package/dist/template/.pi/skills/root-cause-tracing/SKILL.md +216 -0
- package/dist/template/.pi/skills/security-and-hardening/SKILL.md +293 -0
- package/dist/template/.pi/skills/security-and-hardening/references/security-checklist.md +105 -0
- package/dist/template/.pi/skills/shipping-and-launch/SKILL.md +101 -0
- package/dist/template/.pi/skills/source-driven-development/SKILL.md +108 -0
- package/dist/template/.pi/skills/spec-driven-development/SKILL.md +177 -0
- package/dist/template/.pi/skills/srcwalk/SKILL.md +182 -0
- package/dist/template/.pi/skills/subagent-driven-development/SKILL.md +253 -0
- package/dist/template/.pi/skills/supabase/SKILL.md +153 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/SKILL.md +88 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/advanced-full-text-search.md +55 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/advanced-jsonb-indexing.md +49 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-idle-timeout.md +46 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-limits.md +44 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-pooling.md +41 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/conn-prepared-statements.md +46 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-batch-inserts.md +54 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-n-plus-one.md +53 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-pagination.md +50 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/data-upsert.md +50 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-advisory.md +56 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-deadlock-prevention.md +68 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-short-transactions.md +50 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/lock-skip-locked.md +54 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-explain-analyze.md +45 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-pg-stat-statements.md +55 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/monitor-vacuum-analyze.md +55 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-composite-indexes.md +44 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-covering-indexes.md +40 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-index-types.md +45 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-missing-indexes.md +43 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/query-partial-indexes.md +45 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-data-types.md +46 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-foreign-key-indexes.md +59 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-lowercase-identifiers.md +55 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-partitioning.md +55 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/schema-primary-keys.md +61 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-privileges.md +54 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-rls-basics.md +50 -0
- package/dist/template/.pi/skills/supabase-postgres-best-practices/rules/security-rls-performance.md +57 -0
- package/dist/template/.pi/skills/swift-concurrency/SKILL.md +290 -0
- package/dist/template/.pi/skills/swift-concurrency/references/actors.md +640 -0
- package/dist/template/.pi/skills/swift-concurrency/references/async-algorithms.md +822 -0
- package/dist/template/.pi/skills/swift-concurrency/references/async-await-basics.md +249 -0
- package/dist/template/.pi/skills/swift-concurrency/references/async-sequences.md +670 -0
- package/dist/template/.pi/skills/swift-concurrency/references/core-data.md +533 -0
- package/dist/template/.pi/skills/swift-concurrency/references/glossary.md +128 -0
- package/dist/template/.pi/skills/swift-concurrency/references/linting.md +142 -0
- package/dist/template/.pi/skills/swift-concurrency/references/memory-management.md +542 -0
- package/dist/template/.pi/skills/swift-concurrency/references/migration.md +1076 -0
- package/dist/template/.pi/skills/swift-concurrency/references/performance.md +574 -0
- package/dist/template/.pi/skills/swift-concurrency/references/sendable.md +578 -0
- package/dist/template/.pi/skills/swift-concurrency/references/tasks.md +604 -0
- package/dist/template/.pi/skills/swift-concurrency/references/testing.md +565 -0
- package/dist/template/.pi/skills/swift-concurrency/references/threading.md +452 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/SKILL.md +343 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-advanced.md +351 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-basics.md +284 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/animation-transitions.md +326 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/image-optimization.md +286 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/layout-best-practices.md +312 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/liquid-glass.md +377 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/list-patterns.md +153 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/modern-apis.md +400 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/performance-patterns.md +377 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/scroll-patterns.md +305 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/sheet-navigation-patterns.md +292 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/state-management.md +447 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/text-formatting.md +285 -0
- package/dist/template/.pi/skills/swiftui-expert-skill/references/view-structure.md +276 -0
- package/dist/template/.pi/skills/test-driven-development/SKILL.md +400 -0
- package/dist/template/.pi/skills/test-driven-development/references/testing-patterns.md +155 -0
- package/dist/template/.pi/skills/testing-anti-patterns/SKILL.md +339 -0
- package/dist/template/.pi/skills/using-agent-skills/SKILL.md +371 -0
- package/dist/template/.pi/skills/using-git-worktrees/SKILL.md +275 -0
- package/dist/template/.pi/skills/vercel-deploy-claimable/SKILL.md +144 -0
- package/dist/template/.pi/skills/vercel-deploy-claimable/scripts/deploy.sh +249 -0
- package/dist/template/.pi/skills/verification-before-completion/SKILL.md +348 -0
- package/dist/template/.pi/skills/webclaw/SKILL.md +188 -0
- package/dist/template/.pi/skills/writing-skills/SKILL.md +329 -0
- package/dist/template/.pi/skills/writing-skills/references/anti-patterns.md +25 -0
- package/dist/template/.pi/skills/writing-skills/references/claude-search-optimization.md +140 -0
- package/dist/template/.pi/skills/writing-skills/references/discovery-workflow.md +11 -0
- package/dist/template/.pi/skills/writing-skills/references/file-organization.md +32 -0
- package/dist/template/.pi/skills/writing-skills/references/flowcharts-and-examples.md +57 -0
- package/dist/template/.pi/skills/writing-skills/references/rationalization-hardening.md +75 -0
- package/dist/template/.pi/skills/writing-skills/references/testing-methodology.md +397 -0
- package/dist/template/.pi/skills/writing-skills/references/testing-skill-types.md +52 -0
- package/dist/template/.pi/subagents.json +10 -0
- package/dist/template/.pi/templates/adr.md +47 -0
- package/dist/template/.pi/templates/design.md +61 -0
- package/dist/template/.pi/templates/loop-github-action.yml +162 -0
- package/dist/template/.pi/templates/loop-orchestrator.sh +514 -0
- package/dist/template/.pi/templates/loop-orchestrator.test.ts +332 -0
- package/dist/template/.pi/templates/loop-orchestrator.ts +936 -0
- package/dist/template/.pi/templates/loop-state.json +24 -0
- package/dist/template/.pi/templates/loop-state.md +98 -0
- package/dist/template/.pi/templates/loop-vision.md +110 -0
- package/dist/template/.pi/templates/prd.md +204 -0
- package/dist/template/.pi/templates/progress.md +55 -0
- package/dist/template/.pi/templates/project.md +58 -0
- package/dist/template/.pi/templates/proposal.md +40 -0
- package/dist/template/.pi/templates/review-state.json +20 -0
- package/dist/template/.pi/templates/roadmap.md +93 -0
- package/dist/template/.pi/templates/state.md +97 -0
- package/dist/template/.pi/templates/tasks.md +202 -0
- package/dist/template/.pi/templates/tech-stack.md +85 -0
- package/dist/template/.pi/templates/user.md +26 -0
- package/dist/template/.pi/workflows/INDEX.md +63 -0
- package/dist/template/.pi/workflows/audit-pattern.md +84 -0
- package/dist/template/.pi/workflows/batch-implement.md +121 -0
- package/dist/template/.pi/workflows/deep-research.md +89 -0
- package/dist/template/.pi/workflows/development-lifecycle-workflow.md +175 -0
- package/dist/template/.pi/workflows/garbage-collection.md +144 -0
- package/dist/template/.pi/workflows/quality-loop.md +211 -0
- package/package.json +57 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: observability-and-instrumentation
|
|
3
|
+
description: Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Observability and Instrumentation
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Code you can't observe is code you can't operate. Observability is the ability to answer "what is the system doing and why?" from the outside, using the telemetry the code emits. Instrumentation is not a post-launch add-on — it's written alongside the feature, the same way tests are. If a feature ships without telemetry, the first user-reported bug becomes archaeology instead of a query.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Building any feature that will run in production
|
|
15
|
+
- Adding a new service, endpoint, background job, or external integration
|
|
16
|
+
- A production incident took too long to diagnose ("we couldn't tell what happened")
|
|
17
|
+
- Setting up or reviewing alerting rules
|
|
18
|
+
- Reviewing a PR that adds I/O, retries, queues, or cross-service calls
|
|
19
|
+
|
|
20
|
+
## When NOT to Use
|
|
21
|
+
|
|
22
|
+
- Diagnosing a failure happening right now — use the `debugging-and-error-recovery` skill (observability is what makes that skill fast next time)
|
|
23
|
+
- Profiling and optimizing measured slowness — use the `performance-optimization` skill
|
|
24
|
+
- Launch-day monitoring checklists and rollback triggers — see the `shipping-and-launch` skill; this skill covers the instrumentation that feeds them
|
|
25
|
+
|
|
26
|
+
## Process
|
|
27
|
+
|
|
28
|
+
### 1. Define "working" before instrumenting
|
|
29
|
+
|
|
30
|
+
Telemetry without a question is noise. Before adding any instrumentation, write down 2–4 questions an on-call engineer will ask about this feature:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
FEATURE: checkout payment retry
|
|
34
|
+
QUESTIONS ON-CALL WILL ASK:
|
|
35
|
+
1. What fraction of payments succeed on first attempt vs after retry?
|
|
36
|
+
2. When a payment fails permanently, why? (provider error? timeout? validation?)
|
|
37
|
+
3. Is the payment provider slower than usual?
|
|
38
|
+
→ Every signal below must help answer one of these.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If you can't name the questions, you're not ready to instrument — you'll log everything and learn nothing.
|
|
42
|
+
|
|
43
|
+
### 2. Pick the right signal for each question
|
|
44
|
+
|
|
45
|
+
| Signal | Answers | Cost profile | Example |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| **Structured log** | "What happened in this specific case?" | Per-event; grows with traffic | `payment_failed` with provider error code |
|
|
48
|
+
| **Metric** | "How often / how fast, in aggregate?" | Fixed per series; cheap to query | p99 latency of provider calls |
|
|
49
|
+
| **Trace** | "Where did time go across services?" | Per-request; usually sampled | One slow checkout, broken down by hop |
|
|
50
|
+
|
|
51
|
+
Rule of thumb: metrics tell you **that** something is wrong, traces tell you **where**, logs tell you **why**.
|
|
52
|
+
|
|
53
|
+
### 3. Structured logging
|
|
54
|
+
|
|
55
|
+
Log events, not prose. Every log line is a JSON object with a stable event name and machine-readable fields:
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
// BAD: string interpolation — unqueryable, inconsistent
|
|
59
|
+
logger.info(`Payment ${id} failed for user ${userId} after ${n} retries`);
|
|
60
|
+
|
|
61
|
+
// GOOD: stable event name + structured fields
|
|
62
|
+
logger.warn({
|
|
63
|
+
event: 'payment_failed',
|
|
64
|
+
paymentId: id,
|
|
65
|
+
provider: 'stripe',
|
|
66
|
+
errorCode: err.code,
|
|
67
|
+
attempt: n,
|
|
68
|
+
}, 'payment failed');
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Log levels — use them consistently:**
|
|
72
|
+
|
|
73
|
+
| Level | Meaning | On-call action |
|
|
74
|
+
|---|---|---|
|
|
75
|
+
| `error` | Invariant broken; someone may need to act | Investigate |
|
|
76
|
+
| `warn` | Degraded but handled (retry succeeded, fallback used) | Watch for trends |
|
|
77
|
+
| `info` | Significant business event (order placed, job finished) | None |
|
|
78
|
+
| `debug` | Diagnostic detail | Off in production by default |
|
|
79
|
+
|
|
80
|
+
**Correlation IDs are mandatory.** Generate (or accept) a request ID at the system boundary and attach it to every log line, span, and outbound call. Without it, you cannot reconstruct a single request from interleaved logs:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
// Express: child logger per request, ID propagated downstream
|
|
84
|
+
app.use((req, res, next) => {
|
|
85
|
+
req.id = req.headers['x-request-id'] ?? crypto.randomUUID();
|
|
86
|
+
req.log = logger.child({ requestId: req.id });
|
|
87
|
+
res.setHeader('x-request-id', req.id);
|
|
88
|
+
next();
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Never log secrets, tokens, passwords, or full PII.** This is a hard rule — telemetry pipelines are a classic data-leak path. Allowlist fields; don't log whole request bodies.
|
|
93
|
+
|
|
94
|
+
### 4. Metrics
|
|
95
|
+
|
|
96
|
+
For request-driven services, instrument **RED** on every endpoint and every external dependency: **R**ate (requests/sec), **E**rrors (failure rate), **D**uration (latency histogram, not average). For resources (queues, pools, hosts), use **USE**: **U**tilization, **S**aturation, **E**rrors.
|
|
97
|
+
|
|
98
|
+
The vendor-neutral path is the OpenTelemetry metrics API. The example below uses Prometheus' `prom-client`:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
import { Histogram } from 'prom-client';
|
|
102
|
+
|
|
103
|
+
const httpDuration = new Histogram({
|
|
104
|
+
name: 'http_request_duration_seconds',
|
|
105
|
+
help: 'HTTP request duration',
|
|
106
|
+
labelNames: ['method', 'route', 'status_class'], // '2xx', not '200'
|
|
107
|
+
buckets: [0.05, 0.1, 0.25, 0.5, 1, 2.5, 5],
|
|
108
|
+
});
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Cardinality is the failure mode.** Every unique label combination is a separate time series. Labels must come from small, fixed sets (route template, status class, provider name). Never use user IDs, raw URLs, error messages, or other unbounded values as labels — that belongs in logs and traces.
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
OK as label: route="/api/tasks/:id" status_class="5xx" provider="stripe"
|
|
115
|
+
NEVER a label: user_id, email, request_id, full URL, error message text
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Track averages never, percentiles always: an average hides the 1% of users having a terrible time. Use histograms and read p50/p95/p99.
|
|
119
|
+
|
|
120
|
+
### 5. Distributed tracing
|
|
121
|
+
|
|
122
|
+
Use OpenTelemetry — it's the vendor-neutral standard, and auto-instrumentation covers HTTP, gRPC, and common DB clients with near-zero code:
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
// tracing.ts — must be imported before anything else
|
|
126
|
+
import { NodeSDK } from '@opentelemetry/sdk-node';
|
|
127
|
+
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
|
|
128
|
+
|
|
129
|
+
const sdk = new NodeSDK({
|
|
130
|
+
serviceName: 'checkout-service',
|
|
131
|
+
instrumentations: [getNodeAutoInstrumentations()],
|
|
132
|
+
});
|
|
133
|
+
sdk.start();
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Add manual spans only around meaningful internal units of work (e.g., `applyDiscounts`, `chargeProvider`) and attach the attributes on-call will filter by. Propagate context across every async boundary — HTTP headers, queue message metadata — or the trace dies at the gap. Sample head-based at a low rate by default; keep 100% of errors if your backend supports tail sampling.
|
|
137
|
+
|
|
138
|
+
### 6. Alerting
|
|
139
|
+
|
|
140
|
+
Alert on **symptoms users feel**, not on causes:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
SYMPTOM (page-worthy): CAUSE (dashboard, not a page):
|
|
144
|
+
error rate > 1% for 5 min CPU at 85%
|
|
145
|
+
p99 latency > 2s one pod restarted
|
|
146
|
+
queue age > 10 min disk at 70%
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Cause-based alerts fire when nothing is wrong and miss failures you didn't predict. Symptom-based alerts fire exactly when users are hurt, regardless of the cause.
|
|
150
|
+
|
|
151
|
+
Rules for every alert you create:
|
|
152
|
+
|
|
153
|
+
1. **It must be actionable.** If the response is "ignore it, it self-heals", delete the alert.
|
|
154
|
+
2. **It links to a runbook** — even three lines: what it means, first query to run, escalation path.
|
|
155
|
+
3. **It has a threshold and duration** justified by the SLO or by historical data, not by a guess.
|
|
156
|
+
4. Use two severities only: **page** (user-facing, act now) and **ticket** (degradation, act this week). A third tier becomes noise that trains people to ignore everything.
|
|
157
|
+
|
|
158
|
+
### 7. Verify the telemetry itself
|
|
159
|
+
|
|
160
|
+
Instrumentation is code; it can be wrong. Before calling the work done, trigger the paths and look at the actual output:
|
|
161
|
+
|
|
162
|
+
- Force an error in staging → find it in the logs by `requestId`, confirm fields are structured (not `[object Object]`)
|
|
163
|
+
- Send test traffic → confirm metric series appear with the expected labels and sane values
|
|
164
|
+
- Follow one request across services in the tracing UI → no broken spans
|
|
165
|
+
- Fire each new alert once (lower the threshold temporarily) → confirm it reaches the right channel and the runbook link works
|
|
166
|
+
|
|
167
|
+
## Common Rationalizations
|
|
168
|
+
|
|
169
|
+
| Rationalization | Reality |
|
|
170
|
+
|---|---|
|
|
171
|
+
| "I'll add logging after it works" | "After" becomes "after the first incident", which is the most expensive moment to discover you're blind. Instrument as you build. |
|
|
172
|
+
| "More logs = more observability" | Unstructured noise makes incidents slower, not faster. Three queryable events beat three hundred prose lines. |
|
|
173
|
+
| "console.log is fine for now" | Unstructured output can't be filtered, correlated, or alerted on. The structured logger costs five extra minutes once. |
|
|
174
|
+
| "We can just look at the dashboards when something breaks" | Dashboards built without defined questions show you everything except the answer. Start from on-call questions. |
|
|
175
|
+
| "Alert on everything important, we'll tune later" | A noisy pager trains people to ignore it. The tuning never happens; the missed real page does. |
|
|
176
|
+
| "User ID as a metric label makes debugging easier" | It also makes your metrics backend fall over. High-cardinality lookups belong in logs and traces. |
|
|
177
|
+
| "Tracing is overkill for our two services" | Two services already means cross-service latency questions logs can't answer. Auto-instrumentation makes the cost trivial. |
|
|
178
|
+
|
|
179
|
+
## Red Flags
|
|
180
|
+
|
|
181
|
+
- A feature PR with retries, queues, or external calls and zero new telemetry
|
|
182
|
+
- Log lines built by string interpolation instead of structured fields
|
|
183
|
+
- No correlation/request ID — each log line is an orphan
|
|
184
|
+
- Metrics labeled with user IDs, raw URLs, or error message text (cardinality bomb)
|
|
185
|
+
- Latency tracked as an average with no percentiles
|
|
186
|
+
- Alerts that fire daily and get acknowledged without action
|
|
187
|
+
- Alerts on causes (CPU, memory) paging humans while user-facing error rate is unmonitored
|
|
188
|
+
- Secrets, tokens, or full request bodies appearing in logs
|
|
189
|
+
- "It works on my machine" as the only evidence a production feature is healthy
|
|
190
|
+
|
|
191
|
+
## Verification
|
|
192
|
+
|
|
193
|
+
After instrumenting a feature, confirm:
|
|
194
|
+
|
|
195
|
+
- [ ] The on-call questions for this feature are written down, and each signal maps to one
|
|
196
|
+
- [ ] All log output is structured (JSON), with stable event names and a correlation ID on every line
|
|
197
|
+
- [ ] No secrets, tokens, or unredacted PII in any log line (spot-check actual output)
|
|
198
|
+
- [ ] RED metrics exist for every new endpoint and every external dependency, with bounded label sets
|
|
199
|
+
- [ ] Latency is a histogram; p95/p99 are queryable
|
|
200
|
+
- [ ] A single request can be followed end-to-end in the tracing UI without broken spans
|
|
201
|
+
- [ ] Every new alert is symptom-based, has a runbook link, and was test-fired once
|
|
202
|
+
- [ ] An induced failure in staging was located via telemetry alone, without reading the source
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opensrc
|
|
3
|
+
description: Use when you need to understand how a library works internally, debug dependency issues, or inspect package source code beyond types and docs. Fetches source for npm, PyPI, crates.io packages and GitHub repos. Includes structured research workflow for deep investigation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# opensrc
|
|
7
|
+
|
|
8
|
+
Fetch and inspect dependency source code, then run a structured research workflow to answer implementation-level questions with evidence.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Need to understand how a library/package works internally (not just its interface)
|
|
13
|
+
- Debugging issues where types or docs are insufficient
|
|
14
|
+
- Exploring implementation patterns in dependencies
|
|
15
|
+
- Investigating edge cases and behavior not documented officially
|
|
16
|
+
- Evaluating dependency quality before adoption
|
|
17
|
+
|
|
18
|
+
## When NOT to Use
|
|
19
|
+
|
|
20
|
+
- Official docs already answer the question (check Context7 first)
|
|
21
|
+
- You only need public API syntax or quick examples
|
|
22
|
+
- The target is your own codebase (use project search/LSP tools)
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Install globally or use npx
|
|
28
|
+
npm install -g opensrc
|
|
29
|
+
|
|
30
|
+
# Fetch npm package (auto-detects installed version from lockfile)
|
|
31
|
+
npx opensrc zod
|
|
32
|
+
|
|
33
|
+
# Fetch from other registries
|
|
34
|
+
npx opensrc pypi:requests # Python/PyPI
|
|
35
|
+
npx opensrc crates:serde # Rust/crates.io
|
|
36
|
+
|
|
37
|
+
# Fetch GitHub repo directly
|
|
38
|
+
npx opensrc vercel/ai # owner/repo shorthand
|
|
39
|
+
npx opensrc github:owner/repo # explicit prefix
|
|
40
|
+
npx opensrc https://github.com/colinhacks/zod # full URL
|
|
41
|
+
|
|
42
|
+
# Fetch specific version/ref
|
|
43
|
+
npx opensrc zod@3.22.0
|
|
44
|
+
npx opensrc owner/repo@v1.0.0
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
| Command | Description |
|
|
50
|
+
| ----------------------- | ------------------------------- |
|
|
51
|
+
| `opensrc <packages...>` | Fetch source for packages/repos |
|
|
52
|
+
| `opensrc list` | List all fetched sources |
|
|
53
|
+
| `opensrc remove <name>` | Remove specific source |
|
|
54
|
+
| `opensrc clean` | Remove all sources |
|
|
55
|
+
|
|
56
|
+
## Output Structure
|
|
57
|
+
|
|
58
|
+
After fetching, sources are stored in `opensrc/`:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
opensrc/
|
|
62
|
+
├── settings.json # User preferences
|
|
63
|
+
├── sources.json # Index of fetched packages/repos
|
|
64
|
+
└── repos/
|
|
65
|
+
└── github.com/
|
|
66
|
+
└── owner/
|
|
67
|
+
└── repo/ # Cloned source code
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## File Modifications
|
|
71
|
+
|
|
72
|
+
On first run, opensrc may prompt to modify:
|
|
73
|
+
|
|
74
|
+
- `.gitignore` - adds `opensrc/` to ignore list
|
|
75
|
+
- `tsconfig.json` - excludes `opensrc/` from compilation
|
|
76
|
+
- `AGENTS.md` - adds section pointing agents to source code
|
|
77
|
+
|
|
78
|
+
Use `--modify` or `--modify=false` to control this behavior.
|
|
79
|
+
|
|
80
|
+
## Key Behaviors
|
|
81
|
+
|
|
82
|
+
1. **Version Detection** - For npm, auto-detects installed version from `node_modules`, `package-lock.json`, `pnpm-lock.yaml`, or `yarn.lock`
|
|
83
|
+
2. **Repository Resolution** - Resolves package to its git repo via registry API, clones at matching tag
|
|
84
|
+
3. **Monorepo Support** - Handles packages in monorepos via `repository.directory`
|
|
85
|
+
4. **Shallow Clone** - Uses `--depth 1` for efficient cloning, removes `.git` after clone
|
|
86
|
+
5. **Tag Fallback** - Tries `v{version}`, `{version}`, then default branch if tag not found
|
|
87
|
+
|
|
88
|
+
## Research Workflow (Structured)
|
|
89
|
+
|
|
90
|
+
Use this 5-step workflow for deep investigations.
|
|
91
|
+
|
|
92
|
+
### Step 1: Identify
|
|
93
|
+
|
|
94
|
+
Define the smallest useful target and scope:
|
|
95
|
+
|
|
96
|
+
- Package/repo name and version
|
|
97
|
+
- Specific question (e.g., retry behavior, parsing path, cache invalidation)
|
|
98
|
+
- Candidate symbols/files to inspect first
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Good: scoped target with version
|
|
102
|
+
npx opensrc zod@3.22.0
|
|
103
|
+
|
|
104
|
+
# Also valid
|
|
105
|
+
npx opensrc pypi:requests
|
|
106
|
+
npx opensrc crates:serde
|
|
107
|
+
npx opensrc vercel/ai@v3.0.0
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Step 2: Fetch
|
|
111
|
+
|
|
112
|
+
Fetch source with opensrc and confirm location:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx opensrc <target>
|
|
116
|
+
npx opensrc list
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Expected result:
|
|
120
|
+
|
|
121
|
+
- Source cloned into `opensrc/repos/<host>/<owner>/<repo>/`
|
|
122
|
+
- Metadata recorded in `opensrc/sources.json`
|
|
123
|
+
|
|
124
|
+
### Step 3: Locate
|
|
125
|
+
|
|
126
|
+
Find relevant files/symbols before deep reading:
|
|
127
|
+
|
|
128
|
+
- Search by exported symbol names, error classes, feature flags, config keys
|
|
129
|
+
- Prefer implementation files over declaration/type-only files
|
|
130
|
+
- Include tests/examples to infer intended behavior
|
|
131
|
+
|
|
132
|
+
Suggested search sequence:
|
|
133
|
+
|
|
134
|
+
1. Entry points (`index`, `main`, package exports)
|
|
135
|
+
2. Core implementation modules
|
|
136
|
+
3. Tests and fixtures
|
|
137
|
+
4. Changelog/release notes for behavioral changes
|
|
138
|
+
|
|
139
|
+
### Step 4: Analyze
|
|
140
|
+
|
|
141
|
+
Read code paths end-to-end and collect evidence:
|
|
142
|
+
|
|
143
|
+
- Trace function call flow from public API to internal logic
|
|
144
|
+
- Note edge-case guards, fallbacks, and error paths
|
|
145
|
+
- Distinguish public API from private/internal contracts
|
|
146
|
+
- Record exact file:line evidence for each claim
|
|
147
|
+
|
|
148
|
+
Evidence standard:
|
|
149
|
+
|
|
150
|
+
- Prefer direct source snippets + `file:line`
|
|
151
|
+
- Mark uncertain conclusions explicitly
|
|
152
|
+
- Avoid claims based only on docs/types when source contradicts them
|
|
153
|
+
|
|
154
|
+
### Step 5: Document
|
|
155
|
+
|
|
156
|
+
Write findings in a reusable format:
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# Research: <library>
|
|
160
|
+
|
|
161
|
+
- Package/Version: <name@version>
|
|
162
|
+
- Source Path: opensrc/repos/<host>/<owner>/<repo>
|
|
163
|
+
- Research Question: <question>
|
|
164
|
+
|
|
165
|
+
## Findings
|
|
166
|
+
1. <claim>
|
|
167
|
+
- Evidence: `path/to/file.ts:42-68`
|
|
168
|
+
- Confidence: High | Medium | Low
|
|
169
|
+
|
|
170
|
+
## Answer
|
|
171
|
+
- <direct answer to original question>
|
|
172
|
+
|
|
173
|
+
## Caveats
|
|
174
|
+
- Version-specific behavior and limits
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Integration with Other Research Methods
|
|
178
|
+
|
|
179
|
+
Use source inspection as part of a layered approach:
|
|
180
|
+
|
|
181
|
+
| Method | Best For | Source Code Adds |
|
|
182
|
+
| -------------- | -------------------------- | ------------------------------ |
|
|
183
|
+
| **Context7** | API docs, official guides | Implementation details |
|
|
184
|
+
| **codesearch** | Usage patterns in the wild | Canonical implementation |
|
|
185
|
+
| **grepsearch** | Real-world examples | How library itself works |
|
|
186
|
+
| **Web search** | Tutorials, blog posts | Ground truth from source |
|
|
187
|
+
| **Codebase** | Project-specific patterns | How dependencies actually work |
|
|
188
|
+
|
|
189
|
+
Recommended order:
|
|
190
|
+
|
|
191
|
+
1. Context7 (official docs)
|
|
192
|
+
2. Local codebase usage
|
|
193
|
+
3. **opensrc source inspection**
|
|
194
|
+
4. codesearch/grepsearch external usage patterns
|
|
195
|
+
5. Web search for supplementary context
|
|
196
|
+
|
|
197
|
+
## Limitations
|
|
198
|
+
|
|
199
|
+
### When Source Code May Not Fully Explain Runtime Behavior
|
|
200
|
+
|
|
201
|
+
- **Build-time transforms**: transpilation/macros/plugins can alter runtime shape
|
|
202
|
+
- **Native modules**: C/C++/Rust bindings require native-level inspection
|
|
203
|
+
- **Generated/minified artifacts**: published package may omit readable source
|
|
204
|
+
- **Monorepo indirection**: behavior may span multiple internal packages
|
|
205
|
+
- **Environment-specific paths**: Node/browser/edge branches can diverge
|
|
206
|
+
|
|
207
|
+
### Practical Alternatives
|
|
208
|
+
|
|
209
|
+
If opensrc is incomplete or blocked:
|
|
210
|
+
|
|
211
|
+
1. Browse repository directly on GitHub
|
|
212
|
+
2. Use `npm pack <package>` and inspect tarball contents
|
|
213
|
+
3. Inspect installed `node_modules/<package>/` output
|
|
214
|
+
4. Use source maps during runtime debugging when available
|
|
215
|
+
|
|
216
|
+
## Common Workflows
|
|
217
|
+
|
|
218
|
+
### Fetching a Package
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Understand zod implementation
|
|
222
|
+
npx opensrc zod
|
|
223
|
+
# → detects version from lockfile
|
|
224
|
+
# → resolves registry metadata
|
|
225
|
+
# → clones matching tag/revision
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Updating Sources
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# Re-run to refresh against current installed version
|
|
232
|
+
npx opensrc zod
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Multiple Sources
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
npx opensrc react react-dom next
|
|
239
|
+
npx opensrc zod pypi:pydantic vercel/ai
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Cleanup
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Remove one source
|
|
246
|
+
npx opensrc remove <package>
|
|
247
|
+
|
|
248
|
+
# Remove all sources
|
|
249
|
+
npx opensrc clean
|
|
250
|
+
|
|
251
|
+
# Remove by ecosystem
|
|
252
|
+
npx opensrc clean --npm --pypi --crates
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Success Criteria
|
|
256
|
+
|
|
257
|
+
You are done when all are true:
|
|
258
|
+
|
|
259
|
+
- [ ] Fetched the correct package/repo and version
|
|
260
|
+
- [ ] Located the exact implementation path relevant to the question
|
|
261
|
+
- [ ] Verified behavior by reading source (not only types/docs)
|
|
262
|
+
- [ ] Captured file:line evidence for major claims
|
|
263
|
+
- [ ] Answered the original question with explicit confidence
|
|
264
|
+
- [ ] Documented caveats (version bounds, private API risks)
|
|
265
|
+
|
|
266
|
+
## References
|
|
267
|
+
|
|
268
|
+
Core opensrc references:
|
|
269
|
+
|
|
270
|
+
- [CLI Usage & Options](references/cli-usage.md) - Full command reference
|
|
271
|
+
- [Architecture](references/architecture.md) - Code structure and extension
|
|
272
|
+
- [Registry Support](references/registry-support.md) - npm, PyPI, crates.io details
|
|
273
|
+
|
|
274
|
+
Research workflow references (merged from source-code-research):
|
|
275
|
+
|
|
276
|
+
- [Common Patterns](references/common-patterns.md) - Error handling, tracing behavior, quality evaluation patterns
|
|
277
|
+
- [Source Structure](references/source-structure.md) - npm/PyPI/Rust source layouts
|
|
278
|
+
- [Analysis Tips](references/analysis-tips.md) - Tests, examples, changelog, types, blame
|
|
279
|
+
- [Example Workflow](references/example-workflow.md) - End-to-end library investigation example
|
|
280
|
+
- [Anti-Patterns](references/anti-patterns.md) - What not to do when researching
|
|
281
|
+
- [Further Reading](references/further-reading.md) - External links and complementary resources
|
|
282
|
+
|
|
283
|
+
## Common Rationalizations
|
|
284
|
+
|
|
285
|
+
| Rationalization | Reality |
|
|
286
|
+
|---|---|
|
|
287
|
+
| "The docs are enough" | Docs describe intended behavior. Source code shows actual behavior. Read both. |
|
|
288
|
+
| "I'll upgrade the dependency later" | Version-pinned dependencies accumulate known vulnerabilities. Audit and upgrade proactively. |
|
|
289
|
+
| "The package is popular, it must be well-maintained" | Popularity ≠ maintenance. Check issue velocity, PR merge rate, and release cadence. |
|
|
290
|
+
|
|
291
|
+
## Red Flags
|
|
292
|
+
|
|
293
|
+
- Dependency version chosen based on blog post, not changelog
|
|
294
|
+
- Breaking changes in dependency not detected before upgrade
|
|
295
|
+
- Package.json updated without lockfile regeneration
|
|
296
|
+
- Source inspection skipped for critical security dependencies
|
|
297
|
+
- Deprecated APIs used because "the old version worked"
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# opensrc Architecture
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
- Directory structure
|
|
5
|
+
- Core flow
|
|
6
|
+
- Key modules
|
|
7
|
+
- Type definitions
|
|
8
|
+
- Extension points
|
|
9
|
+
|
|
10
|
+
## Directory Structure
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
src/
|
|
14
|
+
├── index.ts # CLI entry, Commander setup
|
|
15
|
+
├── types.ts # Shared type definitions
|
|
16
|
+
├── commands/
|
|
17
|
+
│ ├── fetch.ts # Main fetch logic
|
|
18
|
+
│ ├── list.ts # List sources
|
|
19
|
+
│ ├── remove.ts # Remove sources
|
|
20
|
+
│ └── clean.ts # Clean all sources
|
|
21
|
+
└── lib/
|
|
22
|
+
├── git.ts # Clone, path management
|
|
23
|
+
├── repo.ts # Parse/resolve repo specs
|
|
24
|
+
├── version.ts # Detect installed versions
|
|
25
|
+
├── agents.ts # AGENTS.md/sources.json updates
|
|
26
|
+
├── gitignore.ts # .gitignore management
|
|
27
|
+
├── tsconfig.ts # tsconfig.json exclude
|
|
28
|
+
├── settings.ts # User preferences
|
|
29
|
+
├── prompt.ts # Interactive prompts
|
|
30
|
+
└── registries/
|
|
31
|
+
├── index.ts # Registry detection/routing
|
|
32
|
+
├── npm.ts # npm registry API
|
|
33
|
+
├── pypi.ts # PyPI API
|
|
34
|
+
└── crates.ts # crates.io API
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Core Flow
|
|
38
|
+
|
|
39
|
+
### Fetch Package
|
|
40
|
+
|
|
41
|
+
1. **Parse input** - Detect registry prefix or repo format
|
|
42
|
+
2. **Version detection** (npm only) - Check lockfiles/node_modules
|
|
43
|
+
3. **Registry lookup** - Query API for repo URL
|
|
44
|
+
4. **Clone** - Shallow clone at matching git tag
|
|
45
|
+
5. **Update index** - Write to sources.json, optionally AGENTS.md
|
|
46
|
+
|
|
47
|
+
### Input Type Detection
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
detectInputType(spec) → "package" | "repo"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- Registry prefix (`npm:`, `pypi:`, `crates:`) → package
|
|
54
|
+
- Repo pattern (`owner/repo`, URL, `github:`) → repo
|
|
55
|
+
- Default → package (npm)
|
|
56
|
+
|
|
57
|
+
## Key Modules
|
|
58
|
+
|
|
59
|
+
### registries/index.ts
|
|
60
|
+
|
|
61
|
+
Routes to correct registry handler:
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
parsePackageSpec(spec): PackageSpec
|
|
65
|
+
resolvePackage(spec): ResolvedPackage
|
|
66
|
+
detectRegistry(spec): { registry, cleanSpec }
|
|
67
|
+
detectInputType(spec): "package" | "repo"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### git.ts
|
|
71
|
+
|
|
72
|
+
Manages cloning and source storage:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
fetchSource(resolved, cwd): FetchResult
|
|
76
|
+
fetchRepoSource(resolved, cwd): FetchResult
|
|
77
|
+
listSources(cwd): { packages, repos }
|
|
78
|
+
removePackageSource(name, cwd, registry): { removed, repoRemoved }
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Storage structure: `opensrc/repos/{host}/{owner}/{repo}/`
|
|
82
|
+
|
|
83
|
+
### version.ts
|
|
84
|
+
|
|
85
|
+
Detects installed npm versions (priority order):
|
|
86
|
+
1. `node_modules/{pkg}/package.json`
|
|
87
|
+
2. `package-lock.json`
|
|
88
|
+
3. `pnpm-lock.yaml`
|
|
89
|
+
4. `yarn.lock`
|
|
90
|
+
5. `package.json` (strips range prefixes)
|
|
91
|
+
|
|
92
|
+
### repo.ts
|
|
93
|
+
|
|
94
|
+
Parses repo specs, resolves via GitHub/GitLab API:
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
parseRepoSpec(spec): RepoSpec | null
|
|
98
|
+
resolveRepo(spec): ResolvedRepo
|
|
99
|
+
isRepoSpec(spec): boolean
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Supports: GitHub, GitLab, Bitbucket (GitHub/GitLab via API).
|
|
103
|
+
|
|
104
|
+
## Type Definitions
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
type Registry = "npm" | "pypi" | "crates"
|
|
108
|
+
|
|
109
|
+
interface PackageSpec {
|
|
110
|
+
registry: Registry
|
|
111
|
+
name: string
|
|
112
|
+
version?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
interface ResolvedPackage {
|
|
116
|
+
registry: Registry
|
|
117
|
+
name: string
|
|
118
|
+
version: string
|
|
119
|
+
repoUrl: string
|
|
120
|
+
repoDirectory?: string // For monorepos
|
|
121
|
+
gitTag: string
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
interface RepoSpec {
|
|
125
|
+
host: string // github.com, gitlab.com
|
|
126
|
+
owner: string
|
|
127
|
+
repo: string
|
|
128
|
+
ref?: string // Branch, tag, commit
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
interface FetchResult {
|
|
132
|
+
package: string
|
|
133
|
+
version: string
|
|
134
|
+
path: string
|
|
135
|
+
success: boolean
|
|
136
|
+
error?: string
|
|
137
|
+
registry?: Registry
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Extension Points
|
|
142
|
+
|
|
143
|
+
### Adding a Registry
|
|
144
|
+
|
|
145
|
+
1. Create `registries/{name}.ts`:
|
|
146
|
+
- `parse{Name}Spec(spec)` - Parse name@version
|
|
147
|
+
- `resolve{Name}Package(name, version)` - Query API, return ResolvedPackage
|
|
148
|
+
|
|
149
|
+
2. Update `registries/index.ts`:
|
|
150
|
+
- Add prefix to `REGISTRY_PREFIXES`
|
|
151
|
+
- Add case to `parsePackageSpec` and `resolvePackage`
|
|
152
|
+
|
|
153
|
+
3. Add to `Registry` type in `types.ts`
|
|
154
|
+
|
|
155
|
+
### Registry Implementation Pattern
|
|
156
|
+
|
|
157
|
+
```typescript
|
|
158
|
+
// Parse spec into name/version
|
|
159
|
+
export function parseSpec(spec: string): { name: string; version?: string }
|
|
160
|
+
|
|
161
|
+
// Query registry API, extract repo URL
|
|
162
|
+
async function fetchInfo(name: string): Promise<RegistryResponse>
|
|
163
|
+
|
|
164
|
+
// Normalize git URLs (remove git+, .git suffix)
|
|
165
|
+
function extractRepoUrl(info): string | null
|
|
166
|
+
|
|
167
|
+
// Main resolver
|
|
168
|
+
export async function resolve(name: string, version?: string): Promise<ResolvedPackage>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Git Tag Resolution
|
|
172
|
+
|
|
173
|
+
Clone tries tags in order:
|
|
174
|
+
1. `v{version}` (most common)
|
|
175
|
+
2. `{version}` (no prefix)
|
|
176
|
+
3. Default branch (fallback with warning)
|