{"_id":"@cognitive-swarm/templates","name":"@cognitive-swarm/templates","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@cognitive-swarm/templates","version":"0.2.0","description":"Prebuilt swarm templates — code review, research, decision, debug","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc","test":"vitest run","test:watch":"vitest","lint":"eslint src/","clean":"rm -rf dist"},"dependencies":{"@cognitive-swarm/core":"*","@cognitive-engine/core":"^0.2.0"},"license":"Apache-2.0","author":{"name":"Dmitry Zorin"},"repository":{"type":"git","url":"git+https://github.com/medonomator/cognitive-swarm.git","directory":"packages/templates"},"publishConfig":{"access":"public"},"homepage":"https://medonomator.github.io/cognitive-swarm/","bugs":{"url":"https://github.com/medonomator/cognitive-swarm/issues"},"gitHead":"8613f7b139c03719ef14fe9f2c01bdc1c5532a26","_id":"@cognitive-swarm/templates@0.2.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-lZNqkkvrxQs+2bejl0BNxA7gQnRURRi1EAdRSUxPpzkwGRX/DjWbEvMnKF65+fZNvUYfnHFL0zx+Q5E/+oPFXQ==","shasum":"fac40928a91b782ccfbfbf45c4a9a40723cd6910","tarball":"https://registry.npmjs.org/@cognitive-swarm/templates/-/templates-0.2.0.tgz","fileCount":26,"unpackedSize":34069,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5lEkHBdTgw/SvLlKUNdm/wxeVSXWMzKHsmb28CFBJswIgdklF+UMg6ORnV7LCjL74L+qKdlasZCqx0YvQiD8YdYI="}]},"_npmUser":{"name":"medonomator","email":"budteschastlivi1@gmail.com"},"directories":{},"maintainers":[{"name":"medonomator","email":"budteschastlivi1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/templates_0.2.0_1776497170308_0.948476465321537"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-18T07:26:10.151Z","0.2.0":"2026-04-18T07:26:10.471Z","modified":"2026-04-18T07:26:10.702Z"},"maintainers":[{"name":"medonomator","email":"budteschastlivi1@gmail.com"}],"description":"Prebuilt swarm templates — code review, research, decision, debug","homepage":"https://medonomator.github.io/cognitive-swarm/","repository":{"type":"git","url":"git+https://github.com/medonomator/cognitive-swarm.git","directory":"packages/templates"},"author":{"name":"Dmitry Zorin"},"bugs":{"url":"https://github.com/medonomator/cognitive-swarm/issues"},"license":"Apache-2.0","readme":"# @cognitive-swarm/templates\n\nPrebuilt swarm templates -- code review, research, decision-making, and debugging.\n\n## Installation\n\n```bash\nnpm install @cognitive-swarm/templates\n```\n\n## Overview\n\nReady-to-use swarm configurations for common workflows. Each template factory returns a fully configured swarm definition with agents, personalities, and coordination rules. Use the `agentDef` helper and `PERSONALITIES` presets to build custom templates.\n\n## Usage\n\n```ts\nimport {\n  codeReviewTemplate,\n  researchTemplate,\n  decisionTemplate,\n  debugTemplate,\n  agentDef,\n  PERSONALITIES,\n} from '@cognitive-swarm/templates';\n\n// Create a code review swarm\nconst reviewSwarm = codeReviewTemplate({ provider, model });\n\n// Create a research swarm\nconst researchSwarm = researchTemplate({ provider, model });\n\n// Create a decision-making swarm\nconst decisionSwarm = decisionTemplate({ provider, model });\n\n// Create a debugging swarm\nconst debugSwarm = debugTemplate({ provider, model });\n\n// Build a custom agent definition\nconst custom = agentDef({\n  name: 'Custom Agent',\n  personality: PERSONALITIES.analytical,\n  // ...\n});\n```\n\n## Exports\n\n| Export               | Kind     | Description                              |\n| -------------------- | -------- | ---------------------------------------- |\n| `codeReviewTemplate` | Function | Code review swarm factory                |\n| `researchTemplate`   | Function | Research swarm factory                   |\n| `decisionTemplate`   | Function | Decision-making swarm factory            |\n| `debugTemplate`      | Function | Debugging swarm factory                  |\n| `agentDef`           | Function | Helper to define a single agent          |\n| `PERSONALITIES`      | Object   | Preset personality configurations        |\n| `TemplateProviders`  | Type     | Provider config passed to templates      |\n| `PersonalityPreset`  | Type     | Shape of a personality preset            |\n| `AgentDefOptions`    | Type     | Options for `agentDef`                   |\n\n## Links\n\n- [Root repository](https://github.com/medonomator/cognitive-swarm)\n","readmeFilename":"README.md","_rev":"1-35d7925475c9c71d9938cedd4f67c772"}