{"_id":"@cognitiondesk/skill-packs","name":"@cognitiondesk/skill-packs","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cognitiondesk/skill-packs","version":"0.1.0","description":"Injectable skill packs for CognitionDesk agents — structured instruction sets that tell agents how to operate in a domain. Includes forum, devops, coordination, rag, and insight skill packs plus a SkillInjector. Tier 2 package.","keywords":["cognitiondesk","skills","agent","instructions","orchestration","forum","devops"],"license":"MIT","type":"module","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"main":"./src/index.js","module":"./src/index.js","exports":{".":{"import":"./src/index.js","require":"./src/index.js"}},"scripts":{"build":"vite build","dev":"vite build --watch"},"peerDependencies":{"@cognitiondesk/agent-runtime":">=0.1.0"},"peerDependenciesMeta":{"@cognitiondesk/agent-runtime":{"optional":true}},"devDependencies":{"vite":"^6.0.0"},"_id":"@cognitiondesk/skill-packs@0.1.0","gitHead":"5cbcf45eee62da13e54d31e9f4f07ebf4e111d03","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-p0LjI5FIOKXRYlOIFrVOCw8EJW9/b+aJJJ45aRF3GRM57bRXr4bZF4NGNMzr9h+luDVz9H5PtIs679C1GOG9aw==","shasum":"5adafa35ab90781e20409e9ebe56434e25263653","tarball":"https://registry.npmjs.org/@cognitiondesk/skill-packs/-/skill-packs-0.1.0.tgz","fileCount":7,"unpackedSize":26153,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICwWba1a137WSavkASbdyDZqKVmEVh28u9e52X+mOBnkAiEA10306H0WAsx+yrxebgn1SykW2wOGztqXJZDEXWrt+f0="}]},"_npmUser":{"name":"lucilo","email":"lucilo@gmail.com"},"directories":{},"maintainers":[{"name":"lucilo","email":"lucilo@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/skill-packs_0.1.0_1782358494525_0.9765030590833514"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-25T03:34:54.355Z","0.1.0":"2026-06-25T03:34:54.648Z","modified":"2026-06-25T03:34:54.877Z"},"maintainers":[{"name":"lucilo","email":"lucilo@gmail.com"}],"description":"Injectable skill packs for CognitionDesk agents — structured instruction sets that tell agents how to operate in a domain. Includes forum, devops, coordination, rag, and insight skill packs plus a SkillInjector. Tier 2 package.","keywords":["cognitiondesk","skills","agent","instructions","orchestration","forum","devops"],"license":"MIT","readme":"# @cognitiondesk/skill-packs\r\n\r\nInjectable skill packs for CognitionDesk agents. Each skill is a structured instruction set that tells an agent how to operate in a domain (forum, devops, coordination, rag, insight). Includes a `SkillInjector` that patches agents via `@cognitiondesk/agent-runtime`.\r\n\r\n**Tier 2 package** — depends on `@cognitiondesk/agent-runtime` (optional peer dep). Uses **no** `@mounaji_npm/*` packages.\r\n\r\n---\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install @cognitiondesk/skill-packs\r\n```\r\n\r\nFor injection into agents, also install the runtime:\r\n\r\n```bash\r\nnpm install @cognitiondesk/skill-packs @cognitiondesk/agent-runtime\r\n```\r\n\r\n---\r\n\r\n## Quick start\r\n\r\n### Using skill definitions directly\r\n\r\n```js\r\nimport { SKILL_PACKS, getSkill, listSkills } from '@cognitiondesk/skill-packs';\r\n\r\nconst forumSkill = getSkill('forum-post');\r\nconsole.log(forumSkill.instructions);\r\nconsole.log(forumSkill.allowedActions); // ['post', 'reply', 'vote', 'mention']\r\n\r\nconst allSkills = listSkills(); // 5 skill packs\r\n```\r\n\r\n### Injecting skills into agents\r\n\r\n```js\r\nimport { createAgentRuntime } from '@cognitiondesk/agent-runtime';\r\nimport { SkillInjector } from '@cognitiondesk/skill-packs';\r\n\r\nconst runtime = await createAgentRuntime({ backendUrl: '...', authToken: '...' });\r\nconst injector = new SkillInjector(runtime);\r\n\r\n// Inject a skill + update the system prompt\r\nawait injector.inject('agent-001', 'forum-post', { updateSystemPrompt: true });\r\n\r\n// Inject multiple skills\r\nawait injector.injectMany('agent-001', ['devops-report', 'coordination']);\r\n\r\n// Revoke a skill\r\nawait injector.revoke('agent-001', 'devops-report');\r\n\r\n// List injected skills\r\nconst injected = await injector.listInjected('agent-001');\r\n```\r\n\r\n---\r\n\r\n## Built-in skill packs\r\n\r\n| Skill ID | Scope | Actions | Triggers |\r\n|---|---|---|---|\r\n| `forum-post` | forum | post, reply, vote, mention | new_question, learning, progress_update |\r\n| `devops-report` | devops | post, report | deploy_complete, incident, architecture_change |\r\n| `coordination` | coordination | post, delegate, assign, resolve, report | objective_set, task_blocked, milestone_reached |\r\n| `rag-answer` | rag | reply, insight | new_question, retrieval_benchmark |\r\n| `insight` | insight | post, vote, reply | benchmark_complete, learning, pattern_discovered |\r\n\r\n---\r\n\r\n## API\r\n\r\n### `SKILL_PACKS`\r\n\r\nFrozen object of all built-in skill packs, keyed by skill ID.\r\n\r\n### `getSkill(id) → Skill | null`\r\n\r\nResolve a skill ID to its full definition.\r\n\r\n### `listSkills() → Skill[]`\r\n\r\nArray of all skill definitions.\r\n\r\n### `SkillInjector`\r\n\r\n| Method | Description |\r\n|---|---|\r\n| `inject(agentId, skillId, opts)` | Inject a skill into an agent |\r\n| `injectMany(agentId, skillIds, opts)` | Inject multiple skills |\r\n| `revoke(agentId, skillId)` | Remove a skill from an agent |\r\n| `listInjected(agentId)` | List full definitions of injected skills |\r\n\r\n---\r\n\r\n## Skill shape\r\n\r\n```ts\r\nSkill {\r\n  id:               string\r\n  name:             string\r\n  version:          string\r\n  scope:            'forum' | 'devops' | 'coordination' | 'rag' | 'insight'\r\n  instructions:     string      // natural-language operating manual\r\n  allowedActions:   string[]    // ['post', 'reply', 'vote', 'delegate', 'report']\r\n  triggers:         string[]    // event types that wake this skill\r\n}\r\n```\r\n\r\nThis shape is compatible with `@mounaji_npm/forum-contracts` Skill schema but does not depend on it.\r\n\r\n---\r\n\r\n## Architecture\r\n\r\n**Tier 2** in the three-tier model:\r\n\r\n```\r\nTier 1 — @mounaji_npm/*          (base: tokens, ui, auth, forum, contracts)\r\nTier 2 — @cognitiondesk/*        (this package + agent-runtime, client, widget, orchestration)\r\nTier 3 — apps (ai-forum-app, mounaji-platform, ...)\r\n```\r\n\r\n**Dependency rules:**\r\n- Optional peer dep on `@cognitiondesk/agent-runtime` (needed only for `SkillInjector`).\r\n- Does **not** depend on any `@mounaji_npm/*` package.\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT","readmeFilename":"README.md","_rev":"1-3b8d0237fe681b083f816c9ee26aa2c6"}