@rolexjs/core 1.2.1 → 1.3.1-dev-20260304121217

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/dist/index.js CHANGED
@@ -37,7 +37,8 @@ var position = structure("position", "A role held by an individual", society, [
37
37
  var duty = structure("duty", "Responsibilities of this position", position);
38
38
  var requirement = structure("requirement", "Required skill for this position", position);
39
39
  var project = structure("project", "A process container for organized work", society, [
40
- relation("participation", "Who participates in this project", individual)
40
+ relation("participation", "Who participates in this project", individual),
41
+ relation("ownership", "Which organization owns this project", organization)
41
42
  ]);
42
43
  var scope = structure(
43
44
  "scope",
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/structures.ts","../src/execution.ts","../src/cognition.ts","../src/organization.ts","../src/project.ts","../src/lifecycle.ts","../src/role.ts"],"sourcesContent":["/**\n * @rolexjs/core — RoleX Concept World\n *\n * Domain-specific structures and processes built on @rolexjs/system.\n *\n * Structures — the concept tree (23 concepts, 3 relations)\n * Processes — how the world changes (32 processes, 5 layers)\n *\n * Layer 1: Execution — want, plan, todo, finish, complete, abandon\n * Layer 2: Cognition — reflect, realize, master\n * Layer 3: Organization — hire, fire, appoint, dismiss, charter, charge\n * Layer 3b: Project — enroll, remove, scope, milestone, deliver, wiki\n * Layer 4: Lifecycle — born, found, establish, launch, retire, die, dissolve, abolish, archive, rehire\n * + Role: activate\n */\n\n// Re-export system primitives\nexport {\n type Create,\n create,\n createRuntime,\n type GraphOp,\n type Link,\n link,\n type Process,\n process,\n type Relation,\n type Remove,\n type Runtime,\n relation,\n remove,\n type State,\n type Structure,\n structure,\n type Transform,\n transform,\n type Unlink,\n unlink,\n} from \"@rolexjs/system\";\n\n// Platform\nexport type { ContextData, Platform, PrototypeRegistry, RoleXRepository } from \"./platform.js\";\n\n// ===== Structures =====\n\nexport {\n background,\n // Organization\n charter,\n // Project\n deliverable,\n duty,\n // Individual — Cognition\n encounter,\n experience,\n // Individual — Execution\n goal,\n // Individual — Identity\n identity,\n // Level 1\n individual,\n // Project\n milestone,\n // Individual — Knowledge\n mindset,\n organization,\n past,\n plan,\n position,\n principle,\n procedure,\n // Project\n project,\n // Organization — Position\n requirement,\n // Project\n scope,\n // Level 0\n society,\n task,\n tone,\n // Project\n wiki,\n} from \"./structures.js\";\n\n// ===== Processes — Layer 1: Execution =====\n\nexport { abandon, complete, finish, planGoal, todo, want } from \"./execution.js\";\n\n// ===== Processes — Layer 2: Cognition =====\n\nexport { master, realize, reflect } from \"./cognition.js\";\n\n// ===== Processes — Layer 3: Organization =====\n\nexport { appoint, charge, charterOrg, dismiss, fire, hire } from \"./organization.js\";\n\n// ===== Processes — Layer 3b: Project =====\n\nexport {\n deliverProject,\n enroll,\n milestoneProject,\n removeParticipant,\n scopeProject,\n wikiProject,\n} from \"./project.js\";\n\n// ===== Processes — Layer 4: Lifecycle =====\n\nexport {\n abolish,\n archive,\n born,\n die,\n dissolve,\n establish,\n found,\n launch,\n rehire,\n retire,\n} from \"./lifecycle.js\";\n\n// ===== Role =====\n\nexport { activate } from \"./role.js\";\n","/**\n * RoleX Concept World — all structure definitions.\n *\n * Every node is a Structure — simultaneously concept, container,\n * and information carrier. Tree (parent-child) provides the\n * hierarchical backbone. Relations provide cross-branch links.\n *\n * ┌─────────────────────────────────────────────────────────┐\n * │ society │\n * │ ├── individual \"A single agent in society\" │\n * │ │ ├── identity \"Who I am\" │\n * │ │ │ ├── background \"My personal background\" │\n * │ │ │ ├── tone \"My tone of communication\" │\n * │ │ │ └── mindset \"How I think\" │\n * │ │ ├── encounter \"A specific event I went through\"│\n * │ │ ├── experience \"What I learned from encounters\" │\n * │ │ ├── principle \"My rules of conduct\" │\n * │ │ ├── procedure \"My skill references and metadata\"│\n * │ │ └── goal \"What I am pursuing\" │\n * │ │ └── plan \"How to achieve a goal\" │\n * │ │ └── task \"Concrete unit of work\" │\n * │ ├── organization \"A group of individuals\" │\n * │ │ │ ∿ membership → individual │\n * │ │ └── charter \"The rules and mission\" │\n * │ ├── position \"A role held by an individual\" │\n * │ │ │ ∿ appointment → individual │\n * │ │ └── duty \"Responsibilities of position\" │\n * │ ├── project \"A process container\" │\n * │ │ │ ∿ participation → individual │\n * │ │ ├── scope \"Project boundary\" │\n * │ │ ├── milestone \"Key checkpoint\" │\n * │ │ ├── deliverable \"Project output\" │\n * │ │ └── wiki \"Project knowledge base\" │\n * │ └── past \"Things no longer active\" │\n * └─────────────────────────────────────────────────────────┘\n */\nimport { relation, structure } from \"@rolexjs/system\";\n\n// ================================================================\n// Level 0 — Root\n// ================================================================\n\nexport const society = structure(\"society\", \"The RoleX world\", null);\n\n// ================================================================\n// Level 1 — Four pillars\n// ================================================================\n\nexport const individual = structure(\"individual\", \"A single agent in society\", society);\nexport const organization = structure(\"organization\", \"A group of individuals\", society, [\n relation(\"membership\", \"Who belongs to this organization\", individual),\n]);\nexport const past = structure(\"past\", \"Things no longer active\", society);\n\n// ================================================================\n// Individual — Identity\n// ================================================================\n\nexport const identity = structure(\"identity\", \"Who I am\", individual);\nexport const background = structure(\"background\", \"My personal background\", identity);\nexport const tone = structure(\"tone\", \"My tone of communication\", identity);\nexport const mindset = structure(\"mindset\", \"How I think and approach problems\", identity);\n\n// ================================================================\n// Individual — Cognition\n// ================================================================\n\nexport const encounter = structure(\"encounter\", \"A specific event I went through\", individual);\nexport const experience = structure(\"experience\", \"What I learned from encounters\", individual);\n\n// ================================================================\n// Individual — Knowledge\n// ================================================================\n\nexport const principle = structure(\"principle\", \"My rules of conduct\", individual);\nexport const procedure = structure(\"procedure\", \"My skill references and metadata\", individual);\n\n// ================================================================\n// Individual — Execution\n// ================================================================\n\nexport const goal = structure(\"goal\", \"What I am pursuing\", individual);\nexport const plan = structure(\"plan\", \"How to achieve a goal\", goal);\nexport const task = structure(\"task\", \"Concrete unit of work\", plan);\n\n// ================================================================\n// Organization\n// ================================================================\n\nexport const charter = structure(\"charter\", \"The rules and mission\", organization);\n\n// ================================================================\n// Position — independent entity\n// ================================================================\n\nexport const position = structure(\"position\", \"A role held by an individual\", society, [\n relation(\"appointment\", \"Who holds this position\", individual),\n]);\nexport const duty = structure(\"duty\", \"Responsibilities of this position\", position);\nexport const requirement = structure(\"requirement\", \"Required skill for this position\", position);\n\n// ================================================================\n// Project — process management entity\n// ================================================================\n\nexport const project = structure(\"project\", \"A process container for organized work\", society, [\n relation(\"participation\", \"Who participates in this project\", individual),\n]);\nexport const scope = structure(\n \"scope\",\n \"Project boundary — what to do and what not to do\",\n project\n);\nexport const milestone = structure(\n \"milestone\",\n \"Key checkpoint with achievement criteria\",\n project\n);\nexport const deliverable = structure(\"deliverable\", \"Project output and delivery\", project);\nexport const wiki = structure(\"wiki\", \"Project-level knowledge base entry\", project);\n","/**\n * Execution cycle — the doing loop.\n *\n * want → plan → todo → finish → (encounter) → want → ...\n * plan → complete → (encounter)\n * plan → abandon → (encounter)\n *\n * Goals are long-term directions. Plans are the completable unit —\n * they can be completed or abandoned. Tasks finish individually.\n * All transforms produce encounters — feeding the cognition cycle.\n */\nimport { create, process, transform } from \"@rolexjs/system\";\nimport { encounter, goal, individual, plan, task } from \"./structures.js\";\n\nexport const want = process(\"want\", \"Declare a goal\", individual, create(goal));\nexport const planGoal = process(\"plan\", \"Create a plan for a goal\", goal, create(plan));\nexport const todo = process(\"todo\", \"Create a task in a plan\", plan, create(task));\n\nexport const finish = process(\n \"finish\",\n \"Complete a task, record as encounter\",\n task,\n transform(task, encounter)\n);\nexport const complete = process(\n \"complete\",\n \"Complete a plan, record as encounter\",\n plan,\n transform(plan, encounter)\n);\nexport const abandon = process(\n \"abandon\",\n \"Abandon a plan, record as encounter\",\n plan,\n transform(plan, encounter)\n);\n","/**\n * Cognition cycle — the learning loop.\n *\n * encounter → reflect → experience → realize → principle\n * → master → procedure\n *\n * Encounters are raw events (produced by the execution cycle).\n * Reflection distills them into experience. From experience,\n * principles are realized and procedures are mastered.\n */\nimport { process, transform } from \"@rolexjs/system\";\nimport { encounter, experience, principle, procedure } from \"./structures.js\";\n\nexport const reflect = process(\n \"reflect\",\n \"Reflect on encounters, distill into experience\",\n encounter,\n transform(encounter, experience)\n);\nexport const realize = process(\n \"realize\",\n \"Realize a principle from experience\",\n experience,\n transform(experience, principle)\n);\nexport const master = process(\n \"master\",\n \"Master a procedure from experience\",\n experience,\n transform(experience, procedure)\n);\n","/**\n * Organization management — hiring, firing, and structuring.\n *\n * hire / fire — membership (who belongs)\n * appoint / dismiss — appointment (who holds a position)\n * charter — define org rules and mission\n * charge — add duties to a position\n */\nimport { create, link, process, unlink } from \"@rolexjs/system\";\nimport { charter, duty, organization, position } from \"./structures.js\";\n\n// Membership\nexport const hire = process(\n \"hire\",\n \"Hire an individual into the organization\",\n organization,\n link(organization, \"membership\")\n);\nexport const fire = process(\n \"fire\",\n \"Fire an individual from the organization\",\n organization,\n unlink(organization, \"membership\")\n);\n\n// Appointment\nexport const appoint = process(\n \"appoint\",\n \"Appoint a member to a position\",\n position,\n link(position, \"appointment\")\n);\nexport const dismiss = process(\n \"dismiss\",\n \"Dismiss from a position\",\n position,\n unlink(position, \"appointment\")\n);\n\n// Structure\nexport const charterOrg = process(\n \"charter\",\n \"Define the charter for an organization\",\n organization,\n create(charter)\n);\nexport const charge = process(\"charge\", \"Add a duty to a position\", position, create(duty));\n","/**\n * Project management — scoping, milestones, enrollment, deliverables, wiki.\n *\n * enroll / remove — participation (who is involved)\n * scope — define project boundary\n * milestone — add checkpoint\n * deliver — add deliverable\n * wiki — add knowledge entry\n */\nimport { create, link, process, unlink } from \"@rolexjs/system\";\nimport { deliverable, milestone, project, scope, wiki } from \"./structures.js\";\n\n// Participation\nexport const enroll = process(\n \"enroll\",\n \"Enroll an individual into the project\",\n project,\n link(project, \"participation\")\n);\nexport const removeParticipant = process(\n \"remove\",\n \"Remove an individual from the project\",\n project,\n unlink(project, \"participation\")\n);\n\n// Structure\nexport const scopeProject = process(\n \"scope\",\n \"Define the scope for a project\",\n project,\n create(scope)\n);\nexport const milestoneProject = process(\n \"milestone\",\n \"Add a milestone to a project\",\n project,\n create(milestone)\n);\nexport const deliverProject = process(\n \"deliver\",\n \"Add a deliverable to a project\",\n project,\n create(deliverable)\n);\nexport const wikiProject = process(\"wiki\", \"Add a wiki entry to a project\", project, create(wiki));\n","/**\n * Lifecycle — creation, retirement, and dissolution.\n *\n * born / found / establish — bring things into existence\n * retire / die — individual → past\n * dissolve — organization → past\n * abolish — position → past\n * rehire — past → individual (return from retirement)\n *\n * No real deletion — everything transforms to the \"past\" branch.\n */\nimport { create, process, transform } from \"@rolexjs/system\";\nimport { individual, organization, past, position, project, society } from \"./structures.js\";\n\n// Creation\nexport const born = process(\n \"born\",\n \"An individual is born into society\",\n society,\n create(individual)\n);\nexport const found = process(\"found\", \"Found an organization\", society, create(organization));\nexport const establish = process(\"establish\", \"Establish a position\", society, create(position));\nexport const launch = process(\"launch\", \"Launch a project\", society, create(project));\n\n// Retirement & death\nexport const retire = process(\n \"retire\",\n \"Retire an individual\",\n individual,\n transform(individual, past)\n);\nexport const die = process(\"die\", \"An individual dies\", individual, transform(individual, past));\n\n// Archive project\nexport const archive = process(\"archive\", \"Archive a project\", project, transform(project, past));\n\n// Dissolution\nexport const dissolve = process(\n \"dissolve\",\n \"Dissolve an organization\",\n organization,\n transform(organization, past)\n);\nexport const abolish = process(\n \"abolish\",\n \"Abolish a position\",\n position,\n transform(position, past)\n);\n\n// Return\nexport const rehire = process(\n \"rehire\",\n \"Rehire a retired individual\",\n past,\n transform(past, individual)\n);\n","/**\n * Role projection — activating a role loads cognition into context.\n *\n * A role is not a Structure — it is a State (projection).\n * What to load is defined by the upper layer.\n */\nimport { process } from \"@rolexjs/system\";\nimport { individual } from \"./structures.js\";\n\nexport const activate = process(\n \"activate\",\n \"Activate a role — load cognition into context\",\n individual\n);\n"],"mappings":";AAiBA;AAAA,EAEE,UAAAA;AAAA,EACA;AAAA,EAGA,QAAAC;AAAA,EAEA,WAAAC;AAAA,EAIA,YAAAC;AAAA,EACA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ACA;AAAA,EACAE,WAAU,YAAY,IAAI;AAC5B;AACO,IAAM,MAAMF,SAAQ,OAAO,sBAAsB,YAAYE,WAAU,YAAY,IAAI,CAAC;AAGxF,IAAM,UAAUF,SAAQ,WAAW,qBAAqB,SAASE,WAAU,SAAS,IAAI,CAAC;AAGzF,IAAM,WAAWF;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,cAAc,IAAI;AAC9B;AACO,IAAM,UAAUF;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,UAAU,IAAI;AAC1B;AAGO,IAAM,SAASF;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,MAAM,UAAU;AAC5B;;;ACnDA,SAAS,WAAAC,gBAAe;AAGjB,IAAM,WAAWC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AACF;","names":["create","link","process","relation","structure","transform","unlink","process","transform","process","transform","create","process","process","create","create","link","process","unlink","process","link","unlink","create","create","process","transform","process","create","transform","process","process"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/structures.ts","../src/execution.ts","../src/cognition.ts","../src/organization.ts","../src/project.ts","../src/lifecycle.ts","../src/role.ts"],"sourcesContent":["/**\n * @rolexjs/core — RoleX Concept World\n *\n * Domain-specific structures and processes built on @rolexjs/system.\n *\n * Structures — the concept tree (23 concepts, 3 relations)\n * Processes — how the world changes (32 processes, 5 layers)\n *\n * Layer 1: Execution — want, plan, todo, finish, complete, abandon\n * Layer 2: Cognition — reflect, realize, master\n * Layer 3: Organization — hire, fire, appoint, dismiss, charter, charge\n * Layer 3b: Project — enroll, remove, scope, milestone, deliver, wiki\n * Layer 4: Lifecycle — born, found, establish, launch, retire, die, dissolve, abolish, archive, rehire\n * + Role: activate\n */\n\n// Re-export system primitives\nexport {\n type Create,\n create,\n createRuntime,\n type GraphOp,\n type Link,\n link,\n type Process,\n process,\n type Relation,\n type Remove,\n type Runtime,\n relation,\n remove,\n type State,\n type Structure,\n structure,\n type Transform,\n transform,\n type Unlink,\n unlink,\n} from \"@rolexjs/system\";\n\n// Platform\nexport type { ContextData, Platform, PrototypeRegistry, RoleXRepository } from \"./platform.js\";\n\n// ===== Structures =====\n\nexport {\n background,\n // Organization\n charter,\n // Project\n deliverable,\n duty,\n // Individual — Cognition\n encounter,\n experience,\n // Individual — Execution\n goal,\n // Individual — Identity\n identity,\n // Level 1\n individual,\n // Project\n milestone,\n // Individual — Knowledge\n mindset,\n organization,\n past,\n plan,\n position,\n principle,\n procedure,\n // Project\n project,\n // Organization — Position\n requirement,\n // Project\n scope,\n // Level 0\n society,\n task,\n tone,\n // Project\n wiki,\n} from \"./structures.js\";\n\n// ===== Processes — Layer 1: Execution =====\n\nexport { abandon, complete, finish, planGoal, todo, want } from \"./execution.js\";\n\n// ===== Processes — Layer 2: Cognition =====\n\nexport { master, realize, reflect } from \"./cognition.js\";\n\n// ===== Processes — Layer 3: Organization =====\n\nexport { appoint, charge, charterOrg, dismiss, fire, hire } from \"./organization.js\";\n\n// ===== Processes — Layer 3b: Project =====\n\nexport {\n deliverProject,\n enroll,\n milestoneProject,\n removeParticipant,\n scopeProject,\n wikiProject,\n} from \"./project.js\";\n\n// ===== Processes — Layer 4: Lifecycle =====\n\nexport {\n abolish,\n archive,\n born,\n die,\n dissolve,\n establish,\n found,\n launch,\n rehire,\n retire,\n} from \"./lifecycle.js\";\n\n// ===== Role =====\n\nexport { activate } from \"./role.js\";\n","/**\n * RoleX Concept World — all structure definitions.\n *\n * Every node is a Structure — simultaneously concept, container,\n * and information carrier. Tree (parent-child) provides the\n * hierarchical backbone. Relations provide cross-branch links.\n *\n * ┌─────────────────────────────────────────────────────────┐\n * │ society │\n * │ ├── individual \"A single agent in society\" │\n * │ │ ├── identity \"Who I am\" │\n * │ │ │ ├── background \"My personal background\" │\n * │ │ │ ├── tone \"My tone of communication\" │\n * │ │ │ └── mindset \"How I think\" │\n * │ │ ├── encounter \"A specific event I went through\"│\n * │ │ ├── experience \"What I learned from encounters\" │\n * │ │ ├── principle \"My rules of conduct\" │\n * │ │ ├── procedure \"My skill references and metadata\"│\n * │ │ └── goal \"What I am pursuing\" │\n * │ │ └── plan \"How to achieve a goal\" │\n * │ │ └── task \"Concrete unit of work\" │\n * │ ├── organization \"A group of individuals\" │\n * │ │ │ ∿ membership → individual │\n * │ │ └── charter \"The rules and mission\" │\n * │ ├── position \"A role held by an individual\" │\n * │ │ │ ∿ appointment → individual │\n * │ │ └── duty \"Responsibilities of position\" │\n * │ ├── project \"A process container\" │\n * │ │ │ ∿ participation → individual │\n * │ │ │ ∿ ownership → organization │\n * │ │ ├── scope \"Project boundary\" │\n * │ │ ├── milestone \"Key checkpoint\" │\n * │ │ ├── deliverable \"Project output\" │\n * │ │ └── wiki \"Project knowledge base\" │\n * │ └── past \"Things no longer active\" │\n * └─────────────────────────────────────────────────────────┘\n */\nimport { relation, structure } from \"@rolexjs/system\";\n\n// ================================================================\n// Level 0 — Root\n// ================================================================\n\nexport const society = structure(\"society\", \"The RoleX world\", null);\n\n// ================================================================\n// Level 1 — Four pillars\n// ================================================================\n\nexport const individual = structure(\"individual\", \"A single agent in society\", society);\nexport const organization = structure(\"organization\", \"A group of individuals\", society, [\n relation(\"membership\", \"Who belongs to this organization\", individual),\n]);\nexport const past = structure(\"past\", \"Things no longer active\", society);\n\n// ================================================================\n// Individual — Identity\n// ================================================================\n\nexport const identity = structure(\"identity\", \"Who I am\", individual);\nexport const background = structure(\"background\", \"My personal background\", identity);\nexport const tone = structure(\"tone\", \"My tone of communication\", identity);\nexport const mindset = structure(\"mindset\", \"How I think and approach problems\", identity);\n\n// ================================================================\n// Individual — Cognition\n// ================================================================\n\nexport const encounter = structure(\"encounter\", \"A specific event I went through\", individual);\nexport const experience = structure(\"experience\", \"What I learned from encounters\", individual);\n\n// ================================================================\n// Individual — Knowledge\n// ================================================================\n\nexport const principle = structure(\"principle\", \"My rules of conduct\", individual);\nexport const procedure = structure(\"procedure\", \"My skill references and metadata\", individual);\n\n// ================================================================\n// Individual — Execution\n// ================================================================\n\nexport const goal = structure(\"goal\", \"What I am pursuing\", individual);\nexport const plan = structure(\"plan\", \"How to achieve a goal\", goal);\nexport const task = structure(\"task\", \"Concrete unit of work\", plan);\n\n// ================================================================\n// Organization\n// ================================================================\n\nexport const charter = structure(\"charter\", \"The rules and mission\", organization);\n\n// ================================================================\n// Position — independent entity\n// ================================================================\n\nexport const position = structure(\"position\", \"A role held by an individual\", society, [\n relation(\"appointment\", \"Who holds this position\", individual),\n]);\nexport const duty = structure(\"duty\", \"Responsibilities of this position\", position);\nexport const requirement = structure(\"requirement\", \"Required skill for this position\", position);\n\n// ================================================================\n// Project — process management entity\n// ================================================================\n\nexport const project = structure(\"project\", \"A process container for organized work\", society, [\n relation(\"participation\", \"Who participates in this project\", individual),\n relation(\"ownership\", \"Which organization owns this project\", organization),\n]);\nexport const scope = structure(\n \"scope\",\n \"Project boundary — what to do and what not to do\",\n project\n);\nexport const milestone = structure(\n \"milestone\",\n \"Key checkpoint with achievement criteria\",\n project\n);\nexport const deliverable = structure(\"deliverable\", \"Project output and delivery\", project);\nexport const wiki = structure(\"wiki\", \"Project-level knowledge base entry\", project);\n","/**\n * Execution cycle — the doing loop.\n *\n * want → plan → todo → finish → (encounter) → want → ...\n * plan → complete → (encounter)\n * plan → abandon → (encounter)\n *\n * Goals are long-term directions. Plans are the completable unit —\n * they can be completed or abandoned. Tasks finish individually.\n * All transforms produce encounters — feeding the cognition cycle.\n */\nimport { create, process, transform } from \"@rolexjs/system\";\nimport { encounter, goal, individual, plan, task } from \"./structures.js\";\n\nexport const want = process(\"want\", \"Declare a goal\", individual, create(goal));\nexport const planGoal = process(\"plan\", \"Create a plan for a goal\", goal, create(plan));\nexport const todo = process(\"todo\", \"Create a task in a plan\", plan, create(task));\n\nexport const finish = process(\n \"finish\",\n \"Complete a task, record as encounter\",\n task,\n transform(task, encounter)\n);\nexport const complete = process(\n \"complete\",\n \"Complete a plan, record as encounter\",\n plan,\n transform(plan, encounter)\n);\nexport const abandon = process(\n \"abandon\",\n \"Abandon a plan, record as encounter\",\n plan,\n transform(plan, encounter)\n);\n","/**\n * Cognition cycle — the learning loop.\n *\n * encounter → reflect → experience → realize → principle\n * → master → procedure\n *\n * Encounters are raw events (produced by the execution cycle).\n * Reflection distills them into experience. From experience,\n * principles are realized and procedures are mastered.\n */\nimport { process, transform } from \"@rolexjs/system\";\nimport { encounter, experience, principle, procedure } from \"./structures.js\";\n\nexport const reflect = process(\n \"reflect\",\n \"Reflect on encounters, distill into experience\",\n encounter,\n transform(encounter, experience)\n);\nexport const realize = process(\n \"realize\",\n \"Realize a principle from experience\",\n experience,\n transform(experience, principle)\n);\nexport const master = process(\n \"master\",\n \"Master a procedure from experience\",\n experience,\n transform(experience, procedure)\n);\n","/**\n * Organization management — hiring, firing, and structuring.\n *\n * hire / fire — membership (who belongs)\n * appoint / dismiss — appointment (who holds a position)\n * charter — define org rules and mission\n * charge — add duties to a position\n */\nimport { create, link, process, unlink } from \"@rolexjs/system\";\nimport { charter, duty, organization, position } from \"./structures.js\";\n\n// Membership\nexport const hire = process(\n \"hire\",\n \"Hire an individual into the organization\",\n organization,\n link(organization, \"membership\")\n);\nexport const fire = process(\n \"fire\",\n \"Fire an individual from the organization\",\n organization,\n unlink(organization, \"membership\")\n);\n\n// Appointment\nexport const appoint = process(\n \"appoint\",\n \"Appoint a member to a position\",\n position,\n link(position, \"appointment\")\n);\nexport const dismiss = process(\n \"dismiss\",\n \"Dismiss from a position\",\n position,\n unlink(position, \"appointment\")\n);\n\n// Structure\nexport const charterOrg = process(\n \"charter\",\n \"Define the charter for an organization\",\n organization,\n create(charter)\n);\nexport const charge = process(\"charge\", \"Add a duty to a position\", position, create(duty));\n","/**\n * Project management — scoping, milestones, enrollment, deliverables, wiki.\n *\n * enroll / remove — participation (who is involved)\n * scope — define project boundary\n * milestone — add checkpoint\n * deliver — add deliverable\n * wiki — add knowledge entry\n */\nimport { create, link, process, unlink } from \"@rolexjs/system\";\nimport { deliverable, milestone, project, scope, wiki } from \"./structures.js\";\n\n// Participation\nexport const enroll = process(\n \"enroll\",\n \"Enroll an individual into the project\",\n project,\n link(project, \"participation\")\n);\nexport const removeParticipant = process(\n \"remove\",\n \"Remove an individual from the project\",\n project,\n unlink(project, \"participation\")\n);\n\n// Structure\nexport const scopeProject = process(\n \"scope\",\n \"Define the scope for a project\",\n project,\n create(scope)\n);\nexport const milestoneProject = process(\n \"milestone\",\n \"Add a milestone to a project\",\n project,\n create(milestone)\n);\nexport const deliverProject = process(\n \"deliver\",\n \"Add a deliverable to a project\",\n project,\n create(deliverable)\n);\nexport const wikiProject = process(\"wiki\", \"Add a wiki entry to a project\", project, create(wiki));\n","/**\n * Lifecycle — creation, retirement, and dissolution.\n *\n * born / found / establish — bring things into existence\n * retire / die — individual → past\n * dissolve — organization → past\n * abolish — position → past\n * rehire — past → individual (return from retirement)\n *\n * No real deletion — everything transforms to the \"past\" branch.\n */\nimport { create, process, transform } from \"@rolexjs/system\";\nimport { individual, organization, past, position, project, society } from \"./structures.js\";\n\n// Creation\nexport const born = process(\n \"born\",\n \"An individual is born into society\",\n society,\n create(individual)\n);\nexport const found = process(\"found\", \"Found an organization\", society, create(organization));\nexport const establish = process(\"establish\", \"Establish a position\", society, create(position));\nexport const launch = process(\"launch\", \"Launch a project\", society, create(project));\n\n// Retirement & death\nexport const retire = process(\n \"retire\",\n \"Retire an individual\",\n individual,\n transform(individual, past)\n);\nexport const die = process(\"die\", \"An individual dies\", individual, transform(individual, past));\n\n// Archive project\nexport const archive = process(\"archive\", \"Archive a project\", project, transform(project, past));\n\n// Dissolution\nexport const dissolve = process(\n \"dissolve\",\n \"Dissolve an organization\",\n organization,\n transform(organization, past)\n);\nexport const abolish = process(\n \"abolish\",\n \"Abolish a position\",\n position,\n transform(position, past)\n);\n\n// Return\nexport const rehire = process(\n \"rehire\",\n \"Rehire a retired individual\",\n past,\n transform(past, individual)\n);\n","/**\n * Role projection — activating a role loads cognition into context.\n *\n * A role is not a Structure — it is a State (projection).\n * What to load is defined by the upper layer.\n */\nimport { process } from \"@rolexjs/system\";\nimport { individual } from \"./structures.js\";\n\nexport const activate = process(\n \"activate\",\n \"Activate a role — load cognition into context\",\n individual\n);\n"],"mappings":";AAiBA;AAAA,EAEE,UAAAA;AAAA,EACA;AAAA,EAGA,QAAAC;AAAA,EAEA,WAAAC;AAAA,EAIA,YAAAC;AAAA,EACA;AAAA,EAGA,aAAAC;AAAA,EAEA,aAAAC;AAAA,EAEA,UAAAC;AAAA,OACK;;;ACDP,SAAS,UAAU,iBAAiB;AAM7B,IAAM,UAAU,UAAU,WAAW,mBAAmB,IAAI;AAM5D,IAAM,aAAa,UAAU,cAAc,6BAA6B,OAAO;AAC/E,IAAM,eAAe,UAAU,gBAAgB,0BAA0B,SAAS;AAAA,EACvF,SAAS,cAAc,oCAAoC,UAAU;AACvE,CAAC;AACM,IAAM,OAAO,UAAU,QAAQ,2BAA2B,OAAO;AAMjE,IAAM,WAAW,UAAU,YAAY,YAAY,UAAU;AAC7D,IAAM,aAAa,UAAU,cAAc,0BAA0B,QAAQ;AAC7E,IAAM,OAAO,UAAU,QAAQ,4BAA4B,QAAQ;AACnE,IAAM,UAAU,UAAU,WAAW,qCAAqC,QAAQ;AAMlF,IAAM,YAAY,UAAU,aAAa,mCAAmC,UAAU;AACtF,IAAM,aAAa,UAAU,cAAc,kCAAkC,UAAU;AAMvF,IAAM,YAAY,UAAU,aAAa,uBAAuB,UAAU;AAC1E,IAAM,YAAY,UAAU,aAAa,oCAAoC,UAAU;AAMvF,IAAM,OAAO,UAAU,QAAQ,sBAAsB,UAAU;AAC/D,IAAM,OAAO,UAAU,QAAQ,yBAAyB,IAAI;AAC5D,IAAM,OAAO,UAAU,QAAQ,yBAAyB,IAAI;AAM5D,IAAM,UAAU,UAAU,WAAW,yBAAyB,YAAY;AAM1E,IAAM,WAAW,UAAU,YAAY,gCAAgC,SAAS;AAAA,EACrF,SAAS,eAAe,2BAA2B,UAAU;AAC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B;AAAA,EACA;AAAA,EACA;AAAA,EACAC,QAAO,UAAU;AACnB;AACO,IAAM,QAAQD,SAAQ,SAAS,yBAAyB,SAASC,QAAO,YAAY,CAAC;AACrF,IAAM,YAAYD,SAAQ,aAAa,wBAAwB,SAASC,QAAO,QAAQ,CAAC;AACxF,IAAM,SAASD,SAAQ,UAAU,oBAAoB,SAASC,QAAO,OAAO,CAAC;AAG7E,IAAM,SAASD;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,YAAY,IAAI;AAC5B;AACO,IAAM,MAAMF,SAAQ,OAAO,sBAAsB,YAAYE,WAAU,YAAY,IAAI,CAAC;AAGxF,IAAM,UAAUF,SAAQ,WAAW,qBAAqB,SAASE,WAAU,SAAS,IAAI,CAAC;AAGzF,IAAM,WAAWF;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,cAAc,IAAI;AAC9B;AACO,IAAM,UAAUF;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,UAAU,IAAI;AAC1B;AAGO,IAAM,SAASF;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACAE,WAAU,MAAM,UAAU;AAC5B;;;ACnDA,SAAS,WAAAC,gBAAe;AAGjB,IAAM,WAAWC;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AACF;","names":["create","link","process","relation","structure","transform","unlink","process","transform","process","transform","create","process","process","create","create","link","process","unlink","process","link","unlink","create","create","process","transform","process","create","transform","process","process"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolexjs/core",
3
- "version": "1.2.1",
3
+ "version": "1.3.1-dev-20260304121217",
4
4
  "description": "RoleX Core - AI Agent Role Management Framework",
5
5
  "keywords": [
6
6
  "rolex",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@issuexjs/core": "^0.2.0",
42
- "@rolexjs/system": "^1.2.1",
42
+ "@rolexjs/system": "1.3.1-dev-20260304121217",
43
43
  "@resourcexjs/core": "^2.14.0"
44
44
  },
45
45
  "devDependencies": {},