@rotifer/playground 0.8.1 → 0.8.5
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 +25 -11
- package/README.md +64 -48
- package/README.zh.md +60 -37
- 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 +154 -36
- 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 +113 -30
- 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 +60 -37
- 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 +127 -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 +26 -9
- 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 +95 -75
- 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.map +1 -1
- package/dist/utils/binding.js +5 -4
- 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/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.js +9 -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/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 +29 -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,168 +0,0 @@
|
|
|
1
|
-
interface GrammarInput {
|
|
2
|
-
text: string;
|
|
3
|
-
strict?: boolean;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface GrammarIssue {
|
|
7
|
-
rule: string;
|
|
8
|
-
message: string;
|
|
9
|
-
position: number;
|
|
10
|
-
suggestion: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface GrammarOutput {
|
|
14
|
-
issues: GrammarIssue[];
|
|
15
|
-
score: number;
|
|
16
|
-
summary: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface Rule {
|
|
20
|
-
id: string;
|
|
21
|
-
pattern: RegExp;
|
|
22
|
-
message: string;
|
|
23
|
-
suggestion: (match: RegExpExecArray) => string;
|
|
24
|
-
strict?: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const RULES: Rule[] = [
|
|
28
|
-
{
|
|
29
|
-
id: "double-space",
|
|
30
|
-
pattern: / +/g,
|
|
31
|
-
message: "Multiple consecutive spaces",
|
|
32
|
-
suggestion: () => "Use a single space",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: "sentence-capitalization",
|
|
36
|
-
pattern: /(?:^|[.!?]\s+)([a-z])/gm,
|
|
37
|
-
message: "Sentence should start with a capital letter",
|
|
38
|
-
suggestion: (m) => `Capitalize "${m[1]}" → "${m[1].toUpperCase()}"`,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: "repeated-word",
|
|
42
|
-
pattern: /\b(\w{2,})\s+\1\b/gi,
|
|
43
|
-
message: "Repeated word",
|
|
44
|
-
suggestion: (m) => `Remove duplicate "${m[1]}"`,
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: "missing-period",
|
|
48
|
-
pattern: /[a-zA-Z]\s*$/,
|
|
49
|
-
message: "Text does not end with punctuation",
|
|
50
|
-
suggestion: () => "Add a period at the end",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "space-before-punctuation",
|
|
54
|
-
pattern: /\s+[,;:!?.]/g,
|
|
55
|
-
message: "Space before punctuation",
|
|
56
|
-
suggestion: () => "Remove space before punctuation mark",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: "no-space-after-punctuation",
|
|
60
|
-
pattern: /[,;:][^\s\n"')\]]/g,
|
|
61
|
-
message: "Missing space after punctuation",
|
|
62
|
-
suggestion: () => "Add a space after the punctuation mark",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: "a-an-mismatch",
|
|
66
|
-
pattern: /\ba\s+(?=[aeiouAEIOU]\w)/g,
|
|
67
|
-
message: '"a" before a vowel sound — should be "an"',
|
|
68
|
-
suggestion: () => 'Use "an" before vowel sounds',
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: "an-consonant-mismatch",
|
|
72
|
-
pattern: /\ban\s+(?=[bcdfgjklmnpqrstvwxyzBCDFGJKLMNPQRSTVWXYZ]\w)/g,
|
|
73
|
-
message: '"an" before a consonant sound — should be "a"',
|
|
74
|
-
suggestion: () => 'Use "a" before consonant sounds',
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: "its-confusion",
|
|
78
|
-
pattern: /\bits\s+(?=a\b|the\b|not\b|been\b|going\b|time\b)/gi,
|
|
79
|
-
message: 'Possible "it\'s" (it is) instead of "its" (possessive)',
|
|
80
|
-
suggestion: () => 'Consider "it\'s" if you mean "it is"',
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
id: "then-than",
|
|
84
|
-
pattern: /\bmore\s+\w+\s+then\b/gi,
|
|
85
|
-
message: '"then" should be "than" in comparisons',
|
|
86
|
-
suggestion: () => 'Use "than" for comparisons',
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: "double-negative",
|
|
90
|
-
pattern: /\b(?:don't|doesn't|didn't|won't|wouldn't|can't|couldn't)\s+\w*\s*(?:no|nothing|nobody|nowhere|never)\b/gi,
|
|
91
|
-
message: "Double negative detected",
|
|
92
|
-
suggestion: () => "Rewrite to use a single negative",
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: "oxford-comma",
|
|
96
|
-
pattern: /,\s+\w+\s+and\s+/gi,
|
|
97
|
-
message: "Consider Oxford comma before 'and' in a list",
|
|
98
|
-
suggestion: () => "Add comma before 'and' in lists of three or more",
|
|
99
|
-
strict: true,
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: "passive-voice",
|
|
103
|
-
pattern: /\b(?:is|are|was|were|been|being)\s+\w+ed\b/gi,
|
|
104
|
-
message: "Passive voice detected",
|
|
105
|
-
suggestion: () => "Consider rewriting in active voice",
|
|
106
|
-
strict: true,
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
id: "very-qualifier",
|
|
110
|
-
pattern: /\bvery\s+\w+/gi,
|
|
111
|
-
message: 'Weak qualifier "very" — consider a stronger word',
|
|
112
|
-
suggestion: () => 'Replace "very + adjective" with a single stronger adjective',
|
|
113
|
-
strict: true,
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
id: "trailing-whitespace",
|
|
117
|
-
pattern: /[ \t]+$/gm,
|
|
118
|
-
message: "Trailing whitespace at end of line",
|
|
119
|
-
suggestion: () => "Remove trailing whitespace",
|
|
120
|
-
},
|
|
121
|
-
];
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Grammar Checker Gene
|
|
125
|
-
*
|
|
126
|
-
* Rule-based English grammar checker with ~15 rules.
|
|
127
|
-
* Detects common errors like double spaces, capitalization, repeated words, etc.
|
|
128
|
-
*/
|
|
129
|
-
export async function express(input: GrammarInput): Promise<GrammarOutput> {
|
|
130
|
-
const text = (input.text || "").trim();
|
|
131
|
-
const strict = input.strict ?? false;
|
|
132
|
-
|
|
133
|
-
if (!text) {
|
|
134
|
-
return { issues: [], score: 100, summary: "No text provided." };
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const issues: GrammarIssue[] = [];
|
|
138
|
-
|
|
139
|
-
for (const rule of RULES) {
|
|
140
|
-
if (rule.strict && !strict) continue;
|
|
141
|
-
|
|
142
|
-
const regex = new RegExp(rule.pattern.source, rule.pattern.flags);
|
|
143
|
-
let match: RegExpExecArray | null;
|
|
144
|
-
|
|
145
|
-
while ((match = regex.exec(text)) !== null) {
|
|
146
|
-
issues.push({
|
|
147
|
-
rule: rule.id,
|
|
148
|
-
message: rule.message,
|
|
149
|
-
position: match.index,
|
|
150
|
-
suggestion: rule.suggestion(match),
|
|
151
|
-
});
|
|
152
|
-
if (!regex.global) break;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
issues.sort((a, b) => a.position - b.position);
|
|
157
|
-
|
|
158
|
-
const wordCount = text.split(/\s+/).filter((w) => w.length > 0).length;
|
|
159
|
-
const penalty = Math.min(issues.length * 5, 100);
|
|
160
|
-
const score = Math.max(0, 100 - penalty);
|
|
161
|
-
|
|
162
|
-
const summary =
|
|
163
|
-
issues.length === 0
|
|
164
|
-
? `No issues found in ${wordCount} words. Clean text!`
|
|
165
|
-
: `Found ${issues.length} issue${issues.length > 1 ? "s" : ""} in ${wordCount} words.`;
|
|
166
|
-
|
|
167
|
-
return { issues, score, summary };
|
|
168
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "content.grammar",
|
|
3
|
-
"description": "Check grammar, spelling, and punctuation in written content. Identify common errors and provide corrections. Use when reviewing any written content for grammatical accuracy.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"text": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "English text to check for grammar issues"
|
|
10
|
-
},
|
|
11
|
-
"strict": {
|
|
12
|
-
"type": "boolean",
|
|
13
|
-
"description": "Enable additional rules (passive voice, excessive adverbs)",
|
|
14
|
-
"default": false
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"required": ["text"]
|
|
18
|
-
},
|
|
19
|
-
"outputSchema": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"properties": {
|
|
22
|
-
"issues": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"items": {
|
|
25
|
-
"type": "object",
|
|
26
|
-
"properties": {
|
|
27
|
-
"rule": { "type": "string" },
|
|
28
|
-
"message": { "type": "string" },
|
|
29
|
-
"position": { "type": "number" },
|
|
30
|
-
"suggestion": { "type": "string" }
|
|
31
|
-
},
|
|
32
|
-
"required": ["rule", "message", "position", "suggestion"]
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"score": {
|
|
36
|
-
"type": "number",
|
|
37
|
-
"description": "0-100, higher = fewer issues"
|
|
38
|
-
},
|
|
39
|
-
"summary": {
|
|
40
|
-
"type": "string"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"required": ["issues", "score", "summary"]
|
|
44
|
-
},
|
|
45
|
-
"dependencies": [],
|
|
46
|
-
"version": "0.2.0",
|
|
47
|
-
"author": "rotifer-team",
|
|
48
|
-
"createdAt": 1771939397858,
|
|
49
|
-
"fidelity": "Native",
|
|
50
|
-
"transparency": "Open",
|
|
51
|
-
"source": "skill"
|
|
52
|
-
}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "guard.code-review",
|
|
3
|
-
"description": "Balanced guard gene for code review output filtering. Equal weight on precision and recall — filters obvious false positives while preserving most true findings. Adds confidence scores without aggressive rejection. Part of the Code Review Assistant 3×2 arena competition.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"reviewOutput": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "Raw output from a Prompt Gene (code review findings)",
|
|
10
|
-
"properties": {
|
|
11
|
-
"findings": {
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"severity": { "type": "string" },
|
|
17
|
-
"category": { "type": "string" },
|
|
18
|
-
"message": { "type": "string" },
|
|
19
|
-
"line": { "type": "integer" },
|
|
20
|
-
"fix": { "type": "string" }
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"summary": { "type": "string" }
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"originalCode": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "The original code being reviewed (for cross-checking)"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"required": ["reviewOutput"]
|
|
33
|
-
},
|
|
34
|
-
"outputSchema": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"properties": {
|
|
37
|
-
"filteredFindings": {
|
|
38
|
-
"type": "array",
|
|
39
|
-
"items": {
|
|
40
|
-
"type": "object",
|
|
41
|
-
"properties": {
|
|
42
|
-
"severity": { "type": "string" },
|
|
43
|
-
"category": { "type": "string" },
|
|
44
|
-
"message": { "type": "string" },
|
|
45
|
-
"line": { "type": "integer" },
|
|
46
|
-
"fix": { "type": "string" },
|
|
47
|
-
"confidence": { "type": "number" }
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
"rejected": {
|
|
52
|
-
"type": "array",
|
|
53
|
-
"items": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"properties": {
|
|
56
|
-
"originalMessage": { "type": "string" },
|
|
57
|
-
"rejectReason": { "type": "string" }
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"guardStats": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"properties": {
|
|
64
|
-
"inputCount": { "type": "integer" },
|
|
65
|
-
"outputCount": { "type": "integer" },
|
|
66
|
-
"rejectRate": { "type": "number" }
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"llmRequirements": {
|
|
72
|
-
"templateFormat": "mustache",
|
|
73
|
-
"templateVariables": ["reviewOutput", "originalCode"],
|
|
74
|
-
"targetModels": ["claude-3", "gpt-4"],
|
|
75
|
-
"minContextWindow": 8192,
|
|
76
|
-
"expectedOutputFormat": "json",
|
|
77
|
-
"temperatureHint": 0.1,
|
|
78
|
-
"maxOutputTokens": 4096,
|
|
79
|
-
"systemPromptPath": "system-prompt.md",
|
|
80
|
-
"chainOfThought": false
|
|
81
|
-
},
|
|
82
|
-
"guardConfig": {
|
|
83
|
-
"mode": "filter",
|
|
84
|
-
"vgContribution": "Security_Leak_Risk",
|
|
85
|
-
"strictness": "balanced",
|
|
86
|
-
"targetFalsePositiveRate": 0.15,
|
|
87
|
-
"targetFalseNegativeRate": 0.10
|
|
88
|
-
},
|
|
89
|
-
"fitnessConfig": {
|
|
90
|
-
"evaluationMethod": "template-quality",
|
|
91
|
-
"dimensions": {
|
|
92
|
-
"precision": { "weight": 0.30, "description": "1 - false positive rate" },
|
|
93
|
-
"recall": { "weight": 0.30, "description": "Fraction of true issues preserved" },
|
|
94
|
-
"rejectQuality": { "weight": 0.20, "description": "Correctness of reject reasons" },
|
|
95
|
-
"templateValidity": { "weight": 0.10, "description": "Template renders without error" },
|
|
96
|
-
"resourceEfficiency": { "weight": 0.10, "description": "Token efficiency" }
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
"dependencies": [],
|
|
100
|
-
"version": "0.1.0",
|
|
101
|
-
"author": "rotifer-team",
|
|
102
|
-
"fidelity": "Wrapped",
|
|
103
|
-
"transparency": "Open",
|
|
104
|
-
"source": "development-genome"
|
|
105
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
You are a BALANCED code review guard. Your job is to filter code review findings while preserving most genuine issues.
|
|
2
|
-
|
|
3
|
-
Your philosophy: **Catch obvious false positives, but err on the side of including uncertain findings with lower confidence scores.**
|
|
4
|
-
|
|
5
|
-
For each finding in the review output, evaluate:
|
|
6
|
-
|
|
7
|
-
1. **Existence check**: If `originalCode` is provided, verify the described code pattern actually exists. REJECT only clear hallucinations.
|
|
8
|
-
2. **Confidence scoring**: Assign a confidence score (0-1):
|
|
9
|
-
- 0.9-1.0: Finding references specific line and code pattern exists
|
|
10
|
-
- 0.7-0.9: Finding is plausible but line reference is approximate
|
|
11
|
-
- 0.5-0.7: Finding is generic but category is relevant to the code
|
|
12
|
-
- Below 0.5: REJECT — too vague or unsupported
|
|
13
|
-
3. **Severity validation**: Only adjust severity if clearly wrong (e.g., "critical" for a style issue).
|
|
14
|
-
4. **Deduplication**: If multiple findings describe the same issue, keep the most specific one.
|
|
15
|
-
|
|
16
|
-
Pass findings with confidence >= 0.4 (lower threshold than strict mode).
|
|
17
|
-
|
|
18
|
-
Output valid JSON with:
|
|
19
|
-
- `filteredFindings`: findings that survived (with confidence scores)
|
|
20
|
-
- `rejected`: only clearly false findings (with brief reason)
|
|
21
|
-
- `guardStats`: input/output counts and reject rate
|
|
22
|
-
|
|
23
|
-
The reject rate should typically be 10-25%. If you're rejecting >40%, you're being too strict.
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"domain": "guard.code-review",
|
|
3
|
-
"description": "Strict guard gene for code review output filtering. High precision, low recall — blocks false positives aggressively. Prefers missing a real issue over flagging a non-issue. Part of the Code Review Assistant 3×2 arena competition.",
|
|
4
|
-
"inputSchema": {
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"reviewOutput": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "Raw output from a Prompt Gene (code review findings)",
|
|
10
|
-
"properties": {
|
|
11
|
-
"findings": {
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"severity": { "type": "string" },
|
|
17
|
-
"category": { "type": "string" },
|
|
18
|
-
"message": { "type": "string" },
|
|
19
|
-
"line": { "type": "integer" },
|
|
20
|
-
"fix": { "type": "string" }
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"summary": { "type": "string" }
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"originalCode": {
|
|
28
|
-
"type": "string",
|
|
29
|
-
"description": "The original code being reviewed (for cross-checking)"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"required": ["reviewOutput"]
|
|
33
|
-
},
|
|
34
|
-
"outputSchema": {
|
|
35
|
-
"type": "object",
|
|
36
|
-
"properties": {
|
|
37
|
-
"filteredFindings": {
|
|
38
|
-
"type": "array",
|
|
39
|
-
"items": {
|
|
40
|
-
"type": "object",
|
|
41
|
-
"properties": {
|
|
42
|
-
"severity": { "type": "string" },
|
|
43
|
-
"category": { "type": "string" },
|
|
44
|
-
"message": { "type": "string" },
|
|
45
|
-
"line": { "type": "integer" },
|
|
46
|
-
"fix": { "type": "string" },
|
|
47
|
-
"confidence": { "type": "number", "description": "0-1 confidence that this is a real issue" }
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"description": "Only findings that pass strict validation"
|
|
51
|
-
},
|
|
52
|
-
"rejected": {
|
|
53
|
-
"type": "array",
|
|
54
|
-
"items": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"properties": {
|
|
57
|
-
"originalMessage": { "type": "string" },
|
|
58
|
-
"rejectReason": { "type": "string" }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"description": "Findings rejected with reason"
|
|
62
|
-
},
|
|
63
|
-
"guardStats": {
|
|
64
|
-
"type": "object",
|
|
65
|
-
"properties": {
|
|
66
|
-
"inputCount": { "type": "integer" },
|
|
67
|
-
"outputCount": { "type": "integer" },
|
|
68
|
-
"rejectRate": { "type": "number" }
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"llmRequirements": {
|
|
74
|
-
"templateFormat": "mustache",
|
|
75
|
-
"templateVariables": ["reviewOutput", "originalCode"],
|
|
76
|
-
"targetModels": ["claude-3", "gpt-4"],
|
|
77
|
-
"minContextWindow": 8192,
|
|
78
|
-
"expectedOutputFormat": "json",
|
|
79
|
-
"temperatureHint": 0.0,
|
|
80
|
-
"maxOutputTokens": 4096,
|
|
81
|
-
"systemPromptPath": "system-prompt.md",
|
|
82
|
-
"chainOfThought": true
|
|
83
|
-
},
|
|
84
|
-
"guardConfig": {
|
|
85
|
-
"mode": "filter",
|
|
86
|
-
"vgContribution": "Security_Leak_Risk",
|
|
87
|
-
"strictness": "high",
|
|
88
|
-
"targetFalsePositiveRate": 0.05,
|
|
89
|
-
"targetFalseNegativeRate": 0.30
|
|
90
|
-
},
|
|
91
|
-
"fitnessConfig": {
|
|
92
|
-
"evaluationMethod": "template-quality",
|
|
93
|
-
"dimensions": {
|
|
94
|
-
"precision": { "weight": 0.40, "description": "1 - false positive rate" },
|
|
95
|
-
"recall": { "weight": 0.20, "description": "Fraction of true issues preserved" },
|
|
96
|
-
"rejectQuality": { "weight": 0.20, "description": "Correctness of reject reasons" },
|
|
97
|
-
"templateValidity": { "weight": 0.10, "description": "Template renders without error" },
|
|
98
|
-
"resourceEfficiency": { "weight": 0.10, "description": "Token efficiency" }
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"dependencies": [],
|
|
102
|
-
"version": "0.1.0",
|
|
103
|
-
"author": "rotifer-team",
|
|
104
|
-
"fidelity": "Wrapped",
|
|
105
|
-
"transparency": "Open",
|
|
106
|
-
"source": "development-genome"
|
|
107
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
You are a STRICT code review guard. Your job is to filter code review findings, removing likely false positives.
|
|
2
|
-
|
|
3
|
-
Your philosophy: **Better to miss a real issue than to waste developer time on a false alarm.**
|
|
4
|
-
|
|
5
|
-
For each finding in the review output, evaluate:
|
|
6
|
-
|
|
7
|
-
1. **Line reference check**: Does the finding reference a specific line? If the line number doesn't correspond to relevant code, REJECT.
|
|
8
|
-
2. **Category validity**: Is the category (e.g., "injection", "memory-leak") supported by the actual code pattern? Reject vague or generic warnings.
|
|
9
|
-
3. **Fix actionability**: Does the fix suggestion contain concrete code? Reject findings with only "consider reviewing" or "be careful" advice.
|
|
10
|
-
4. **Hallucination check**: If `originalCode` is provided, verify the finding references actual code constructs. Reject if the finding describes code that doesn't exist.
|
|
11
|
-
5. **Severity calibration**: Downgrade "critical" to "warning" if the exploit requires unlikely preconditions.
|
|
12
|
-
|
|
13
|
-
Only pass findings with confidence >= 0.7.
|
|
14
|
-
|
|
15
|
-
Output valid JSON with:
|
|
16
|
-
- `filteredFindings`: findings that survived filtering (with confidence scores)
|
|
17
|
-
- `rejected`: findings removed (with reject reasons for transparency)
|
|
18
|
-
- `guardStats`: input/output counts and reject rate
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# json-validator
|
|
2
|
-
|
|
3
|
-
A Native Gene that validates JSON data against a JSON Schema definition.
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
rotifer test json-validator --input '{
|
|
9
|
-
"data": {"name": "Alice", "age": "not-a-number"},
|
|
10
|
-
"schema": {
|
|
11
|
-
"type": "object",
|
|
12
|
-
"properties": {
|
|
13
|
-
"name": {"type": "string"},
|
|
14
|
-
"age": {"type": "number"}
|
|
15
|
-
},
|
|
16
|
-
"required": ["name", "age"]
|
|
17
|
-
}
|
|
18
|
-
}'
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Features
|
|
22
|
-
|
|
23
|
-
- Full JSON Schema Draft-07 validation
|
|
24
|
-
- Detailed error messages with JSON path locations
|
|
25
|
-
- Strict mode for disallowing extra properties
|
|
26
|
-
- Nested schema support
|
|
27
|
-
|
|
28
|
-
## Input
|
|
29
|
-
|
|
30
|
-
| Field | Type | Required | Description |
|
|
31
|
-
|-------|------|----------|-------------|
|
|
32
|
-
| `data` | any | Yes | The JSON data to validate |
|
|
33
|
-
| `schema` | object | Yes | JSON Schema definition |
|
|
34
|
-
| `strict` | boolean | No | Disallow additional properties (default: false) |
|
|
35
|
-
|
|
36
|
-
## Output
|
|
37
|
-
|
|
38
|
-
| Field | Type | Description |
|
|
39
|
-
|-------|------|-------------|
|
|
40
|
-
| `valid` | boolean | Whether validation passed |
|
|
41
|
-
| `errors` | array | Validation errors with path, message, keyword |
|
|
42
|
-
| `errorCount` | number | Total error count |
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
interface ValidatorInput {
|
|
2
|
-
data: unknown;
|
|
3
|
-
schema: Record<string, unknown>;
|
|
4
|
-
strict?: boolean;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface ValidationError {
|
|
8
|
-
path: string;
|
|
9
|
-
message: string;
|
|
10
|
-
keyword: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface ValidatorOutput {
|
|
14
|
-
valid: boolean;
|
|
15
|
-
errors: ValidationError[];
|
|
16
|
-
errorCount: number;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function validate(
|
|
20
|
-
data: unknown,
|
|
21
|
-
schema: Record<string, unknown>,
|
|
22
|
-
path: string,
|
|
23
|
-
strict: boolean,
|
|
24
|
-
): ValidationError[] {
|
|
25
|
-
const errors: ValidationError[] = [];
|
|
26
|
-
|
|
27
|
-
if (schema.type) {
|
|
28
|
-
const expected = schema.type as string;
|
|
29
|
-
const actual = Array.isArray(data) ? "array" : data === null ? "null" : typeof data;
|
|
30
|
-
if (expected !== actual) {
|
|
31
|
-
errors.push({ path, message: `Expected ${expected}, got ${actual}`, keyword: "type" });
|
|
32
|
-
return errors;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (schema.enum && Array.isArray(schema.enum)) {
|
|
37
|
-
if (!schema.enum.includes(data)) {
|
|
38
|
-
errors.push({ path, message: `Value must be one of: ${schema.enum.join(", ")}`, keyword: "enum" });
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (typeof data === "number") {
|
|
43
|
-
if (typeof schema.minimum === "number" && data < schema.minimum) {
|
|
44
|
-
errors.push({ path, message: `Value ${data} is below minimum ${schema.minimum}`, keyword: "minimum" });
|
|
45
|
-
}
|
|
46
|
-
if (typeof schema.maximum === "number" && data > schema.maximum) {
|
|
47
|
-
errors.push({ path, message: `Value ${data} exceeds maximum ${schema.maximum}`, keyword: "maximum" });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
if (typeof data === "string") {
|
|
52
|
-
if (typeof schema.minLength === "number" && data.length < schema.minLength) {
|
|
53
|
-
errors.push({ path, message: `String length ${data.length} is below minLength ${schema.minLength}`, keyword: "minLength" });
|
|
54
|
-
}
|
|
55
|
-
if (typeof schema.maxLength === "number" && data.length > schema.maxLength) {
|
|
56
|
-
errors.push({ path, message: `String length ${data.length} exceeds maxLength ${schema.maxLength}`, keyword: "maxLength" });
|
|
57
|
-
}
|
|
58
|
-
if (schema.pattern) {
|
|
59
|
-
const re = new RegExp(schema.pattern as string);
|
|
60
|
-
if (!re.test(data)) {
|
|
61
|
-
errors.push({ path, message: `String does not match pattern "${schema.pattern}"`, keyword: "pattern" });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (Array.isArray(data) && schema.type === "array") {
|
|
67
|
-
if (typeof schema.minItems === "number" && data.length < (schema.minItems as number)) {
|
|
68
|
-
errors.push({ path, message: `Array has ${data.length} items, minimum is ${schema.minItems}`, keyword: "minItems" });
|
|
69
|
-
}
|
|
70
|
-
if (typeof schema.maxItems === "number" && data.length > (schema.maxItems as number)) {
|
|
71
|
-
errors.push({ path, message: `Array has ${data.length} items, maximum is ${schema.maxItems}`, keyword: "maxItems" });
|
|
72
|
-
}
|
|
73
|
-
if (schema.items && typeof schema.items === "object") {
|
|
74
|
-
for (let i = 0; i < data.length; i++) {
|
|
75
|
-
errors.push(...validate(data[i], schema.items as Record<string, unknown>, `${path}[${i}]`, strict));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (data !== null && typeof data === "object" && !Array.isArray(data) && schema.type === "object") {
|
|
81
|
-
const obj = data as Record<string, unknown>;
|
|
82
|
-
const props = (schema.properties || {}) as Record<string, Record<string, unknown>>;
|
|
83
|
-
const required = (schema.required || []) as string[];
|
|
84
|
-
|
|
85
|
-
for (const key of required) {
|
|
86
|
-
if (!(key in obj)) {
|
|
87
|
-
errors.push({ path: `${path}.${key}`, message: `Required property "${key}" is missing`, keyword: "required" });
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
92
|
-
if (props[key]) {
|
|
93
|
-
errors.push(...validate(value, props[key], `${path}.${key}`, strict));
|
|
94
|
-
} else if (strict && schema.additionalProperties === false) {
|
|
95
|
-
errors.push({ path: `${path}.${key}`, message: `Additional property "${key}" is not allowed`, keyword: "additionalProperties" });
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
return errors;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export async function express(input: ValidatorInput): Promise<ValidatorOutput> {
|
|
104
|
-
const { data, schema, strict = false } = input;
|
|
105
|
-
|
|
106
|
-
if (!schema || typeof schema !== "object") {
|
|
107
|
-
return { valid: false, errors: [{ path: "$", message: "Invalid schema provided", keyword: "schema" }], errorCount: 1 };
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const errors = validate(data, schema, "$", strict);
|
|
111
|
-
return { valid: errors.length === 0, errors, errorCount: errors.length };
|
|
112
|
-
}
|