{"_id":"@bernierllc/project-types-core","_rev":"6-7e4c4e513c04b76f13af2ca3690ab007","name":"@bernierllc/project-types-core","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@bernierllc/project-types-core","version":"1.0.0","keywords":["planning","types","configuration","enums","validation"],"author":{"name":"Bernier LLC"},"license":"UNLICENSED","_id":"@bernierllc/project-types-core@1.0.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"4fffe6bcb60861ad51a6a373fe96d7765cf286ea","tarball":"https://registry.npmjs.org/@bernierllc/project-types-core/-/project-types-core-1.0.0.tgz","fileCount":46,"integrity":"sha512-F6Q5JrfgjOUDoBsz7B7fV65XGTfTHiyh3Eo4DIWTAGW502RSrvYWyjb1gE/nFf/j46GB2SgRaKeRh/1a4Lg+hg==","signatures":[{"sig":"MEUCIQCsyN7Co5aM72ANqSmUrsAjNGQRVNDT78eBD9wMTfNBvQIgQR++iguyGhGaJcBxZBxxIOFJInmaaKhxaTPa/gpg76I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":312303},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a6ea1e5b27d01dcc5ae707ecbf304507ab0fc8e2","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist coverage","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"bernierllc":{"category":"core","integration":{"logger":"optional","neverhub":"not-applicable"}},"_npmVersion":"11.4.2","description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","directories":{},"_nodeVersion":"24.4.1","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.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/project-types-core_1.0.0_1761601570532_0.4959520713482488","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bernierllc/project-types-core","version":"1.0.2","keywords":["planning","types","configuration","enums","validation"],"author":{"name":"Bernier LLC"},"license":"UNLICENSED","_id":"@bernierllc/project-types-core@1.0.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"fd3ae2a8ff94b9990402063ecaa4db4764981515","tarball":"https://registry.npmjs.org/@bernierllc/project-types-core/-/project-types-core-1.0.2.tgz","fileCount":46,"integrity":"sha512-wyflmmDvzO+vIfAJt4Xoxz/pi0CScP1TDpz/G98Bi5+K2CCYghT3OBcu1hkcMW+TQpCIERHjE5tYiktLhiUf1w==","signatures":[{"sig":"MEUCIBGpSabFSUFOwB542AR/cDk49Fmc1pia+DFX+M1qQBFMAiEA5iV/RXO9XwKBjv5q09Ez9mg+CVrISdem9+u4DVrONbo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314199},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist coverage","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bce4cb9f-5808-4845-8110-0bd7835e576b"}},"bernierllc":{"category":"core","integration":{"logger":"optional","neverhub":"not-applicable"}},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","directories":{},"_nodeVersion":"20.19.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.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/project-types-core_1.0.2_1767642321949_0.7366203973121948","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bernierllc/project-types-core","version":"1.0.3","keywords":["planning","types","configuration","enums","validation"],"author":{"name":"Bernier LLC"},"license":"UNLICENSED","_id":"@bernierllc/project-types-core@1.0.3","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"7bf0599254e1232382fd628cad85c979d91292d8","tarball":"https://registry.npmjs.org/@bernierllc/project-types-core/-/project-types-core-1.0.3.tgz","fileCount":46,"integrity":"sha512-Muq7NvXIcOg3TScYrDXpGKo8vUZkj8lcb52PnHs4TKtRjJIZoWomxyrHoxIvE0KKkPnsMLSBvasoOuroceK0lQ==","signatures":[{"sig":"MEYCIQD3ADZodWvNya5AhVMQ+mXfZdDgFdQvz0ViZTwADtk/UAIhALpJ54r8QXm7CmE7v5Le0RhbT2LYE7ckOBQHGXY+dz5R","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314363},"main":"dist/index.js","_from":"file:bernierllc-project-types-core-1.0.3.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist coverage","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bce4cb9f-5808-4845-8110-0bd7835e576b"}},"_resolved":"/tmp/2fc796738e39956343dc1d4b8e3217be/bernierllc-project-types-core-1.0.3.tgz","_integrity":"sha512-Muq7NvXIcOg3TScYrDXpGKo8vUZkj8lcb52PnHs4TKtRjJIZoWomxyrHoxIvE0KKkPnsMLSBvasoOuroceK0lQ==","bernierllc":{"category":"core","integration":{"logger":"optional","neverhub":"not-applicable"}},"_npmVersion":"11.11.0","description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.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/project-types-core_1.0.3_1773078053998_0.6558665711729921","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bernierllc/project-types-core","version":"1.0.4","keywords":["planning","types","configuration","enums","validation"],"author":{"name":"Bernier LLC"},"license":"UNLICENSED","_id":"@bernierllc/project-types-core@1.0.4","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"411e410235da008c9f9216f892ff7facf0a83fde","tarball":"https://registry.npmjs.org/@bernierllc/project-types-core/-/project-types-core-1.0.4.tgz","fileCount":46,"integrity":"sha512-X5U7R66tLvptfaCxgrpYc3GIY7nifzLr23HFQ7s34By+yptV1f8LKAnctdRl+YFGrMrZUBS5iW2uMF+hESUFgg==","signatures":[{"sig":"MEUCIQDd57IeWtgKymgVbkAMrZJDD64+KgNsKXJ80MAuSsZQlwIgPr20NPf5sGIB/aPKAJZqINCflBetlr6DICFcGjF/YjE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":314585},"main":"dist/index.js","_from":"file:bernierllc-project-types-core-1.0.4.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist coverage","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bce4cb9f-5808-4845-8110-0bd7835e576b"}},"_resolved":"/tmp/709744ec64cf2d83b80dc29ce679e6ed/bernierllc-project-types-core-1.0.4.tgz","_integrity":"sha512-X5U7R66tLvptfaCxgrpYc3GIY7nifzLr23HFQ7s34By+yptV1f8LKAnctdRl+YFGrMrZUBS5iW2uMF+hESUFgg==","bernierllc":{"category":"core","integration":{"logger":"optional","neverhub":"not-applicable"}},"_npmVersion":"11.11.0","description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.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/project-types-core_1.0.4_1773081234977_0.8713761226369534","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bernierllc/project-types-core","version":"1.2.0","keywords":["planning","types","configuration","enums","validation"],"author":{"name":"Bernier LLC"},"license":"UNLICENSED","_id":"@bernierllc/project-types-core@1.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"fe5d33b713cdfadb2d7891104ed3f0dffdb00295","tarball":"https://registry.npmjs.org/@bernierllc/project-types-core/-/project-types-core-1.2.0.tgz","fileCount":20,"integrity":"sha512-9jDq3dRQ030+ANLi3vcMxtGgWsPCt8sT3zUR+R1ZBubQ8GvEMpg208Dd49P4WEOvFitT18R/IGzgTZa7q4/0dw==","signatures":[{"sig":"MEYCIQCC5qH88ZWfDo/jDbnMyKbWGIdZA/QTv3A3aVQDI5aZbgIhAKxrka5JwI5LElKcuxacyTlbor/oNsmqEiYUWlxH/hW9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":71144},"main":"dist/index.js","_from":"file:bernierllc-project-types-core-1.2.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint src --ext .ts","test":"jest --watch","build":"tsc","clean":"rm -rf dist coverage","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bce4cb9f-5808-4845-8110-0bd7835e576b"}},"_resolved":"/home/runner/work/tools/tools/packages/core/project-types-core/bernierllc-project-types-core-1.2.0.tgz","_integrity":"sha512-9jDq3dRQ030+ANLi3vcMxtGgWsPCt8sT3zUR+R1ZBubQ8GvEMpg208Dd49P4WEOvFitT18R/IGzgTZa7q4/0dw==","bernierllc":{"category":"core","integration":{"logger":"optional","neverhub":"not-applicable"}},"_npmVersion":"11.14.1","description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.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/project-types-core_1.2.0_1779241346665_0.12081027898462016","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@bernierllc/project-types-core","version":"1.3.0","description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","main":"dist/index.js","types":"dist/index.d.ts","keywords":["planning","types","configuration","enums","validation"],"author":{"name":"Bernier LLC"},"license":"UNLICENSED","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.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"bernierllc":{"category":"core","integration":{"logger":"optional","neverhub":"not-applicable"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","clean":"rm -rf dist coverage","test":"jest --watch","test:run":"jest","test:coverage":"jest --coverage","lint":"eslint src --ext .ts"},"_id":"@bernierllc/project-types-core@1.3.0","_integrity":"sha512-ggCEgMr8zlzer4EAilNKRA0nUm7cFQyE8+U8cv/ZHVcPk5abJjhxjbn1X5AO5IgXIzxL0WFZzQVW5iimA6FJdw==","_resolved":"/home/runner/work/tools/tools/packages/core/project-types-core/bernierllc-project-types-core-1.3.0.tgz","_from":"file:bernierllc-project-types-core-1.3.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-ggCEgMr8zlzer4EAilNKRA0nUm7cFQyE8+U8cv/ZHVcPk5abJjhxjbn1X5AO5IgXIzxL0WFZzQVW5iimA6FJdw==","shasum":"c0383fd8618c1b766d443bc2d06f3684d33b152d","tarball":"https://registry.npmjs.org/@bernierllc/project-types-core/-/project-types-core-1.3.0.tgz","fileCount":20,"unpackedSize":71144,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICTuaCaQYGIj7kjSMjin0R00JI35j0FcVUf/hC3GgEiWAiAoN/SP5ZBpzzYqvq3XEYtRnoKqaNmwipb2D1n+4P1SnQ=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bce4cb9f-5808-4845-8110-0bd7835e576b"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/project-types-core_1.3.0_1779250095400_0.4157367999261796"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-27T21:46:10.449Z","modified":"2026-05-20T04:08:15.671Z","1.0.0":"2025-10-27T21:46:10.726Z","1.0.2":"2026-01-05T19:45:22.118Z","1.0.3":"2026-03-09T17:40:54.162Z","1.0.4":"2026-03-09T18:33:55.117Z","1.2.0":"2026-05-20T01:42:26.794Z","1.3.0":"2026-05-20T04:08:15.567Z"},"author":{"name":"Bernier LLC"},"license":"UNLICENSED","keywords":["planning","types","configuration","enums","validation"],"description":"Configurable type system for planning entities (project types, work types, maturity levels, statuses)","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/project-types-core\n\nConfigurable type system for planning entities (project types, work types, maturity levels, statuses).\n\n## Installation\n\n```bash\nnpm install @bernierllc/project-types-core\n```\n\n## Quick Start\n\n```typescript\nimport { ProjectTypeManager, MaturityLevelManager, WorkItemStatusManager } from '@bernierllc/project-types-core';\n\n// Implement storage interface\nclass MyStorage implements TypeStorage<ProjectType> {\n  // Your storage implementation (database, file system, etc.)\n}\n\nconst storage = new MyStorage();\nconst manager = new ProjectTypeManager('project_type', storage);\n\n// Create a project type\nconst result = await manager.create({\n  name: 'Feature Development',\n  slug: 'feature-development',\n  icon: '🚀',\n  color: '#4CAF50',\n  description: 'Building new product features'\n});\n\nif (result.success) {\n  console.log('Created:', result.data);\n}\n```\n\n## Core Concepts\n\n### Configurable Types\n\nThis package provides runtime-configurable type systems for:\n\n- **ProjectType** - Categories of projects (Feature, Research, Infrastructure, etc.)\n- **WorkType** - Types of work items (Package, Bug Fix, Documentation, etc.)\n- **MaturityLevel** - Progression stages with ordering (Intention, Idea, Planned, Ready, Completed)\n- **WorkItemStatus** - Workflow states (Open, In Progress, Blocked, Completed, Cancelled)\n\n### System vs. Custom Types\n\n- **System types** (`is_system: true`) - Cannot be deleted, provides baseline taxonomy\n- **Custom types** (`is_system: false`) - User-defined, can be created and deleted\n\n### Display Ordering\n\nAll types have a `display_order` property for consistent sorting and UI presentation:\n\n```typescript\n// Create types with specific order\nawait manager.create({ name: 'High Priority', slug: 'high', display_order: 1 });\nawait manager.create({ name: 'Normal', slug: 'normal', display_order: 2 });\nawait manager.create({ name: 'Low Priority', slug: 'low', display_order: 3 });\n\n// Or let the system auto-assign\nawait manager.create({ name: 'Backlog', slug: 'backlog' }); // Gets display_order: 4\n\n// Reorder later\nawait manager.moveUp(lowPriorityId); // Swap with previous item\nawait manager.moveDown(highPriorityId); // Swap with next item\n```\n\n### Maturity Progression\n\nMaturity levels support forward progression validation:\n\n```typescript\nconst maturityManager = new MaturityLevelManager('maturity_level', storage);\n\n// Create ordered maturity levels\nawait maturityManager.create({ name: 'Intention', slug: 'intention', display_order: 1 });\nawait maturityManager.create({ name: 'Idea', slug: 'idea', display_order: 2 });\nawait maturityManager.create({ name: 'Planned', slug: 'planned', display_order: 3 });\nawait maturityManager.create({ name: 'Ready', slug: 'ready', display_order: 4 });\nawait maturityManager.create({ name: 'Completed', slug: 'completed', display_order: 10 });\n\n// Get next level in progression\nconst current = await maturityManager.getBySlug('planned');\nconst next = await maturityManager.getNextMaturity(current.data!.id);\nconsole.log('Next:', next.data?.name); // \"Ready\"\n\n// Validate progression (prevents going backward)\nconst validation = await maturityManager.validateProgression(\n  readyId,\n  intentionId\n);\nconsole.log(validation.isValid); // false - cannot regress\n\n// Get full progression path\nconst path = await maturityManager.getProgressionPath(intentionId, completedId);\nconsole.log(path.data?.map(m => m.name));\n// [\"Intention\", \"Idea\", \"Planned\", \"Ready\", \"Completed\"]\n```\n\n### Status Categories\n\nWork item statuses support closed/open categorization:\n\n```typescript\nconst statusManager = new WorkItemStatusManager('work_item_status', storage);\n\n// Create statuses with closed flag\nawait statusManager.create({\n  name: 'Open',\n  slug: 'open',\n  is_closed_status: false\n});\n\nawait statusManager.create({\n  name: 'Completed',\n  slug: 'completed',\n  is_closed_status: true\n});\n\n// Query by category\nconst openStatuses = await statusManager.getOpenStatuses();\nconst closedStatuses = await statusManager.getClosedStatuses();\n\n// Check individual status\nconst isCompleted = await statusManager.isClosedStatus(completedId);\nconsole.log(isCompleted.data); // true\n```\n\n### Slug Validation\n\nSlugs must be URL-safe identifiers:\n\n- Lowercase only\n- Alphanumeric and hyphens\n- Cannot start/end with hyphen\n- 1-50 characters\n- Unique within type category\n\n```typescript\n// Valid slugs\n'feature-development'\n'bug-fix'\n'high-priority-123'\n\n// Invalid slugs\n'Feature Development' // uppercase\n'feature_development' // underscore\n'-invalid' // starts with hyphen\n'invalid-' // ends with hyphen\n```\n\n## API Reference\n\n### TypeManager<T>\n\nGeneric manager for all configurable types.\n\n#### Methods\n\n**create(data: CreateTypeInput): Promise<PackageResult<T>>**\n\nCreates a new type with validation.\n\n```typescript\nconst result = await manager.create({\n  name: 'Feature Development',\n  slug: 'feature-development',\n  description: 'Building new features',\n  icon: '🚀',\n  color: '#4CAF50',\n  is_system: false,\n  display_order: 1, // Optional - auto-assigned if omitted\n  metadata: { custom: 'data' } // Optional extensible metadata\n});\n```\n\n**get(id: string): Promise<PackageResult<T>>**\n\nRetrieves a type by ID.\n\n**getBySlug(slug: string): Promise<PackageResult<T>>**\n\nRetrieves a type by slug.\n\n**list(filters?: TypeFilters): Promise<PackageResult<T[]>>**\n\nLists types with optional filtering.\n\n```typescript\n// Filter by system/custom\nconst systemTypes = await manager.list({ is_system: true });\nconst customTypes = await manager.list({ is_system: false });\n\n// Search by name\nconst matching = await manager.list({ name_contains: 'feature' });\n\n// Filter by slugs\nconst specific = await manager.list({ slugs: ['bug-fix', 'feature'] });\n```\n\n**update(id: string, updates: TypeUpdates): Promise<PackageResult<T>>**\n\nUpdates an existing type.\n\n```typescript\nawait manager.update(typeId, {\n  name: 'Updated Name',\n  description: 'New description',\n  color: '#FF5722'\n});\n```\n\n**delete(id: string): Promise<PackageResult<void>>**\n\nDeletes a type (system types cannot be deleted).\n\n**reorder(idOrderMap: Record<string, number>): Promise<PackageResult<void>>**\n\nReorders multiple types at once.\n\n```typescript\nawait manager.reorder({\n  [id1]: 3,\n  [id2]: 1,\n  [id3]: 2\n});\n```\n\n**moveUp(id: string): Promise<PackageResult<void>>**\n\nMoves a type up one position in display order.\n\n**moveDown(id: string): Promise<PackageResult<void>>**\n\nMoves a type down one position in display order.\n\n**getSystemTypes(): Promise<PackageResult<T[]>>**\n\nReturns all system types.\n\n**getCustomTypes(): Promise<PackageResult<T[]>>**\n\nReturns all custom types.\n\n### MaturityLevelManager\n\nSpecialized manager for maturity levels with progression support.\n\n#### Additional Methods\n\n**getByProgression(order: number): Promise<PackageResult<MaturityLevel>>**\n\nGets maturity level by display order position.\n\n**getNextMaturity(currentId: string): Promise<PackageResult<MaturityLevel | null>>**\n\nGets the next maturity level in progression (returns null if at maximum).\n\n**getPreviousMaturity(currentId: string): Promise<PackageResult<MaturityLevel | null>>**\n\nGets the previous maturity level (returns null if at minimum).\n\n**validateProgression(fromId: string, toId: string): Promise<ValidationResult>**\n\nValidates that progression from one level to another is forward (not backward).\n\n**getProgressionPath(fromId: string, toId: string): Promise<PackageResult<MaturityLevel[]>>**\n\nGets all maturity levels between two points in the progression.\n\n### WorkItemStatusManager\n\nSpecialized manager for work item statuses with closed/open categorization.\n\n#### Additional Methods\n\n**getClosedStatuses(): Promise<PackageResult<WorkItemStatus[]>>**\n\nReturns all statuses with `is_closed_status: true`.\n\n**getOpenStatuses(): Promise<PackageResult<WorkItemStatus[]>>**\n\nReturns all statuses with `is_closed_status: false`.\n\n**isClosedStatus(id: string): Promise<PackageResult<boolean>>**\n\nChecks if a specific status is a closed status.\n\n## Storage Implementation\n\nYou must implement the `TypeStorage` interface for your data persistence layer:\n\n```typescript\nimport { TypeStorage, ConfigurableType, TypeFilters } from '@bernierllc/project-types-core';\n\nclass MyStorage<T extends ConfigurableType> implements TypeStorage<T> {\n  async save(type: T): Promise<void> {\n    // Save or update type in your database\n  }\n\n  async get(id: string): Promise<T | null> {\n    // Retrieve type by ID\n  }\n\n  async getBySlug(slug: string): Promise<T | null> {\n    // Retrieve type by slug\n  }\n\n  async list(filters?: TypeFilters): Promise<T[]> {\n    // List types with optional filtering\n    // Must return types sorted by display_order ascending\n  }\n\n  async delete(id: string): Promise<void> {\n    // Delete type from storage\n  }\n\n  async getMaxDisplayOrder(): Promise<number> {\n    // Return highest display_order value (0 if no types exist)\n  }\n}\n```\n\n### Example with Prisma\n\n```typescript\nimport { PrismaClient } from '@prisma/client';\nimport { TypeStorage, ProjectType, TypeFilters } from '@bernierllc/project-types-core';\n\nclass PrismaProjectTypeStorage implements TypeStorage<ProjectType> {\n  constructor(private prisma: PrismaClient) {}\n\n  async save(type: ProjectType): Promise<void> {\n    await this.prisma.projectType.upsert({\n      where: { id: type.id },\n      create: type,\n      update: type\n    });\n  }\n\n  async get(id: string): Promise<ProjectType | null> {\n    return await this.prisma.projectType.findUnique({\n      where: { id }\n    });\n  }\n\n  async getBySlug(slug: string): Promise<ProjectType | null> {\n    return await this.prisma.projectType.findUnique({\n      where: { slug }\n    });\n  }\n\n  async list(filters?: TypeFilters): Promise<ProjectType[]> {\n    return await this.prisma.projectType.findMany({\n      where: {\n        is_system: filters?.is_system,\n        name: filters?.name_contains ? {\n          contains: filters.name_contains,\n          mode: 'insensitive'\n        } : undefined,\n        slug: filters?.slugs ? { in: filters.slugs } : undefined\n      },\n      orderBy: { display_order: 'asc' }\n    });\n  }\n\n  async delete(id: string): Promise<void> {\n    await this.prisma.projectType.delete({\n      where: { id }\n    });\n  }\n\n  async getMaxDisplayOrder(): Promise<number> {\n    const result = await this.prisma.projectType.aggregate({\n      _max: { display_order: true }\n    });\n    return result._max.display_order || 0;\n  }\n}\n```\n\n## Error Handling\n\nAll operations return `PackageResult<T>` with success/failure indication:\n\n```typescript\ninterface PackageResult<T> {\n  success: boolean;\n  data?: T;\n  error?: {\n    code: string;\n    message: string;\n    details?: any;\n  };\n}\n```\n\n### Common Error Codes\n\n- `INVALID_SLUG` - Slug format validation failed\n- `DUPLICATE_SLUG` - Slug already exists\n- `NAME_TOO_LONG` - Name exceeds 100 characters\n- `INVALID_COLOR` - Color is not valid hex format (#RRGGBB)\n- `INVALID_DISPLAY_ORDER` - Display order is not a non-negative integer\n- `NOT_FOUND` - Type with specified ID not found\n- `CANNOT_DELETE_SYSTEM_TYPE` - Attempted to delete a system type\n- `ALREADY_FIRST` - Cannot move up (already first)\n- `ALREADY_LAST` - Cannot move down (already last)\n- `INVALID_PROGRESSION` - Attempted backward maturity progression\n\n## Examples\n\n### Complete Project Type System\n\n```typescript\nimport { ProjectTypeManager } from '@bernierllc/project-types-core';\n\n// Initialize\nconst storage = new MyStorage();\nconst manager = new ProjectTypeManager('project_type', storage);\n\n// Seed system types\nawait manager.create({\n  name: 'Feature Development',\n  slug: 'feature',\n  icon: '🚀',\n  is_system: true,\n  display_order: 1\n});\n\nawait manager.create({\n  name: 'Bug Fix',\n  slug: 'bug-fix',\n  icon: '🐛',\n  is_system: true,\n  display_order: 2\n});\n\n// Add custom type\nawait manager.create({\n  name: 'Research',\n  slug: 'research',\n  icon: '🔬',\n  is_system: false\n});\n\n// List all types\nconst allTypes = await manager.list();\nallTypes.data?.forEach(type => {\n  console.log(`${type.icon} ${type.name} (${type.is_system ? 'system' : 'custom'})`);\n});\n```\n\n### Work Item Lifecycle Management\n\n```typescript\nimport { MaturityLevelManager, WorkItemStatusManager } from '@bernierllc/project-types-core';\n\n// Setup maturity levels\nconst maturityManager = new MaturityLevelManager('maturity', maturityStorage);\nconst statusManager = new WorkItemStatusManager('status', statusStorage);\n\n// Define maturity progression\nconst intention = await maturityManager.create({\n  name: 'Intention',\n  slug: 'intention',\n  display_order: 1\n});\n\nconst idea = await maturityManager.create({\n  name: 'Idea',\n  slug: 'idea',\n  display_order: 2\n});\n\nconst completed = await maturityManager.create({\n  name: 'Completed',\n  slug: 'completed',\n  display_order: 10\n});\n\n// Define statuses\nawait statusManager.create({\n  name: 'Open',\n  slug: 'open',\n  is_closed_status: false\n});\n\nawait statusManager.create({\n  name: 'Done',\n  slug: 'done',\n  is_closed_status: true\n});\n\n// Work item progression\nlet currentMaturity = intention.data!.id;\n\n// Progress to next maturity\nconst next = await maturityManager.getNextMaturity(currentMaturity);\nif (next.success && next.data) {\n  console.log(`Progressing to: ${next.data.name}`);\n  currentMaturity = next.data.id;\n}\n\n// Check if at final maturity\nconst atEnd = await maturityManager.getNextMaturity(currentMaturity);\nif (!atEnd.data) {\n  console.log('Reached final maturity level');\n}\n```\n\n## Integration Status\n\n- **Logger**: Optional - Pass logger instance to constructors for operation logging\n- **Docs-Suite**: Ready - Complete TypeDoc documentation on all public APIs\n- **NeverHub**: Not Applicable - Pure data structure management without event publishing\n\n## See Also\n\n- [@bernierllc/work-item-core](../work-item-core) - Uses this package for type lookups and validation\n- [@bernierllc/task-queue](../task-queue) - Uses maturity level filtering for build queues\n\n## License\n\nCopyright (c) 2025 Bernier LLC. All rights reserved.\n","readmeFilename":"README.md"}