{"_id":"@bernierllc/work-item-core","_rev":"7-bfaac9a1362de6e6f224bbcd284a701e","name":"@bernierllc/work-item-core","dist-tags":{"latest":"0.5.0"},"versions":{"0.1.0":{"name":"@bernierllc/work-item-core","version":"0.1.0","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/work-item-core@0.1.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"4e090f77ea5f2a34bcb0a79158730bb599028a26","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.1.0.tgz","fileCount":32,"integrity":"sha512-bkOTAqfVmI0l9tHfvow3xBJS225Udxyf6W14ySUwR3TUK0/kgteWm7eQLA07COmzEQxfUyYtzuYEwKrM51q8BA==","signatures":[{"sig":"MEUCIE20zAReaH+wt/KrPxNb9walGJNVNnwI9weJZJSuSNDrAiEA/TmUOl9m8RGB9hr298lEQZPmGzWjf/VqQyKdgnMTgDU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":221018},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a6ea1e5b27d01dcc5ae707ecbf304507ab0fc8e2","scripts":{"lint":"eslint src/**/*.ts tests/**/*.ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.4.2","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","directories":{},"_nodeVersion":"24.4.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/work-item-core_0.1.0_1761601469437_0.7563416012744058","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bernierllc/work-item-core","version":"0.1.2","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/work-item-core@0.1.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"2443c6277dfc240c4f6d5488572158931d6a830b","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.1.2.tgz","fileCount":33,"integrity":"sha512-2ztnnNBtDs7+mK5L65eOBHb+71gzblKcKSdcPKVUJJBeqTSnVKf0Nf9VLPATD51IgiS9uyaaGF+N89uaBZjBVQ==","signatures":[{"sig":"MEYCIQCjvI1xGnzwA7XPmiLCfsVSfQUVbQLljKnL5KxIQMWbPwIhALba2LQJy4pPKOTZclhg3qBMFFzZNeb2ZE8iuHmvPC/Z","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":273389},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"lint":"eslint src/**/*.ts tests/**/*.ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be0fbbff-e7d9-4b91-8ab0-14c3883a4a65"}},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","directories":{},"_nodeVersion":"20.19.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/work-item-core_0.1.2_1767642338058_0.6511483831356835","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bernierllc/work-item-core","version":"0.1.3","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/work-item-core@0.1.3","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"1b7baa1a9030d887a37d407d974deee2dcfd8906","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.1.3.tgz","fileCount":33,"integrity":"sha512-axjIH+drt2Eimz6g2fPypVRKnPt8XzQ9CuANW4HtLp7RTiwID9jeCsysuuelXzdM+34hl7SSm+PNVj7zrEFpKw==","signatures":[{"sig":"MEUCIHhyxj2Dvip23j8xirhY/3pPqnsR3XC/FjPbgof8sk0ZAiEArABbM4vPYj9YqiJWBbW8uG9PtFTJa7+sFeFn6Zf8xno=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":273542},"main":"dist/index.js","_from":"file:bernierllc-work-item-core-0.1.3.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src/**/*.ts tests/**/*.ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be0fbbff-e7d9-4b91-8ab0-14c3883a4a65"}},"_resolved":"/tmp/3ed70aff23c7f2e4f855e1527f71ffcd/bernierllc-work-item-core-0.1.3.tgz","_integrity":"sha512-axjIH+drt2Eimz6g2fPypVRKnPt8XzQ9CuANW4HtLp7RTiwID9jeCsysuuelXzdM+34hl7SSm+PNVj7zrEFpKw==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.11.0","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/work-item-core_0.1.3_1773078092953_0.3521021576483516","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bernierllc/work-item-core","version":"0.1.4","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/work-item-core@0.1.4","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"6b5fd6c710804b60042e546348f9370bca23e517","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.1.4.tgz","fileCount":33,"integrity":"sha512-5uzxT9eF+v4NqeUZZQ8GpQPWMtD41M7K8kyYf/gGfZkfKeRgVDP66ZVRdAsgdPTRR5gwKxE78IifdkD3G/uZ3A==","signatures":[{"sig":"MEYCIQCgNKcUPz9oTtdx0fQXkhVvN4023UfeFAby9wQrH3v5cwIhAOrJqA8QOwQcgXD0zQ5jTHTgD5KJ4vDxyNr80zXAN62C","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":273753},"main":"dist/index.js","_from":"file:bernierllc-work-item-core-0.1.4.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src/**/*.ts tests/**/*.ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be0fbbff-e7d9-4b91-8ab0-14c3883a4a65"}},"_resolved":"/home/runner/work/tools/tools/packages/core/work-item-core/bernierllc-work-item-core-0.1.4.tgz","_integrity":"sha512-5uzxT9eF+v4NqeUZZQ8GpQPWMtD41M7K8kyYf/gGfZkfKeRgVDP66ZVRdAsgdPTRR5gwKxE78IifdkD3G/uZ3A==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.11.0","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/work-item-core_0.1.4_1773163366738_0.9128057395327824","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bernierllc/work-item-core","version":"0.2.0","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/work-item-core@0.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"95543a2b84d8b085b39464dc94d15d656f4ce28a","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.2.0.tgz","fileCount":33,"integrity":"sha512-VWb+B/lxasVkfvlj33Pp+DHbW5SHnwUGGhTvF/NbxyUtOedVZt5WhC9IJPzu3o5WPT9ojJb5vdDX3KoT2LDhaA==","signatures":[{"sig":"MEUCIGJZdXf+f4ROCFGshKbWDo13aqIkRVmI7DMXnmS2DgmMAiEAu7rVDssLOmuKdOJNnqjuM51ciKSqRmPWIEfpt6te61c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":273952},"main":"dist/index.js","_from":"file:bernierllc-work-item-core-0.2.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src/**/*.ts tests/**/*.ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be0fbbff-e7d9-4b91-8ab0-14c3883a4a65"}},"_resolved":"/home/runner/work/tools/tools/packages/core/work-item-core/bernierllc-work-item-core-0.2.0.tgz","_integrity":"sha512-VWb+B/lxasVkfvlj33Pp+DHbW5SHnwUGGhTvF/NbxyUtOedVZt5WhC9IJPzu3o5WPT9ojJb5vdDX3KoT2LDhaA==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/work-item-core_0.2.0_1779241496768_0.4619175743885042","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bernierllc/work-item-core","version":"0.4.0","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/work-item-core@0.4.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"1eb9ce8139691f24dab7cfb7385bff0021abb197","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.4.0.tgz","fileCount":30,"integrity":"sha512-ZI3l+KKqjzWR3Aqbt9MzErr3h/3tJwarugeXaS5062M7Uz2GPwIiXN9Soj1olNMdx6wEPEuusC4LYs8/f5wwsQ==","signatures":[{"sig":"MEUCIQDZfRw43XZVaFRSu4+YMSKm35iOIzwh1hhbdDkKF4v3ogIgKE+3VWIAGkql7+kSKQgPU60M0FFWbkV9ZCTuyMP0/fA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":159440},"main":"dist/index.js","_from":"file:bernierllc-work-item-core-0.4.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src/**/*.ts tests/**/*.ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be0fbbff-e7d9-4b91-8ab0-14c3883a4a65"}},"_resolved":"/home/runner/work/tools/tools/packages/core/work-item-core/bernierllc-work-item-core-0.4.0.tgz","_integrity":"sha512-ZI3l+KKqjzWR3Aqbt9MzErr3h/3tJwarugeXaS5062M7Uz2GPwIiXN9Soj1olNMdx6wEPEuusC4LYs8/f5wwsQ==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.40.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/work-item-core_0.4.0_1779243367032_0.3240040067667631","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@bernierllc/work-item-core","version":"0.5.0","description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","main":"dist/index.js","types":"dist/index.d.ts","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"author":{"name":"Bernier LLC"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.40.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","test":"jest --watch","test:run":"jest","test:coverage":"jest --coverage","lint":"eslint src/**/*.ts tests/**/*.ts","clean":"rm -rf dist"},"_id":"@bernierllc/work-item-core@0.5.0","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"homepage":"https://github.com/bernier-llc/tools#readme","_integrity":"sha512-xFWKYP1piyZ8uT/JoMNqLBf6Hcpq6TCgs43bjJaHLGgnT0rQRK8Mm//5qHYE1rM4xGagSgUzOjfmkYlW2z6pWw==","_resolved":"/home/runner/work/tools/tools/packages/core/work-item-core/bernierllc-work-item-core-0.5.0.tgz","_from":"file:bernierllc-work-item-core-0.5.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-xFWKYP1piyZ8uT/JoMNqLBf6Hcpq6TCgs43bjJaHLGgnT0rQRK8Mm//5qHYE1rM4xGagSgUzOjfmkYlW2z6pWw==","shasum":"07bda8d2b1da0494498a0b236a26f1b287ff1702","tarball":"https://registry.npmjs.org/@bernierllc/work-item-core/-/work-item-core-0.5.0.tgz","fileCount":30,"unpackedSize":159440,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCnaoBcgIpea47bCfnATu+1ZrSrqnoMZ5XHxFppiknyIgIgdtc0GePZq5+57tShRj4ej9NxQlQD++VVBAW+XN4dn5s="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:be0fbbff-e7d9-4b91-8ab0-14c3883a4a65"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/work-item-core_0.5.0_1779250243566_0.1918947103159343"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-27T21:44:29.373Z","modified":"2026-05-20T04:10:43.893Z","0.1.0":"2025-10-27T21:44:29.715Z","0.1.2":"2026-01-05T19:45:38.201Z","0.1.3":"2026-03-09T17:41:33.139Z","0.1.4":"2026-03-10T17:22:46.875Z","0.2.0":"2026-05-20T01:44:56.918Z","0.4.0":"2026-05-20T02:16:07.228Z","0.5.0":"2026-05-20T04:10:43.764Z"},"bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"author":{"name":"Bernier LLC"},"license":"MIT","homepage":"https://github.com/bernier-llc/tools#readme","keywords":["work-item","task-management","planning","dependency-tracking","maturity-levels","hierarchy","state-machine"],"repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"description":"Universal work item management with configurable types, statuses, maturity levels, dependency tracking, and hierarchical relationships","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/work-item-core\n\nA comprehensive TypeScript library for managing work items with hierarchical relationships, dependency tracking, maturity progression, and status management.\n\n## Installation\n\n```bash\nnpm install @bernierllc/work-item-core\n```\n\n## Features\n\n- **Complete CRUD Operations** - Create, read, update, delete work items\n- **Hierarchical Relationships** - Parent/child relationships with tree traversal\n- **Dependency Management** - Track dependencies with circular detection (DFS algorithm)\n- **Blocking Detection** - Identify blocking items using BFS-style traversal\n- **Maturity Progression** - State machine for work item maturity levels\n- **Status Management** - Track work item status through lifecycle\n- **Assignment Management** - Assign work items to team members or agents\n- **Readiness Checks** - Determine if work items are ready to start\n- **Query & Filtering** - Powerful filtering, sorting, and pagination\n- **Batch Operations** - Efficient bulk create and update operations\n- **Statistics & Reporting** - Comprehensive project analytics\n- **Storage Abstraction** - Pluggable storage backend (memory included for testing)\n\n## Quick Start\n\n```typescript\nimport { WorkItemManager, MemoryWorkItemStorage } from '@bernierllc/work-item-core';\n\n// Initialize with in-memory storage\nconst storage = new MemoryWorkItemStorage();\nconst manager = new WorkItemManager(storage);\n\n// Create a work item\nconst result = await manager.create({\n  project_id: 'proj_123',\n  title: 'Implement user authentication',\n  work_type_id: 'type_feature',\n  maturity_level_id: 'maturity_planned',\n  status_id: 'status_open',\n  priority: 8\n});\n\nif (result.success) {\n  console.log('Created work item:', result.data);\n}\n```\n\n## Core Concepts\n\n### Work Item\n\nA work item represents a unit of work in a project. Each work item has:\n\n- **Identity**: `id`, `project_id`, `title`, `description`\n- **Classification**: `work_type_id` (feature, bug, refactor, documentation, chore)\n- **Maturity**: `maturity_level_id` (idea → discovery → planned → ready → active → complete)\n- **Status**: `status_id` (open, blocked, in-progress, in-review, done, cancelled)\n- **Priority**: `priority` (1-10, higher = more important)\n- **Relationships**: `parent_work_item_id`, `depends_on_work_item_ids`\n- **Assignment**: `assigned_to` (team member or agent identifier)\n- **Metadata**: `created_at`, `updated_at`, `created_from_session_id`\n\n### Maturity Levels\n\nWork items progress through maturity levels:\n\n1. **idea** - Initial concept\n2. **discovery** - Research and investigation\n3. **planned** - Defined and estimated\n4. **ready** - Ready to start work\n5. **active** - Work in progress\n6. **complete** - Finished and verified\n\n### Work Types\n\n- **feature** - New functionality\n- **bug** - Defect or issue\n- **refactor** - Code improvement\n- **documentation** - Documentation work\n- **chore** - Maintenance tasks\n\n### Statuses\n\n- **open** - Not yet started\n- **blocked** - Cannot proceed (waiting on dependencies)\n- **in-progress** - Actively being worked on\n- **in-review** - Under review\n- **done** - Completed successfully\n- **cancelled** - Work abandoned\n\n## Usage Examples\n\n### Creating Work Items\n\n```typescript\n// Create a simple work item\nconst result = await manager.create({\n  project_id: 'proj_123',\n  title: 'Add login form',\n  work_type_id: 'type_feature',\n  maturity_level_id: 'maturity_planned',\n  status_id: 'status_open',\n  priority: 5\n});\n\n// Create with dependencies\nconst dependent = await manager.create({\n  project_id: 'proj_123',\n  title: 'Add logout button',\n  depends_on_work_item_ids: [result.data!.id],\n  priority: 3\n});\n\n// Create batch\nconst batch = await manager.createBatch([\n  { project_id: 'proj_123', title: 'Task 1', priority: 5 },\n  { project_id: 'proj_123', title: 'Task 2', priority: 4 },\n  { project_id: 'proj_123', title: 'Task 3', priority: 3 }\n]);\n```\n\n### Hierarchical Relationships\n\n```typescript\n// Create parent work item\nconst epic = await manager.create({\n  project_id: 'proj_123',\n  title: 'User Management Epic',\n  work_type_id: 'type_feature',\n  priority: 10\n});\n\n// Create child work items\nconst story1 = await manager.create({\n  project_id: 'proj_123',\n  title: 'User login',\n  parent_work_item_id: epic.data!.id,\n  priority: 8\n});\n\nconst story2 = await manager.create({\n  project_id: 'proj_123',\n  title: 'User registration',\n  parent_work_item_id: epic.data!.id,\n  priority: 7\n});\n\n// Get all children\nconst children = await manager.getChildren(epic.data!.id, false); // Direct children only\nconst allDescendants = await manager.getChildren(epic.data!.id, true); // Recursive\n\n// Get ancestors\nconst ancestors = await manager.getAncestors(story1.data!.id);\n\n// Move work item to different parent\nawait manager.move(story1.data!.id, 'other_epic_id');\n```\n\n### Dependency Management\n\n```typescript\n// Add dependency\nawait manager.addDependency('work_item_1', 'work_item_2'); // 1 depends on 2\n\n// Remove dependency\nawait manager.removeDependency('work_item_1', 'work_item_2');\n\n// Get dependencies\nconst deps = await manager.getDependencies('work_item_1', false); // Direct only\nconst allDeps = await manager.getDependencies('work_item_1', true); // Transitive\n\n// Get blocked items (items waiting for this one)\nconst blockedItems = await manager.getBlockedItems('work_item_1');\n\n// Check for circular dependencies\nconst circularCheck = await manager.checkCircularDependencies(\n  'work_item_1',\n  'work_item_2'\n);\n\nif (!circularCheck.valid) {\n  console.log('Circular dependency detected:', circularCheck.cycle);\n}\n\n// Validate all dependencies\nconst validation = await manager.validateDependencies('work_item_1');\nif (!validation.valid) {\n  console.log('Invalid dependencies:', validation.missing_dependencies);\n}\n```\n\n### Status Management\n\n```typescript\n// Update status\nawait manager.updateStatus('work_item_1', 'status_in_progress');\n\n// Status transitions are validated\nconst result = await manager.updateStatus('work_item_1', 'status_done');\nif (!result.success) {\n  console.log('Status update failed:', result.error);\n}\n```\n\n### Maturity Progression\n\n```typescript\n// Promote to next maturity level\nconst promoted = await manager.promoteMaturity('work_item_1');\n\nif (!promoted.success) {\n  console.log('Cannot promote:', promoted.error);\n}\n\n// Promote to specific level\nawait manager.promoteMaturity('work_item_1', 'maturity_ready');\n\n// Check if promotion is allowed\nconst canPromote = await manager.canPromote('work_item_1', 'maturity_active');\nif (!canPromote.valid) {\n  console.log('Cannot promote:', canPromote.reason);\n}\n```\n\n### Assignment Management\n\n```typescript\n// Assign to team member\nawait manager.assign('work_item_1', 'user:john@example.com');\n\n// Assign to agent\nawait manager.assign('work_item_1', 'agent:claude');\n\n// Unassign\nawait manager.unassign('work_item_1');\n\n// Get all assigned items for a person\nconst assigned = await manager.getAssignedItems('user:john@example.com', {\n  status_ids: ['status_in_progress']\n});\n```\n\n### Readiness Checks\n\n```typescript\n// Check if work item is ready to start\nconst readiness = await manager.isReadyToStart('work_item_1');\n\nif (readiness.ready) {\n  console.log('Ready to start!');\n} else {\n  console.log('Blocking reasons:', readiness.blocking_reasons);\n}\n```\n\n### Querying Work Items\n\n```typescript\n// Query with filters\nconst results = await manager.query(\n  {\n    project_id: 'proj_123',\n    work_type_ids: ['type_feature', 'type_bug'],\n    maturity_level_ids: ['maturity_ready', 'maturity_active'],\n    status_ids: ['status_open', 'status_in_progress'],\n    priority_min: 5,\n    priority_max: 10,\n    blocks_project: true,\n    assigned_to: 'user:john@example.com',\n    has_dependencies: false,\n    is_blocked: false\n  },\n  {\n    sort_by: 'priority',\n    sort_order: 'desc',\n    limit: 20,\n    offset: 0\n  }\n);\n\n// Get unassigned high-priority items\nconst unassigned = await manager.query({\n  project_id: 'proj_123',\n  assigned_to: null,\n  priority_min: 8\n});\n\n// Get root items (no parent)\nconst rootItems = await manager.query({\n  project_id: 'proj_123',\n  parent_work_item_id: null\n});\n```\n\n### Statistics & Reporting\n\n```typescript\n// Get project statistics\nconst stats = await manager.getStatistics('proj_123');\n\nconsole.log('Total items:', stats.total_count);\nconsole.log('By work type:', stats.by_work_type);\nconsole.log('By maturity:', stats.by_maturity_level);\nconsole.log('By status:', stats.by_status);\nconsole.log('By priority:', stats.by_priority);\nconsole.log('Assigned:', stats.assigned_count);\nconsole.log('Unassigned:', stats.unassigned_count);\nconsole.log('Ready to start:', stats.ready_count);\nconsole.log('Blocked:', stats.blocked_count);\n\n// Get dependency graph\nconst graph = await manager.getDependencyGraph({\n  project_id: 'proj_123'\n});\n\nconsole.log('Nodes:', graph.nodes.length);\nconsole.log('Edges:', graph.edges.length);\n```\n\n### Batch Operations\n\n```typescript\n// Create multiple items efficiently\nconst created = await manager.createBatch([\n  {\n    project_id: 'proj_123',\n    title: 'Feature 1',\n    priority: 8\n  },\n  {\n    project_id: 'proj_123',\n    title: 'Feature 2',\n    priority: 7\n  }\n]);\n\n// Update multiple items\nconst updated = await manager.updateBatch([\n  {\n    id: 'item_1',\n    updates: { priority: 10, assigned_to: 'user:jane@example.com' }\n  },\n  {\n    id: 'item_2',\n    updates: { status_id: 'status_in_progress' }\n  }\n]);\n\nconsole.log(`Created ${created.successful.length} items`);\nconsole.log(`Updated ${updated.successful.length} items`);\nif (created.failed.length > 0) {\n  console.log('Failures:', created.failed);\n}\n```\n\n## Custom Storage Backend\n\nImplement the `WorkItemStorage` interface for your database:\n\n```typescript\nimport { WorkItemStorage, WorkItem } from '@bernierllc/work-item-core';\n\nclass PostgresWorkItemStorage implements WorkItemStorage {\n  async saveWorkItem(workItem: WorkItem): Promise<void> {\n    // Save to PostgreSQL\n  }\n\n  async getWorkItem(id: string): Promise<WorkItem | null> {\n    // Retrieve from PostgreSQL\n  }\n\n  async deleteWorkItem(id: string): Promise<void> {\n    // Delete from PostgreSQL\n  }\n\n  async queryWorkItems(\n    filters: WorkItemFilters,\n    options?: WorkItemQueryOptions\n  ): Promise<WorkItem[]> {\n    // Query PostgreSQL with filters\n  }\n\n  // Implement remaining methods...\n}\n\n// Use custom storage\nconst storage = new PostgresWorkItemStorage();\nconst manager = new WorkItemManager(storage);\n```\n\n## API Reference\n\n### WorkItemManager\n\n#### Constructor\n\n```typescript\nconstructor(\n  storage: WorkItemStorage,\n  config?: {\n    maturityLevels?: MaturityLevel[];\n    statuses?: WorkItemStatus[];\n    workTypes?: WorkType[];\n  }\n)\n```\n\n#### CRUD Operations\n\n- `create(input: CreateWorkItemInput): Promise<WorkItemResult<WorkItem>>`\n- `get(workItemId: string, include_details?: boolean): Promise<WorkItemResult<WorkItem>>`\n- `update(workItemId: string, updates: UpdateWorkItemInput): Promise<WorkItemResult<WorkItem>>`\n- `delete(workItemId: string): Promise<WorkItemResult<void>>`\n- `exists(workItemId: string): Promise<boolean>`\n- `query(filters: WorkItemFilters, options?: WorkItemQueryOptions): Promise<WorkItem[]>`\n\n#### Hierarchy Management\n\n- `getChildren(workItemId: string, recursive?: boolean): Promise<WorkItem[]>`\n- `getAncestors(workItemId: string): Promise<WorkItem[]>`\n- `move(workItemId: string, newParentId: string | null): Promise<WorkItemResult<WorkItem>>`\n\n#### Dependency Management\n\n- `addDependency(workItemId: string, dependsOnId: string): Promise<WorkItemResult<WorkItem>>`\n- `removeDependency(workItemId: string, dependsOnId: string): Promise<WorkItemResult<WorkItem>>`\n- `getDependencies(workItemId: string, recursive?: boolean): Promise<WorkItem[]>`\n- `getBlockedItems(workItemId: string): Promise<WorkItem[]>`\n- `checkCircularDependencies(workItemId: string, dependsOnId: string): Promise<DependencyValidationResult>`\n- `validateDependencies(workItemId: string): Promise<DependencyValidationResult>`\n\n#### Status & Maturity\n\n- `updateStatus(workItemId: string, statusId: string): Promise<WorkItemResult<WorkItem>>`\n- `promoteMaturity(workItemId: string, maturityId?: string): Promise<WorkItemResult<WorkItem>>`\n- `canPromote(workItemId: string, maturityId: string): Promise<ValidationResult>`\n\n#### Assignment\n\n- `assign(workItemId: string, assignee: string): Promise<WorkItemResult<WorkItem>>`\n- `unassign(workItemId: string): Promise<WorkItemResult<WorkItem>>`\n- `getAssignedItems(assignee: string, filters?: WorkItemFilters): Promise<WorkItem[]>`\n\n#### Readiness & Validation\n\n- `isReadyToStart(workItemId: string): Promise<ReadinessResult>`\n- `validate(workItem: WorkItem | CreateWorkItemInput): Promise<ValidationResult>`\n\n#### Batch Operations\n\n- `createBatch(inputs: CreateWorkItemInput[]): Promise<BatchResult<WorkItem>>`\n- `updateBatch(updates: Array<{ id: string; updates: UpdateWorkItemInput }>): Promise<BatchResult<WorkItem>>`\n\n#### Statistics & Reporting\n\n- `getStatistics(projectId: string): Promise<WorkItemStatistics>`\n- `getDependencyGraph(filters: WorkItemFilters): Promise<DependencyGraph>`\n\n## Configuration\n\n### Custom Maturity Levels\n\n```typescript\nconst customMaturityLevels = [\n  { id: 'backlog', name: 'Backlog', order: 1 },\n  { id: 'sprint', name: 'In Sprint', order: 2 },\n  { id: 'done', name: 'Done', order: 3 }\n];\n\nconst manager = new WorkItemManager(storage, {\n  maturityLevels: customMaturityLevels\n});\n```\n\n### Custom Statuses\n\n```typescript\nconst customStatuses = [\n  { id: 'todo', name: 'To Do', category: 'not_started' },\n  { id: 'doing', name: 'Doing', category: 'in_progress' },\n  { id: 'testing', name: 'Testing', category: 'in_progress' },\n  { id: 'finished', name: 'Finished', category: 'completed' }\n];\n\nconst manager = new WorkItemManager(storage, {\n  statuses: customStatuses\n});\n```\n\n### Custom Work Types\n\n```typescript\nconst customWorkTypes = [\n  { id: 'story', name: 'User Story', icon: '📖' },\n  { id: 'spike', name: 'Spike', icon: '🔬' },\n  { id: 'epic', name: 'Epic', icon: '🎯' }\n];\n\nconst manager = new WorkItemManager(storage, {\n  workTypes: customWorkTypes\n});\n```\n\n## Integration Status\n\n- **Logger**: not-applicable - Core package with no logging requirements\n- **Docs-Suite**: ready - Complete TypeDoc API documentation\n- **NeverHub**: not-applicable - Core package with no service discovery needs\n\n## TypeScript Support\n\nThis package is written in TypeScript with strict mode enabled and includes complete type definitions.\n\n```typescript\nimport type {\n  WorkItem,\n  CreateWorkItemInput,\n  UpdateWorkItemInput,\n  WorkItemFilters,\n  WorkItemResult,\n  ValidationResult,\n  ReadinessResult,\n  WorkItemStatistics\n} from '@bernierllc/work-item-core';\n```\n\n## Algorithm Details\n\nThis package implements sophisticated graph algorithms for dependency management:\n\n### Circular Dependency Detection (DFS)\n\nUses **Depth-First Search (DFS)** to detect circular dependencies:\n- Maintains visited set and stack for path tracking\n- Detects cycles when revisiting a node in current path\n- Returns all circular dependency chains found\n- Time complexity: O(V + E) where V = work items, E = dependencies\n\n### Blocking Detection (BFS-style)\n\nUses **Breadth-First Search (BFS)** traversal for blocking analysis:\n- Identifies incomplete dependencies blocking work item start\n- Computes readiness by checking all dependency statuses\n- Returns blocking items with reasons for blocking\n- Time complexity: O(V + E) for full traversal\n\n### Transitive Dependencies\n\nRecursive algorithm for finding all transitive dependencies:\n- Depth-limited to prevent infinite recursion (default max depth: 10)\n- Uses visited set to prevent duplicate processing\n- Returns flattened list of all direct and transitive dependencies\n- Time complexity: O(V + E) with early termination on visited nodes\n\n## Testing\n\nThe package includes comprehensive tests with 90%+ coverage:\n\n```bash\nnpm test              # Run tests in watch mode\nnpm run test:run      # Run tests once\nnpm run test:coverage # Generate coverage report\n```\n\n### Test Coverage\n\n- **Branches**: 90.13%\n- **Functions**: 93.61%\n- **Lines**: 91.15%\n- **Statements**: 91.15%\n\nIncludes tests for:\n- CRUD operations with validation\n- Hierarchical relationships\n- Dependency management and circular detection\n- Status and maturity progression\n- Assignment workflows\n- Readiness checks\n- Batch operations\n- Edge cases and error conditions\n\n## License\n\nCopyright (c) 2025 Bernier LLC\n\nThis file is licensed to the client under a limited-use license.\nThe client may use and modify this code *only within the scope of the project it was delivered for*.\nRedistribution or use in other products or commercial offerings is not permitted without written consent from Bernier LLC.\n\n## See Also\n\n- [@bernierllc/retry-policy](../retry-policy) - Exponential backoff for retries\n- [@bernierllc/message-queue](../message-queue) - Message queuing with priorities\n","readmeFilename":"README.md"}