@rotifer/playground 0.8.1 → 0.8.6
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/CHANGELOG.md +46 -11
- package/README.md +92 -58
- package/README.zh.md +90 -49
- package/dist/cloud/auth.d.ts +9 -3
- package/dist/cloud/auth.d.ts.map +1 -1
- package/dist/cloud/auth.js +28 -13
- package/dist/cloud/auth.js.map +1 -1
- package/dist/cloud/client.d.ts +4 -3
- package/dist/cloud/client.d.ts.map +1 -1
- package/dist/cloud/client.js +139 -68
- package/dist/cloud/client.js.map +1 -1
- package/dist/cloud/types.d.ts +3 -0
- package/dist/cloud/types.d.ts.map +1 -1
- package/dist/cloud/types.js.map +1 -1
- package/dist/commands/agent-create.d.ts +20 -0
- package/dist/commands/agent-create.d.ts.map +1 -1
- package/dist/commands/agent-create.js +91 -80
- package/dist/commands/agent-create.js.map +1 -1
- package/dist/commands/agent-list.d.ts.map +1 -1
- package/dist/commands/agent-list.js +27 -24
- package/dist/commands/agent-list.js.map +1 -1
- package/dist/commands/agent-run.d.ts +24 -0
- package/dist/commands/agent-run.d.ts.map +1 -1
- package/dist/commands/agent-run.js +166 -44
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/api-key.d.ts +3 -0
- package/dist/commands/api-key.d.ts.map +1 -0
- package/dist/commands/api-key.js +235 -0
- package/dist/commands/api-key.js.map +1 -0
- package/dist/commands/arena-list.d.ts.map +1 -1
- package/dist/commands/arena-list.js +113 -97
- package/dist/commands/arena-list.js.map +1 -1
- package/dist/commands/arena-submit.d.ts.map +1 -1
- package/dist/commands/arena-submit.js +114 -37
- package/dist/commands/arena-submit.js.map +1 -1
- package/dist/commands/arena-watch.d.ts.map +1 -1
- package/dist/commands/arena-watch.js +59 -87
- package/dist/commands/arena-watch.js.map +1 -1
- package/dist/commands/compare.d.ts.map +1 -1
- package/dist/commands/compare.js +40 -50
- package/dist/commands/compare.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +80 -58
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/hello.d.ts +3 -0
- package/dist/commands/hello.d.ts.map +1 -0
- package/dist/commands/hello.js +575 -0
- package/dist/commands/hello.js.map +1 -0
- package/dist/commands/info.d.ts.map +1 -1
- package/dist/commands/info.js +130 -40
- package/dist/commands/info.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +39 -60
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +35 -9
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +111 -58
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +23 -10
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js +48 -67
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +152 -53
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/reputation.js +84 -85
- package/dist/commands/reputation.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +32 -12
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/scan.d.ts.map +1 -1
- package/dist/commands/scan.js +8 -9
- package/dist/commands/scan.js.map +1 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +80 -54
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/self-update.d.ts +7 -0
- package/dist/commands/self-update.d.ts.map +1 -0
- package/dist/commands/self-update.js +187 -0
- package/dist/commands/self-update.js.map +1 -0
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +20 -26
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +104 -79
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/user-config.d.ts +3 -0
- package/dist/commands/user-config.d.ts.map +1 -0
- package/dist/commands/user-config.js +82 -0
- package/dist/commands/user-config.js.map +1 -0
- package/dist/commands/versions.d.ts.map +1 -1
- package/dist/commands/versions.js +46 -33
- package/dist/commands/versions.js.map +1 -1
- package/dist/commands/vg.d.ts.map +1 -1
- package/dist/commands/vg.js +65 -63
- package/dist/commands/vg.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +33 -23
- package/dist/commands/whoami.js.map +1 -1
- package/dist/commands/wrap.d.ts.map +1 -1
- package/dist/commands/wrap.js +57 -40
- package/dist/commands/wrap.js.map +1 -1
- package/dist/index.js +61 -1
- package/dist/index.js.map +1 -1
- package/dist/publish/pre-publish-check.d.ts +15 -0
- package/dist/publish/pre-publish-check.d.ts.map +1 -0
- package/dist/publish/pre-publish-check.js +228 -0
- package/dist/publish/pre-publish-check.js.map +1 -0
- package/dist/runtime/domain-failover.d.ts +1 -1
- package/dist/runtime/domain-failover.js +1 -1
- package/dist/runtime/network-gateway.d.ts +1 -1
- package/dist/runtime/network-gateway.d.ts.map +1 -1
- package/dist/runtime/network-gateway.js +10 -10
- package/dist/runtime/network-gateway.js.map +1 -1
- package/dist/scanner/scanner.js +3 -3
- package/dist/scanner/scanner.js.map +1 -1
- package/dist/utils/binding.d.ts +1 -0
- package/dist/utils/binding.d.ts.map +1 -1
- package/dist/utils/binding.js +37 -15
- package/dist/utils/binding.js.map +1 -1
- package/dist/utils/content-hash.d.ts +3 -0
- package/dist/utils/content-hash.d.ts.map +1 -0
- package/dist/utils/content-hash.js +25 -0
- package/dist/utils/content-hash.js.map +1 -0
- package/dist/utils/detect-source-language.d.ts +20 -0
- package/dist/utils/detect-source-language.d.ts.map +1 -0
- package/dist/utils/detect-source-language.js +83 -0
- package/dist/utils/detect-source-language.js.map +1 -0
- package/dist/utils/display.d.ts +44 -1
- package/dist/utils/display.d.ts.map +1 -1
- package/dist/utils/display.js +443 -14
- package/dist/utils/display.js.map +1 -1
- package/dist/utils/domain-suggest.d.ts.map +1 -1
- package/dist/utils/domain-suggest.js +3 -3
- package/dist/utils/domain-suggest.js.map +1 -1
- package/dist/utils/javy-compiler.d.ts.map +1 -1
- package/dist/utils/javy-compiler.js +10 -3
- package/dist/utils/javy-compiler.js.map +1 -1
- package/dist/utils/open-browser.d.ts +7 -3
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +15 -4
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/palette.d.ts +49 -0
- package/dist/utils/palette.d.ts.map +1 -0
- package/dist/utils/palette.js +80 -0
- package/dist/utils/palette.js.map +1 -0
- package/dist/utils/private-fs.d.ts +3 -0
- package/dist/utils/private-fs.d.ts.map +1 -0
- package/dist/utils/private-fs.js +25 -0
- package/dist/utils/private-fs.js.map +1 -0
- package/dist/utils/project-root.d.ts +2 -0
- package/dist/utils/project-root.d.ts.map +1 -0
- package/dist/utils/project-root.js +49 -0
- package/dist/utils/project-root.js.map +1 -0
- package/dist/utils/run-logger.d.ts +24 -0
- package/dist/utils/run-logger.d.ts.map +1 -0
- package/dist/utils/run-logger.js +70 -0
- package/dist/utils/run-logger.js.map +1 -0
- package/dist/utils/sandbox-defaults.d.ts +9 -0
- package/dist/utils/sandbox-defaults.d.ts.map +1 -0
- package/dist/utils/sandbox-defaults.js +12 -0
- package/dist/utils/sandbox-defaults.js.map +1 -0
- package/dist/utils/update-check.d.ts +20 -0
- package/dist/utils/update-check.d.ts.map +1 -0
- package/dist/utils/update-check.js +155 -0
- package/dist/utils/update-check.js.map +1 -0
- package/dist/utils/user-config.d.ts +10 -0
- package/dist/utils/user-config.d.ts.map +1 -0
- package/dist/utils/user-config.js +54 -0
- package/dist/utils/user-config.js.map +1 -0
- package/dist/utils/validate-gene-name.d.ts +7 -0
- package/dist/utils/validate-gene-name.d.ts.map +1 -0
- package/dist/utils/validate-gene-name.js +28 -0
- package/dist/utils/validate-gene-name.js.map +1 -0
- package/genes/genesis-code-format/phenotype.json +4 -3
- package/genes/genesis-file-read/phenotype.json +4 -3
- package/genes/genesis-l0-constraint/phenotype.json +4 -3
- package/genes/genesis-web-search/phenotype.json +5 -4
- package/genes/genesis-web-search-lite/phenotype.json +4 -3
- package/package.json +35 -8
- package/scripts/postinstall.js +38 -0
- package/dist/errors/formatter.d.ts +0 -25
- package/dist/errors/formatter.d.ts.map +0 -1
- package/dist/errors/formatter.js +0 -43
- package/dist/errors/formatter.js.map +0 -1
- package/genes/academic-writer/.cloud-manifest.json +0 -6
- package/genes/academic-writer/.gene-manifest.json +0 -8
- package/genes/academic-writer/SKILL.md +0 -274
- package/genes/academic-writer/phenotype.json +0 -28
- package/genes/ai-components/.cloud-manifest.json +0 -6
- package/genes/ai-components/.gene-manifest.json +0 -8
- package/genes/ai-components/SKILL.md +0 -381
- package/genes/ai-components/phenotype.json +0 -28
- package/genes/algorithmic-art/.cloud-manifest.json +0 -6
- package/genes/algorithmic-art/.gene-manifest.json +0 -8
- package/genes/algorithmic-art/SKILL.md +0 -405
- package/genes/algorithmic-art/phenotype.json +0 -28
- package/genes/answer-synthesizer/.cloud-manifest.json +0 -6
- package/genes/answer-synthesizer/index.ts +0 -194
- package/genes/answer-synthesizer/phenotype.json +0 -61
- package/genes/api-designer/.cloud-manifest.json +0 -6
- package/genes/api-designer/.gene-manifest.json +0 -8
- package/genes/api-designer/SKILL.md +0 -456
- package/genes/api-designer/phenotype.json +0 -28
- package/genes/auto-coder/.cloud-manifest.json +0 -6
- package/genes/auto-coder/.gene-manifest.json +0 -8
- package/genes/auto-coder/SKILL.md +0 -400
- package/genes/auto-coder/phenotype.json +0 -28
- package/genes/auto-writer/.cloud-manifest.json +0 -6
- package/genes/auto-writer/.gene-manifest.json +0 -8
- package/genes/auto-writer/SKILL.md +0 -361
- package/genes/auto-writer/phenotype.json +0 -28
- package/genes/brand-personality/.cloud-manifest.json +0 -6
- package/genes/brand-personality/.gene-manifest.json +0 -8
- package/genes/brand-personality/SKILL.md +0 -549
- package/genes/brand-personality/phenotype.json +0 -28
- package/genes/business-writer/.cloud-manifest.json +0 -6
- package/genes/business-writer/.gene-manifest.json +0 -8
- package/genes/business-writer/SKILL.md +0 -448
- package/genes/business-writer/phenotype.json +0 -28
- package/genes/citation-manager/.cloud-manifest.json +0 -6
- package/genes/citation-manager/.gene-manifest.json +0 -8
- package/genes/citation-manager/SKILL.md +0 -279
- package/genes/citation-manager/index.ts +0 -162
- package/genes/citation-manager/package.json +0 -1
- package/genes/citation-manager/phenotype.json +0 -50
- package/genes/code-complexity/.cloud-manifest.json +0 -6
- package/genes/code-complexity/README.md +0 -35
- package/genes/code-complexity/index.ts +0 -101
- package/genes/code-complexity/phenotype.json +0 -34
- package/genes/copywriter/.cloud-manifest.json +0 -6
- package/genes/copywriter/.gene-manifest.json +0 -8
- package/genes/copywriter/SKILL.md +0 -329
- package/genes/copywriter/phenotype.json +0 -28
- package/genes/creative-writer/.cloud-manifest.json +0 -6
- package/genes/creative-writer/.gene-manifest.json +0 -8
- package/genes/creative-writer/SKILL.md +0 -356
- package/genes/creative-writer/phenotype.json +0 -28
- package/genes/data-modeler/.cloud-manifest.json +0 -6
- package/genes/data-modeler/.gene-manifest.json +0 -8
- package/genes/data-modeler/SKILL.md +0 -486
- package/genes/data-modeler/phenotype.json +0 -28
- package/genes/debugger/.cloud-manifest.json +0 -6
- package/genes/debugger/.gene-manifest.json +0 -8
- package/genes/debugger/SKILL.md +0 -416
- package/genes/debugger/phenotype.json +0 -28
- package/genes/design-tokens/.cloud-manifest.json +0 -6
- package/genes/design-tokens/.gene-manifest.json +0 -8
- package/genes/design-tokens/SKILL.md +0 -222
- package/genes/design-tokens/index.ts +0 -128
- package/genes/design-tokens/package.json +0 -1
- package/genes/design-tokens/phenotype.json +0 -1
- package/genes/devops-automator/.cloud-manifest.json +0 -6
- package/genes/devops-automator/.gene-manifest.json +0 -8
- package/genes/devops-automator/SKILL.md +0 -490
- package/genes/devops-automator/phenotype.json +0 -28
- package/genes/doc-coauthoring/.cloud-manifest.json +0 -6
- package/genes/doc-coauthoring/.gene-manifest.json +0 -8
- package/genes/doc-coauthoring/SKILL.md +0 -375
- package/genes/doc-coauthoring/phenotype.json +0 -28
- package/genes/doc-retrieval/.cloud-manifest.json +0 -6
- package/genes/doc-retrieval/index.ts +0 -134
- package/genes/doc-retrieval/phenotype.json +0 -54
- package/genes/docs-writer/.cloud-manifest.json +0 -6
- package/genes/docs-writer/.gene-manifest.json +0 -8
- package/genes/docs-writer/SKILL.md +0 -492
- package/genes/docs-writer/phenotype.json +0 -28
- package/genes/evolve-life/.cloud-manifest.json +0 -6
- package/genes/evolve-life/.compile-result.json +0 -12
- package/genes/evolve-life/README.md +0 -52
- package/genes/evolve-life/gene.ir.wasm +0 -0
- package/genes/evolve-life/gene.wasm +0 -0
- package/genes/evolve-life/index.ts +0 -255
- package/genes/evolve-life/phenotype.json +0 -129
- package/genes/evolve-life-bitwise/.cloud-manifest.json +0 -6
- package/genes/evolve-life-bitwise/.compile-result.json +0 -12
- package/genes/evolve-life-bitwise/gene.ir.wasm +0 -0
- package/genes/evolve-life-bitwise/gene.wasm +0 -0
- package/genes/evolve-life-bitwise/index.ts +0 -273
- package/genes/evolve-life-bitwise/phenotype.json +0 -129
- package/genes/evolve-life-sparse/.cloud-manifest.json +0 -6
- package/genes/evolve-life-sparse/.compile-result.json +0 -12
- package/genes/evolve-life-sparse/gene.ir.wasm +0 -0
- package/genes/evolve-life-sparse/gene.wasm +0 -0
- package/genes/evolve-life-sparse/index.ts +0 -236
- package/genes/evolve-life-sparse/phenotype.json +0 -129
- package/genes/fact-checker/.cloud-manifest.json +0 -6
- package/genes/fact-checker/.gene-manifest.json +0 -8
- package/genes/fact-checker/SKILL.md +0 -373
- package/genes/fact-checker/phenotype.json +0 -28
- package/genes/git-workflow/.cloud-manifest.json +0 -6
- package/genes/git-workflow/.gene-manifest.json +0 -8
- package/genes/git-workflow/SKILL.md +0 -407
- package/genes/git-workflow/phenotype.json +0 -28
- package/genes/grammar-checker/.cloud-manifest.json +0 -6
- package/genes/grammar-checker/.gene-manifest.json +0 -8
- package/genes/grammar-checker/SKILL.md +0 -194
- package/genes/grammar-checker/index.ts +0 -168
- package/genes/grammar-checker/package.json +0 -1
- package/genes/grammar-checker/phenotype.json +0 -52
- package/genes/guard-balanced/.gene-manifest.json +0 -8
- package/genes/guard-balanced/phenotype.json +0 -105
- package/genes/guard-balanced/system-prompt.md +0 -23
- package/genes/guard-strict/.gene-manifest.json +0 -8
- package/genes/guard-strict/phenotype.json +0 -107
- package/genes/guard-strict/system-prompt.md +0 -18
- package/genes/json-validator/.cloud-manifest.json +0 -6
- package/genes/json-validator/README.md +0 -42
- package/genes/json-validator/index.ts +0 -112
- package/genes/json-validator/phenotype.json +0 -42
- package/genes/license-advisor/.cloud-manifest.json +0 -6
- package/genes/license-advisor/.gene-manifest.json +0 -8
- package/genes/license-advisor/SKILL.md +0 -117
- package/genes/license-advisor/phenotype.json +0 -28
- package/genes/logic-architect/.cloud-manifest.json +0 -6
- package/genes/logic-architect/.gene-manifest.json +0 -8
- package/genes/logic-architect/SKILL.md +0 -451
- package/genes/logic-architect/phenotype.json +0 -28
- package/genes/markdown-formatter/.cloud-manifest.json +0 -6
- package/genes/markdown-formatter/README.md +0 -34
- package/genes/markdown-formatter/index.ts +0 -86
- package/genes/markdown-formatter/phenotype.json +0 -32
- package/genes/orch/.cloud-manifest.json +0 -6
- package/genes/orch/.gene-manifest.json +0 -8
- package/genes/orch/SKILL.md +0 -504
- package/genes/orch/phenotype.json +0 -28
- package/genes/particle-barneshut/.cloud-manifest.json +0 -6
- package/genes/particle-barneshut/.compile-result.json +0 -12
- package/genes/particle-barneshut/README.md +0 -55
- package/genes/particle-barneshut/gene.ir.wasm +0 -0
- package/genes/particle-barneshut/gene.wasm +0 -0
- package/genes/particle-barneshut/index.ts +0 -486
- package/genes/particle-barneshut/phenotype.json +0 -137
- package/genes/particle-brute/.cloud-manifest.json +0 -6
- package/genes/particle-brute/.compile-result.json +0 -12
- package/genes/particle-brute/README.md +0 -55
- package/genes/particle-brute/gene.ir.wasm +0 -0
- package/genes/particle-brute/gene.wasm +0 -0
- package/genes/particle-brute/index.ts +0 -277
- package/genes/particle-brute/phenotype.json +0 -137
- package/genes/particle-spatial/.cloud-manifest.json +0 -6
- package/genes/particle-spatial/.compile-result.json +0 -12
- package/genes/particle-spatial/README.md +0 -53
- package/genes/particle-spatial/gene.ir.wasm +0 -0
- package/genes/particle-spatial/gene.wasm +0 -0
- package/genes/particle-spatial/index.ts +0 -352
- package/genes/particle-spatial/phenotype.json +0 -137
- package/genes/performance-optimizer/.cloud-manifest.json +0 -6
- package/genes/performance-optimizer/.gene-manifest.json +0 -8
- package/genes/performance-optimizer/SKILL.md +0 -480
- package/genes/performance-optimizer/phenotype.json +0 -28
- package/genes/plagiarism-checker/.cloud-manifest.json +0 -6
- package/genes/plagiarism-checker/.gene-manifest.json +0 -8
- package/genes/plagiarism-checker/SKILL.md +0 -342
- package/genes/plagiarism-checker/phenotype.json +0 -28
- package/genes/product-manager/.cloud-manifest.json +0 -6
- package/genes/product-manager/.gene-manifest.json +0 -8
- package/genes/product-manager/SKILL.md +0 -249
- package/genes/product-manager/phenotype.json +0 -28
- package/genes/project-reviewer/.cloud-manifest.json +0 -6
- package/genes/project-reviewer/.gene-manifest.json +0 -8
- package/genes/project-reviewer/SKILL.md +0 -312
- package/genes/project-reviewer/phenotype.json +0 -28
- package/genes/prompt-engineer/.cloud-manifest.json +0 -6
- package/genes/prompt-engineer/.gene-manifest.json +0 -8
- package/genes/prompt-engineer/SKILL.md +0 -411
- package/genes/prompt-engineer/phenotype.json +0 -28
- package/genes/prompt-review-perf/.gene-manifest.json +0 -8
- package/genes/prompt-review-perf/phenotype.json +0 -61
- package/genes/prompt-review-perf/system-prompt.md +0 -22
- package/genes/prompt-review-readability/.gene-manifest.json +0 -8
- package/genes/prompt-review-readability/phenotype.json +0 -60
- package/genes/prompt-review-readability/system-prompt.md +0 -21
- package/genes/prompt-review-security/.gene-manifest.json +0 -8
- package/genes/prompt-review-security/phenotype.json +0 -60
- package/genes/prompt-review-security/system-prompt.md +0 -21
- package/genes/readability-analyzer/.cloud-manifest.json +0 -6
- package/genes/readability-analyzer/.gene-manifest.json +0 -8
- package/genes/readability-analyzer/SKILL.md +0 -357
- package/genes/readability-analyzer/index.ts +0 -123
- package/genes/readability-analyzer/package.json +0 -1
- package/genes/readability-analyzer/phenotype.json +0 -35
- package/genes/rotifer-protocol/SKILL.md +0 -121
- package/genes/rule-router-frequency/.gene-manifest.json +0 -8
- package/genes/rule-router-frequency/phenotype.json +0 -76
- package/genes/rule-router-frequency/system-prompt.md +0 -26
- package/genes/rule-router-relevance/.gene-manifest.json +0 -8
- package/genes/rule-router-relevance/phenotype.json +0 -76
- package/genes/rule-router-relevance/system-prompt.md +0 -29
- package/genes/security-auditor/.cloud-manifest.json +0 -6
- package/genes/security-auditor/.gene-manifest.json +0 -8
- package/genes/security-auditor/SKILL.md +0 -494
- package/genes/security-auditor/phenotype.json +0 -28
- package/genes/seo-optimizer/.cloud-manifest.json +0 -6
- package/genes/seo-optimizer/.gene-manifest.json +0 -8
- package/genes/seo-optimizer/SKILL.md +0 -327
- package/genes/seo-optimizer/index.ts +0 -206
- package/genes/seo-optimizer/package.json +0 -1
- package/genes/seo-optimizer/phenotype.json +0 -1
- package/genes/source-linker/.cloud-manifest.json +0 -6
- package/genes/source-linker/index.ts +0 -88
- package/genes/source-linker/phenotype.json +0 -45
- package/genes/style-optimizer/.cloud-manifest.json +0 -6
- package/genes/style-optimizer/.gene-manifest.json +0 -8
- package/genes/style-optimizer/SKILL.md +0 -285
- package/genes/style-optimizer/phenotype.json +0 -28
- package/genes/tech-lead/.cloud-manifest.json +0 -6
- package/genes/tech-lead/.gene-manifest.json +0 -8
- package/genes/tech-lead/SKILL.md +0 -451
- package/genes/tech-lead/phenotype.json +0 -28
- package/genes/test-wrap/.cloud-manifest.json +0 -6
- package/genes/test-wrap/.gene-manifest.json +0 -8
- package/genes/test-wrap/phenotype.json +0 -28
- package/genes/testing-strategist/.cloud-manifest.json +0 -6
- package/genes/testing-strategist/.gene-manifest.json +0 -8
- package/genes/testing-strategist/SKILL.md +0 -500
- package/genes/testing-strategist/phenotype.json +0 -28
- package/genes/text-summarizer/.cloud-manifest.json +0 -6
- package/genes/text-summarizer/README.md +0 -34
- package/genes/text-summarizer/index.ts +0 -122
- package/genes/text-summarizer/phenotype.json +0 -32
- package/genes/tone-analyzer/.cloud-manifest.json +0 -6
- package/genes/tone-analyzer/.gene-manifest.json +0 -8
- package/genes/tone-analyzer/SKILL.md +0 -410
- package/genes/tone-analyzer/phenotype.json +0 -28
- package/genes/translator/.cloud-manifest.json +0 -6
- package/genes/translator/.gene-manifest.json +0 -8
- package/genes/translator/SKILL.md +0 -355
- package/genes/translator/phenotype.json +0 -28
- package/genes/ui-components/.cloud-manifest.json +0 -6
- package/genes/ui-components/.gene-manifest.json +0 -8
- package/genes/ui-components/SKILL.md +0 -467
- package/genes/ui-components/phenotype.json +0 -28
- package/genes/uiux-designer/.cloud-manifest.json +0 -6
- package/genes/uiux-designer/.gene-manifest.json +0 -8
- package/genes/uiux-designer/SKILL.md +0 -353
- package/genes/uiux-designer/phenotype.json +0 -28
- package/genes/url-extractor/.cloud-manifest.json +0 -6
- package/genes/url-extractor/README.md +0 -37
- package/genes/url-extractor/index.ts +0 -86
- package/genes/url-extractor/phenotype.json +0 -48
- package/genes/ux-patterns/.cloud-manifest.json +0 -6
- package/genes/ux-patterns/.gene-manifest.json +0 -8
- package/genes/ux-patterns/SKILL.md +0 -872
- package/genes/ux-patterns/phenotype.json +0 -28
- package/genes/web3-components/.cloud-manifest.json +0 -6
- package/genes/web3-components/.gene-manifest.json +0 -8
- package/genes/web3-components/SKILL.md +0 -390
- package/genes/web3-components/phenotype.json +0 -28
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prompt-engineer
|
|
3
|
-
description: Design and optimize AI prompts for maximum effectiveness and cost efficiency. Create structured outputs, few-shot examples, and prompt templates. Use when writing prompts, designing AI features, optimizing token usage, or when the user mentions prompt, system message, or AI output format.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Prompt Engineer (提示词工程师)
|
|
7
|
-
|
|
8
|
-
**Goal**: 设计高效、稳定、低成本的 AI 提示词,确保输出质量和一致性。
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Pre-Design Checklist
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
Prompt Design Check:
|
|
16
|
-
- [ ] 任务目标明确?(做什么)
|
|
17
|
-
- [ ] 输出格式定义?(JSON/Markdown/自然语言)
|
|
18
|
-
- [ ] 有 Few-shot 示例?
|
|
19
|
-
- [ ] Token 成本评估?
|
|
20
|
-
- [ ] 边界情况处理?(拒绝/不确定/超长)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 1. Prompt Structure (提示词结构)
|
|
26
|
-
|
|
27
|
-
### 标准模板
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
const PROMPT_TEMPLATE = `
|
|
31
|
-
# Role
|
|
32
|
-
{角色定义 - 1-2句}
|
|
33
|
-
|
|
34
|
-
# Task
|
|
35
|
-
{任务描述 - 清晰具体}
|
|
36
|
-
|
|
37
|
-
# Context
|
|
38
|
-
{背景信息 - 仅包含必要信息}
|
|
39
|
-
|
|
40
|
-
# Output Format
|
|
41
|
-
{输出格式 - 结构化定义}
|
|
42
|
-
|
|
43
|
-
# Examples
|
|
44
|
-
{Few-shot 示例 - 2-3个}
|
|
45
|
-
|
|
46
|
-
# Constraints
|
|
47
|
-
{约束条件 - 禁止事项}
|
|
48
|
-
|
|
49
|
-
# Input
|
|
50
|
-
{用户输入}
|
|
51
|
-
`
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### 结构化输出 (JSON Schema)
|
|
55
|
-
|
|
56
|
-
```typescript
|
|
57
|
-
// 使用 Zod 定义 Schema
|
|
58
|
-
import { z } from 'zod'
|
|
59
|
-
|
|
60
|
-
const AnalysisSchema = z.object({
|
|
61
|
-
summary: z.string().describe('一句话总结'),
|
|
62
|
-
keyPoints: z.array(z.string()).max(5).describe('关键要点'),
|
|
63
|
-
sentiment: z.enum(['positive', 'negative', 'neutral']),
|
|
64
|
-
confidence: z.number().min(0).max(1),
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
// Vercel AI SDK 用法
|
|
68
|
-
import { generateObject } from 'ai'
|
|
69
|
-
|
|
70
|
-
const result = await generateObject({
|
|
71
|
-
model: openai('gpt-4o'),
|
|
72
|
-
schema: AnalysisSchema,
|
|
73
|
-
prompt: userInput,
|
|
74
|
-
})
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### OpenAI Function Calling
|
|
78
|
-
|
|
79
|
-
```typescript
|
|
80
|
-
const tools = [{
|
|
81
|
-
type: 'function',
|
|
82
|
-
function: {
|
|
83
|
-
name: 'extract_entities',
|
|
84
|
-
description: 'Extract named entities from text',
|
|
85
|
-
parameters: {
|
|
86
|
-
type: 'object',
|
|
87
|
-
properties: {
|
|
88
|
-
persons: { type: 'array', items: { type: 'string' } },
|
|
89
|
-
organizations: { type: 'array', items: { type: 'string' } },
|
|
90
|
-
locations: { type: 'array', items: { type: 'string' } },
|
|
91
|
-
},
|
|
92
|
-
required: ['persons', 'organizations', 'locations'],
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
}]
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## 2. Prompt Patterns (提示词模式)
|
|
101
|
-
|
|
102
|
-
### Chain of Thought (CoT)
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
Let's think step by step:
|
|
106
|
-
1. First, analyze...
|
|
107
|
-
2. Then, consider...
|
|
108
|
-
3. Finally, conclude...
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Few-Shot Learning
|
|
112
|
-
|
|
113
|
-
```typescript
|
|
114
|
-
const FEW_SHOT_PROMPT = `
|
|
115
|
-
# Task
|
|
116
|
-
Classify the sentiment of the text.
|
|
117
|
-
|
|
118
|
-
# Examples
|
|
119
|
-
Input: "This product exceeded my expectations!"
|
|
120
|
-
Output: { "sentiment": "positive", "confidence": 0.95 }
|
|
121
|
-
|
|
122
|
-
Input: "Terrible experience, never buying again."
|
|
123
|
-
Output: { "sentiment": "negative", "confidence": 0.92 }
|
|
124
|
-
|
|
125
|
-
Input: "It works as described."
|
|
126
|
-
Output: { "sentiment": "neutral", "confidence": 0.78 }
|
|
127
|
-
|
|
128
|
-
# Input
|
|
129
|
-
${userInput}
|
|
130
|
-
`
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Role Prompting
|
|
134
|
-
|
|
135
|
-
```typescript
|
|
136
|
-
const EXPERT_ROLE = `
|
|
137
|
-
You are a senior blockchain security auditor with 10+ years of experience.
|
|
138
|
-
You specialize in identifying vulnerabilities in smart contracts.
|
|
139
|
-
You are methodical, thorough, and always explain your reasoning.
|
|
140
|
-
`
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Output Constraints
|
|
144
|
-
|
|
145
|
-
```typescript
|
|
146
|
-
const OUTPUT_CONSTRAINTS = `
|
|
147
|
-
# Constraints
|
|
148
|
-
- Response must be valid JSON
|
|
149
|
-
- Maximum 3 key points
|
|
150
|
-
- Each point under 50 words
|
|
151
|
-
- Use professional tone
|
|
152
|
-
- If unsure, say "Unable to determine" instead of guessing
|
|
153
|
-
`
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
## 3. Token Optimization (成本优化)
|
|
159
|
-
|
|
160
|
-
### 精简原则
|
|
161
|
-
|
|
162
|
-
| Before | After | 节省 |
|
|
163
|
-
|--------|-------|------|
|
|
164
|
-
| "I want you to..." | (删除) | ~5 tokens |
|
|
165
|
-
| "Please provide..." | (直接说) | ~3 tokens |
|
|
166
|
-
| 重复的上下文 | 引用变量 | ~50% |
|
|
167
|
-
| 完整示例 x 5 | 精选示例 x 2 | ~60% |
|
|
168
|
-
|
|
169
|
-
### 动态上下文
|
|
170
|
-
|
|
171
|
-
```typescript
|
|
172
|
-
// 根据任务复杂度选择示例数量
|
|
173
|
-
function buildPrompt(task: string, complexity: 'low' | 'medium' | 'high') {
|
|
174
|
-
const exampleCount = { low: 1, medium: 2, high: 3 }[complexity]
|
|
175
|
-
const examples = EXAMPLES.slice(0, exampleCount)
|
|
176
|
-
|
|
177
|
-
return `
|
|
178
|
-
${SYSTEM_PROMPT}
|
|
179
|
-
${examples.map(formatExample).join('\n')}
|
|
180
|
-
${task}
|
|
181
|
-
`
|
|
182
|
-
}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### 压缩长文本
|
|
186
|
-
|
|
187
|
-
```typescript
|
|
188
|
-
// 先用小模型压缩,再用大模型分析
|
|
189
|
-
async function analyzeDocument(doc: string) {
|
|
190
|
-
// Step 1: 压缩 (便宜)
|
|
191
|
-
const summary = await generateText({
|
|
192
|
-
model: openai('gpt-4o-mini'),
|
|
193
|
-
prompt: `Summarize in 200 words: ${doc}`,
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
// Step 2: 深度分析 (贵)
|
|
197
|
-
const analysis = await generateObject({
|
|
198
|
-
model: openai('gpt-4o'),
|
|
199
|
-
schema: AnalysisSchema,
|
|
200
|
-
prompt: `Analyze: ${summary}`,
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
return analysis
|
|
204
|
-
}
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## 4. Prompt Templates Library
|
|
210
|
-
|
|
211
|
-
### 内容生成
|
|
212
|
-
|
|
213
|
-
```typescript
|
|
214
|
-
const CONTENT_GENERATION = `
|
|
215
|
-
# Role
|
|
216
|
-
You are a professional content writer.
|
|
217
|
-
|
|
218
|
-
# Task
|
|
219
|
-
Write a {contentType} about {topic}.
|
|
220
|
-
|
|
221
|
-
# Requirements
|
|
222
|
-
- Tone: {tone}
|
|
223
|
-
- Length: {wordCount} words
|
|
224
|
-
- Audience: {audience}
|
|
225
|
-
- Include: {mustInclude}
|
|
226
|
-
|
|
227
|
-
# Format
|
|
228
|
-
Return as markdown with proper headings.
|
|
229
|
-
`
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
### 数据提取
|
|
233
|
-
|
|
234
|
-
```typescript
|
|
235
|
-
const DATA_EXTRACTION = `
|
|
236
|
-
# Task
|
|
237
|
-
Extract structured data from the following text.
|
|
238
|
-
|
|
239
|
-
# Output Schema
|
|
240
|
-
{
|
|
241
|
-
"field1": "description",
|
|
242
|
-
"field2": "description",
|
|
243
|
-
...
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
# Rules
|
|
247
|
-
- If a field is not found, use null
|
|
248
|
-
- Dates in ISO 8601 format
|
|
249
|
-
- Numbers without units
|
|
250
|
-
|
|
251
|
-
# Text
|
|
252
|
-
{inputText}
|
|
253
|
-
`
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### 代码生成
|
|
257
|
-
|
|
258
|
-
```typescript
|
|
259
|
-
const CODE_GENERATION = `
|
|
260
|
-
# Role
|
|
261
|
-
You are a senior {language} developer.
|
|
262
|
-
|
|
263
|
-
# Task
|
|
264
|
-
{taskDescription}
|
|
265
|
-
|
|
266
|
-
# Requirements
|
|
267
|
-
- Use {framework}
|
|
268
|
-
- Follow {styleGuide}
|
|
269
|
-
- Include error handling
|
|
270
|
-
- Add TypeScript types
|
|
271
|
-
|
|
272
|
-
# Output
|
|
273
|
-
Return only the code, no explanations.
|
|
274
|
-
Use \`\`\`{language} code blocks.
|
|
275
|
-
`
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### 分类/判断
|
|
279
|
-
|
|
280
|
-
```typescript
|
|
281
|
-
const CLASSIFICATION = `
|
|
282
|
-
# Task
|
|
283
|
-
Classify the input into one of the following categories:
|
|
284
|
-
{categories}
|
|
285
|
-
|
|
286
|
-
# Rules
|
|
287
|
-
- Choose exactly one category
|
|
288
|
-
- Include confidence score (0-1)
|
|
289
|
-
- If unsure (confidence < 0.6), choose "unknown"
|
|
290
|
-
|
|
291
|
-
# Output Format
|
|
292
|
-
{ "category": "...", "confidence": 0.XX, "reasoning": "..." }
|
|
293
|
-
|
|
294
|
-
# Input
|
|
295
|
-
{input}
|
|
296
|
-
`
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## 5. Testing & Iteration
|
|
302
|
-
|
|
303
|
-
### Prompt 测试矩阵
|
|
304
|
-
|
|
305
|
-
| 测试维度 | 检查点 |
|
|
306
|
-
|----------|--------|
|
|
307
|
-
| 正常输入 | 预期输出正确 |
|
|
308
|
-
| 边界输入 | 空/超长/特殊字符 |
|
|
309
|
-
| 对抗输入 | Prompt 注入尝试 |
|
|
310
|
-
| 一致性 | 相同输入多次运行 |
|
|
311
|
-
|
|
312
|
-
### 版本管理
|
|
313
|
-
|
|
314
|
-
```typescript
|
|
315
|
-
// prompts/v1/analyzer.ts
|
|
316
|
-
export const ANALYZER_PROMPT_V1 = `...`
|
|
317
|
-
|
|
318
|
-
// prompts/v2/analyzer.ts (优化版)
|
|
319
|
-
export const ANALYZER_PROMPT_V2 = `...`
|
|
320
|
-
|
|
321
|
-
// prompts/index.ts
|
|
322
|
-
export { ANALYZER_PROMPT_V2 as ANALYZER_PROMPT } from './v2/analyzer'
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
### A/B 测试
|
|
326
|
-
|
|
327
|
-
```typescript
|
|
328
|
-
async function runPromptABTest(input: string) {
|
|
329
|
-
const [resultA, resultB] = await Promise.all([
|
|
330
|
-
generateWithPrompt(PROMPT_V1, input),
|
|
331
|
-
generateWithPrompt(PROMPT_V2, input),
|
|
332
|
-
])
|
|
333
|
-
|
|
334
|
-
logToAnalytics({
|
|
335
|
-
input,
|
|
336
|
-
resultA,
|
|
337
|
-
resultB,
|
|
338
|
-
// 人工评估或自动评估
|
|
339
|
-
})
|
|
340
|
-
}
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
---
|
|
344
|
-
|
|
345
|
-
## 6. Common Mistakes (常见错误)
|
|
346
|
-
|
|
347
|
-
### ❌ 避免
|
|
348
|
-
|
|
349
|
-
```typescript
|
|
350
|
-
// 太模糊
|
|
351
|
-
"Help me with this text"
|
|
352
|
-
|
|
353
|
-
// 太啰嗦
|
|
354
|
-
"I would really appreciate it if you could kindly..."
|
|
355
|
-
|
|
356
|
-
// 无结构
|
|
357
|
-
"Analyze this and give me insights"
|
|
358
|
-
|
|
359
|
-
// 无示例
|
|
360
|
-
"Extract the data" (什么格式?)
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
### ✅ 正确
|
|
364
|
-
|
|
365
|
-
```typescript
|
|
366
|
-
// 明确具体
|
|
367
|
-
"Extract all company names and their founding years"
|
|
368
|
-
|
|
369
|
-
// 直接
|
|
370
|
-
"Summarize in 3 bullet points"
|
|
371
|
-
|
|
372
|
-
// 结构化
|
|
373
|
-
"Return JSON: { companies: [{ name, year }] }"
|
|
374
|
-
|
|
375
|
-
// 有示例
|
|
376
|
-
"Example: 'Apple founded 1976' → { name: 'Apple', year: 1976 }"
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
---
|
|
380
|
-
|
|
381
|
-
## Quick Reference
|
|
382
|
-
|
|
383
|
-
### 模型选择
|
|
384
|
-
|
|
385
|
-
| 任务类型 | 推荐模型 | 理由 |
|
|
386
|
-
|----------|----------|------|
|
|
387
|
-
| 简单分类 | gpt-4o-mini | 快、便宜 |
|
|
388
|
-
| 复杂推理 | gpt-4o / claude-3.5-sonnet | 质量高 |
|
|
389
|
-
| 代码生成 | gpt-4o / claude-3.5-sonnet | 准确性 |
|
|
390
|
-
| 长文本 | claude-3.5-sonnet | 200k context |
|
|
391
|
-
|
|
392
|
-
### Token 估算
|
|
393
|
-
|
|
394
|
-
```
|
|
395
|
-
英文: ~4 chars = 1 token
|
|
396
|
-
中文: ~1.5 chars = 1 token
|
|
397
|
-
代码: ~3 chars = 1 token
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
### 常用 System Prompts
|
|
401
|
-
|
|
402
|
-
```typescript
|
|
403
|
-
// 严格 JSON
|
|
404
|
-
"You are a JSON generator. Output valid JSON only, no markdown."
|
|
405
|
-
|
|
406
|
-
// 简洁回答
|
|
407
|
-
"Be concise. Answer in 1-2 sentences maximum."
|
|
408
|
-
|
|
409
|
-
// 拒绝回答
|
|
410
|
-
"If you cannot answer confidently, respond with: { error: 'Unable to determine' }"
|
|
411
|
-
```
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "ai.prompting",
|
|
3
|
-
"description": "Design and optimize AI prompts for maximum effectiveness and cost efficiency. Create structured outputs, few-shot examples, and prompt templates. Use when writing prompts, designing AI features, optimizing token usage, or when the user mentions prompt, system message, or AI output format.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"prompt": {
|
|
8
|
-
"type": "string"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"required": []
|
|
12
|
-
},
|
|
13
|
-
"outputSchema": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"result": {
|
|
17
|
-
"type": "string"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"dependencies": [],
|
|
22
|
-
"version": "0.1.0",
|
|
23
|
-
"author": "rotifer-team",
|
|
24
|
-
"createdAt": 1771939418611,
|
|
25
|
-
"fidelity": "Wrapped",
|
|
26
|
-
"transparency": "Open",
|
|
27
|
-
"source": "skill"
|
|
28
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "prompt.code-review",
|
|
3
|
-
"description": "Code review gene specialized in performance issue detection. Identifies N+1 queries, unnecessary re-renders, memory leaks, blocking operations, inefficient algorithms, and bundle size issues. Part of the Code Review Assistant 3×2 arena competition.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"code": { "type": "string", "description": "Source code to review" },
|
|
8
|
-
"language": { "type": "string", "description": "Programming language" },
|
|
9
|
-
"context": { "type": "string", "description": "File path or component context" }
|
|
10
|
-
},
|
|
11
|
-
"required": ["code"]
|
|
12
|
-
},
|
|
13
|
-
"outputSchema": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"findings": {
|
|
17
|
-
"type": "array",
|
|
18
|
-
"items": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"properties": {
|
|
21
|
-
"severity": { "type": "string", "enum": ["critical", "warning", "info"] },
|
|
22
|
-
"category": { "type": "string" },
|
|
23
|
-
"message": { "type": "string" },
|
|
24
|
-
"line": { "type": "integer" },
|
|
25
|
-
"fix": { "type": "string" },
|
|
26
|
-
"impact": { "type": "string", "description": "Estimated performance impact" }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"summary": { "type": "string" },
|
|
31
|
-
"overallImpact": { "type": "string", "enum": ["high", "medium", "low", "negligible"] }
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"llmRequirements": {
|
|
35
|
-
"templateFormat": "mustache",
|
|
36
|
-
"templateVariables": ["code", "language", "context"],
|
|
37
|
-
"targetModels": ["claude-3", "gpt-4"],
|
|
38
|
-
"minContextWindow": 8192,
|
|
39
|
-
"expectedOutputFormat": "json",
|
|
40
|
-
"temperatureHint": 0.2,
|
|
41
|
-
"maxOutputTokens": 4096,
|
|
42
|
-
"systemPromptPath": "system-prompt.md",
|
|
43
|
-
"chainOfThought": true
|
|
44
|
-
},
|
|
45
|
-
"fitnessConfig": {
|
|
46
|
-
"evaluationMethod": "template-quality",
|
|
47
|
-
"dimensions": {
|
|
48
|
-
"detectionRate": { "weight": 0.35, "description": "Fraction of known perf issues found" },
|
|
49
|
-
"falsePositiveRate": { "weight": 0.25, "description": "Precision of findings" },
|
|
50
|
-
"responseQuality": { "weight": 0.20, "description": "Actionability of optimization suggestions" },
|
|
51
|
-
"templateValidity": { "weight": 0.10, "description": "Template renders without error" },
|
|
52
|
-
"resourceEfficiency": { "weight": 0.10, "description": "Token efficiency" }
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"dependencies": [],
|
|
56
|
-
"version": "0.1.0",
|
|
57
|
-
"author": "rotifer-team",
|
|
58
|
-
"fidelity": "Wrapped",
|
|
59
|
-
"transparency": "Open",
|
|
60
|
-
"source": "development-genome"
|
|
61
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
You are a performance-focused code reviewer. Your mission is to find performance bottlenecks and optimization opportunities.
|
|
2
|
-
|
|
3
|
-
Focus areas (in priority order):
|
|
4
|
-
1. **Database queries**: N+1 queries, missing indexes, unbounded SELECTs, unnecessary JOINs
|
|
5
|
-
2. **Memory**: leaks, unbounded caches, large object retention, missing cleanup
|
|
6
|
-
3. **Async/blocking**: synchronous operations in async context, missing concurrency, sequential awaits that could be parallel
|
|
7
|
-
4. **Rendering**: unnecessary re-renders (React), layout thrashing, unoptimized images
|
|
8
|
-
5. **Algorithms**: O(n²) when O(n log n) exists, redundant computation, missing memoization
|
|
9
|
-
6. **Bundle/payload**: unused imports, large dependencies for small tasks, missing tree-shaking
|
|
10
|
-
7. **Network**: missing caching headers, redundant API calls, large payloads
|
|
11
|
-
|
|
12
|
-
For each finding, provide:
|
|
13
|
-
- `severity`: "critical" (measurable impact >100ms), "warning" (noticeable), "info" (micro-optimization)
|
|
14
|
-
- `category`: short tag (e.g., "n-plus-1", "memory-leak", "blocking-io")
|
|
15
|
-
- `message`: clear description of the issue
|
|
16
|
-
- `line`: approximate line number
|
|
17
|
-
- `fix`: concrete optimization with expected improvement
|
|
18
|
-
- `impact`: estimated performance impact (e.g., "~200ms savings per request")
|
|
19
|
-
|
|
20
|
-
Focus on findings with measurable impact. Avoid premature optimization suggestions.
|
|
21
|
-
|
|
22
|
-
Output valid JSON matching the output schema.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "prompt.code-review",
|
|
3
|
-
"description": "Code review gene specialized in readability and maintainability. Identifies unclear naming, missing documentation, excessive complexity, inconsistent patterns, and code smell. Part of the Code Review Assistant 3×2 arena competition.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"code": { "type": "string", "description": "Source code to review" },
|
|
8
|
-
"language": { "type": "string", "description": "Programming language" },
|
|
9
|
-
"context": { "type": "string", "description": "File path or component context" }
|
|
10
|
-
},
|
|
11
|
-
"required": ["code"]
|
|
12
|
-
},
|
|
13
|
-
"outputSchema": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"findings": {
|
|
17
|
-
"type": "array",
|
|
18
|
-
"items": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"properties": {
|
|
21
|
-
"severity": { "type": "string", "enum": ["critical", "warning", "info"] },
|
|
22
|
-
"category": { "type": "string" },
|
|
23
|
-
"message": { "type": "string" },
|
|
24
|
-
"line": { "type": "integer" },
|
|
25
|
-
"fix": { "type": "string" }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"summary": { "type": "string" },
|
|
30
|
-
"readabilityScore": { "type": "number", "description": "0-10 readability score" }
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"llmRequirements": {
|
|
34
|
-
"templateFormat": "mustache",
|
|
35
|
-
"templateVariables": ["code", "language", "context"],
|
|
36
|
-
"targetModels": ["claude-3", "gpt-4"],
|
|
37
|
-
"minContextWindow": 8192,
|
|
38
|
-
"expectedOutputFormat": "json",
|
|
39
|
-
"temperatureHint": 0.3,
|
|
40
|
-
"maxOutputTokens": 4096,
|
|
41
|
-
"systemPromptPath": "system-prompt.md",
|
|
42
|
-
"chainOfThought": false
|
|
43
|
-
},
|
|
44
|
-
"fitnessConfig": {
|
|
45
|
-
"evaluationMethod": "template-quality",
|
|
46
|
-
"dimensions": {
|
|
47
|
-
"detectionRate": { "weight": 0.30, "description": "Coverage of known readability issues" },
|
|
48
|
-
"falsePositiveRate": { "weight": 0.25, "description": "Precision — avoid pedantic nitpicks" },
|
|
49
|
-
"responseQuality": { "weight": 0.25, "description": "Quality of rewrite suggestions" },
|
|
50
|
-
"templateValidity": { "weight": 0.10, "description": "Template renders without error" },
|
|
51
|
-
"resourceEfficiency": { "weight": 0.10, "description": "Token efficiency" }
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"dependencies": [],
|
|
55
|
-
"version": "0.1.0",
|
|
56
|
-
"author": "rotifer-team",
|
|
57
|
-
"fidelity": "Wrapped",
|
|
58
|
-
"transparency": "Open",
|
|
59
|
-
"source": "development-genome"
|
|
60
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
You are a readability-focused code reviewer. Your mission is to improve code clarity and maintainability.
|
|
2
|
-
|
|
3
|
-
Focus areas (in priority order):
|
|
4
|
-
1. **Naming**: unclear variable/function/class names, abbreviations, misleading names
|
|
5
|
-
2. **Complexity**: functions >30 lines, nesting >3 levels, cyclomatic complexity >10
|
|
6
|
-
3. **Documentation**: missing JSDoc/docstrings for public APIs, outdated comments
|
|
7
|
-
4. **Patterns**: inconsistent error handling, mixed paradigms, anti-patterns
|
|
8
|
-
5. **Structure**: god functions, missing abstractions, tight coupling
|
|
9
|
-
6. **Dead code**: unused variables, unreachable branches, commented-out code
|
|
10
|
-
7. **Consistency**: mixed naming conventions, inconsistent formatting within file
|
|
11
|
-
|
|
12
|
-
For each finding, provide:
|
|
13
|
-
- `severity`: "critical" (blocks understanding), "warning" (slows comprehension), "info" (style preference)
|
|
14
|
-
- `category`: short tag (e.g., "naming", "complexity", "dead-code")
|
|
15
|
-
- `message`: clear description of the readability issue
|
|
16
|
-
- `line`: approximate line number
|
|
17
|
-
- `fix`: concrete rewrite suggestion (show before/after when possible)
|
|
18
|
-
|
|
19
|
-
Respect the codebase's existing style. Don't enforce personal preferences — focus on objective clarity improvements.
|
|
20
|
-
|
|
21
|
-
Output valid JSON matching the output schema. Include a `readabilityScore` from 0 (unreadable) to 10 (exemplary).
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "prompt.code-review",
|
|
3
|
-
"description": "Code review gene specialized in security vulnerability detection. Identifies prompt injection, private key exposure, path traversal, SSRF, input validation gaps, and supply chain risks. Part of the Code Review Assistant 3×2 arena competition.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"code": { "type": "string", "description": "Source code to review" },
|
|
8
|
-
"language": { "type": "string", "description": "Programming language" },
|
|
9
|
-
"context": { "type": "string", "description": "File path or component context" }
|
|
10
|
-
},
|
|
11
|
-
"required": ["code"]
|
|
12
|
-
},
|
|
13
|
-
"outputSchema": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"findings": {
|
|
17
|
-
"type": "array",
|
|
18
|
-
"items": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"properties": {
|
|
21
|
-
"severity": { "type": "string", "enum": ["critical", "warning", "info"] },
|
|
22
|
-
"category": { "type": "string" },
|
|
23
|
-
"message": { "type": "string" },
|
|
24
|
-
"line": { "type": "integer" },
|
|
25
|
-
"fix": { "type": "string" }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"summary": { "type": "string" },
|
|
30
|
-
"riskLevel": { "type": "string", "enum": ["high", "medium", "low", "none"] }
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"llmRequirements": {
|
|
34
|
-
"templateFormat": "mustache",
|
|
35
|
-
"templateVariables": ["code", "language", "context"],
|
|
36
|
-
"targetModels": ["claude-3", "gpt-4"],
|
|
37
|
-
"minContextWindow": 8192,
|
|
38
|
-
"expectedOutputFormat": "json",
|
|
39
|
-
"temperatureHint": 0.1,
|
|
40
|
-
"maxOutputTokens": 4096,
|
|
41
|
-
"systemPromptPath": "system-prompt.md",
|
|
42
|
-
"chainOfThought": true
|
|
43
|
-
},
|
|
44
|
-
"fitnessConfig": {
|
|
45
|
-
"evaluationMethod": "template-quality",
|
|
46
|
-
"dimensions": {
|
|
47
|
-
"detectionRate": { "weight": 0.35, "description": "Fraction of known issues found in test corpus" },
|
|
48
|
-
"falsePositiveRate": { "weight": 0.25, "description": "1 - (false positives / total findings), higher is better" },
|
|
49
|
-
"responseQuality": { "weight": 0.20, "description": "Actionability of fix suggestions" },
|
|
50
|
-
"templateValidity": { "weight": 0.10, "description": "Template renders without error" },
|
|
51
|
-
"resourceEfficiency": { "weight": 0.10, "description": "Token efficiency of rendered prompt" }
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"dependencies": [],
|
|
55
|
-
"version": "0.1.0",
|
|
56
|
-
"author": "rotifer-team",
|
|
57
|
-
"fidelity": "Wrapped",
|
|
58
|
-
"transparency": "Open",
|
|
59
|
-
"source": "development-genome"
|
|
60
|
-
}
|