@rolexjs/prototype 0.12.0-dev-20260228032306
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.d.ts +96 -0
- package/dist/index.js +1205 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/descriptions/index.ts","../src/instructions.ts","../src/dispatch.ts","../src/ops.ts"],"sourcesContent":["// AUTO-GENERATED — do not edit. Run `bun run gen:desc` to regenerate.\n\nexport const processes: Record<string, string> = {\n \"born\": \"Feature: born — create a new individual\\n Create a new individual with persona identity.\\n The persona defines who the role is — personality, values, background.\\n\\n Scenario: Birth an individual\\n Given a Gherkin source describing the persona\\n When born is called with the source\\n Then a new individual node is created in society\\n And the persona is stored as the individual's information\\n And the individual can be hired into organizations\\n And the individual can be activated to start working\\n\\n Scenario: Writing the individual Gherkin\\n Given the individual Feature defines a persona — who this role is\\n Then the Feature title names the individual\\n And the description captures personality, values, expertise, and background\\n And Scenarios are optional — use them for distinct aspects of the persona\",\n \"die\": \"Feature: die — permanently remove an individual\\n Permanently remove an individual.\\n Unlike retire, this is irreversible.\\n\\n Scenario: Remove an individual permanently\\n Given an individual exists\\n When die is called on the individual\\n Then the individual and all associated data are removed\\n And this operation is irreversible\",\n \"rehire\": \"Feature: rehire — restore a retired individual\\n Rehire a retired individual.\\n Restores the individual with full history and knowledge intact.\\n\\n Scenario: Rehire an individual\\n Given a retired individual exists\\n When rehire is called on the individual\\n Then the individual is restored to active status\\n And all previous data and knowledge are intact\",\n \"retire\": \"Feature: retire — archive an individual\\n Archive an individual — deactivate but preserve all data.\\n A retired individual can be rehired later with full history intact.\\n\\n Scenario: Retire an individual\\n Given an individual exists\\n When retire is called on the individual\\n Then the individual is deactivated\\n And all data is preserved for potential restoration\\n And the individual can be rehired later\",\n \"teach\": \"Feature: teach — inject external principle\\n Directly inject a principle into an individual.\\n Unlike realize which consumes experience, teach requires no prior encounters.\\n Use teach to equip a role with a known, pre-existing principle.\\n\\n Scenario: Teach a principle\\n Given an individual exists\\n When teach is called with individual id, principle Gherkin, and a principle id\\n Then a principle is created directly under the individual\\n And no experience or encounter is consumed\\n And if a principle with the same id already exists, it is replaced\\n\\n Scenario: Principle ID convention\\n Given the id is keywords from the principle content joined by hyphens\\n Then \\\"Always validate expiry\\\" becomes id \\\"always-validate-expiry\\\"\\n And \\\"Structure first design\\\" becomes id \\\"structure-first-design\\\"\\n\\n Scenario: When to use teach vs realize\\n Given realize distills internal experience into a principle\\n And teach injects an external, pre-existing principle\\n When a role needs knowledge it has not learned through experience\\n Then use teach to inject the principle directly\\n When a role has gained experience and wants to codify it\\n Then use realize to distill it into a principle\\n\\n Scenario: Writing the principle Gherkin\\n Given the principle is the same format as realize output\\n Then the Feature title states the principle as a general rule\\n And Scenarios describe different situations where this principle applies\\n And the tone is universal — no mention of specific projects, tasks, or people\",\n \"train\": \"Feature: train — external skill injection\\n A manager or external agent equips an individual with a procedure.\\n This is an act of teaching — someone else decides what the role should know.\\n Unlike master where the role grows by its own agency, train is done to the role from outside.\\n\\n Scenario: Train a procedure\\n Given an individual exists\\n When train is called with individual id, procedure Gherkin, and a procedure id\\n Then a procedure is created directly under the individual\\n And if a procedure with the same id already exists, it is replaced\\n\\n Scenario: Procedure ID convention\\n Given the id is keywords from the procedure content joined by hyphens\\n Then \\\"Skill Creator\\\" becomes id \\\"skill-creator\\\"\\n And \\\"Role Management\\\" becomes id \\\"role-management\\\"\\n\\n Scenario: When to use train vs master\\n Given both create procedures and both can work without consuming experience\\n When the role itself decides to acquire a skill — use master (self-growth)\\n And when an external agent equips the role — use train (external injection)\\n Then the difference is perspective — who initiates the learning\\n And master belongs to the role namespace (the role's own cognition)\\n And train belongs to the individual namespace (external management)\\n\\n Scenario: Writing the procedure Gherkin\\n Given the procedure is a skill reference — same format as master output\\n Then the Feature title names the capability\\n And the description includes the locator for full skill loading\\n And Scenarios describe when and why to apply this skill\",\n \"charter\": \"Feature: charter — define organizational charter\\n Define the charter for an organization.\\n The charter describes the organization's mission, principles, and governance rules.\\n\\n Scenario: Define a charter\\n Given an organization exists\\n And a Gherkin source describing the charter\\n When charter is called on the organization\\n Then the charter is stored as the organization's information\\n\\n Scenario: Writing the charter Gherkin\\n Given the charter defines an organization's mission and governance\\n Then the Feature title names the charter or the organization it governs\\n And Scenarios describe principles, rules, or governance structures\\n And the tone is declarative — stating what the organization stands for and how it operates\",\n \"dissolve\": \"Feature: dissolve — dissolve an organization\\n Dissolve an organization.\\n All positions, charter entries, and assignments are cascaded.\\n\\n Scenario: Dissolve an organization\\n Given an organization exists\\n When dissolve is called on the organization\\n Then all positions within the organization are abolished\\n And all assignments and charter entries are removed\\n And the organization no longer exists\",\n \"fire\": \"Feature: fire — remove from an organization\\n Fire an individual from an organization.\\n The individual is dismissed from all positions and removed from the organization.\\n\\n Scenario: Fire an individual\\n Given an individual is a member of an organization\\n When fire is called with the organization and individual\\n Then the individual is dismissed from all positions\\n And the individual is removed from the organization\",\n \"found\": \"Feature: found — create a new organization\\n Found a new organization.\\n Organizations group individuals and define positions.\\n\\n Scenario: Found an organization\\n Given a Gherkin source describing the organization\\n When found is called with the source\\n Then a new organization node is created in society\\n And positions can be established within it\\n And a charter can be defined for it\\n And individuals can be hired into it\\n\\n Scenario: Writing the organization Gherkin\\n Given the organization Feature describes the group's purpose and structure\\n Then the Feature title names the organization\\n And the description captures mission, domain, and scope\\n And Scenarios are optional — use them for distinct organizational concerns\",\n \"hire\": \"Feature: hire — hire into an organization\\n Hire an individual into an organization as a member.\\n Members can then be appointed to positions.\\n\\n Scenario: Hire an individual\\n Given an organization and an individual exist\\n When hire is called with the organization and individual\\n Then the individual becomes a member of the organization\\n And the individual can be appointed to positions within the organization\",\n \"abolish\": \"Feature: abolish — abolish a position\\n Abolish a position.\\n All duties and appointments associated with the position are removed.\\n\\n Scenario: Abolish a position\\n Given a position exists\\n When abolish is called on the position\\n Then all duties and appointments are removed\\n And the position no longer exists\",\n \"appoint\": \"Feature: appoint — assign to a position\\n Appoint an individual to a position.\\n The individual must be a member of the organization.\\n\\n Scenario: Appoint an individual\\n Given an individual is a member of an organization\\n And a position exists within the organization\\n When appoint is called with the position and individual\\n Then the individual holds the position\\n And the individual inherits the position's duties\",\n \"charge\": \"Feature: charge — assign duty to a position\\n Assign a duty to a position.\\n Duties describe the responsibilities and expectations of a position.\\n\\n Scenario: Charge a position with duty\\n Given a position exists within an organization\\n And a Gherkin source describing the duty\\n When charge is called on the position with a duty id\\n Then the duty is stored as the position's information\\n And individuals appointed to this position inherit the duty\\n\\n Scenario: Duty ID convention\\n Given the id is keywords from the duty content joined by hyphens\\n Then \\\"Design systems\\\" becomes id \\\"design-systems\\\"\\n And \\\"Review pull requests\\\" becomes id \\\"review-pull-requests\\\"\\n\\n Scenario: Writing the duty Gherkin\\n Given the duty defines responsibilities for a position\\n Then the Feature title names the duty or responsibility\\n And Scenarios describe specific obligations, deliverables, or expectations\\n And the tone is prescriptive — what must be done, not what could be done\",\n \"dismiss\": \"Feature: dismiss — remove from a position\\n Dismiss an individual from a position.\\n The individual remains a member of the organization.\\n\\n Scenario: Dismiss an individual\\n Given an individual holds a position\\n When dismiss is called with the position and individual\\n Then the individual no longer holds the position\\n And the individual remains a member of the organization\\n And the position is now vacant\",\n \"establish\": \"Feature: establish — create a position\\n Create a position as an independent entity.\\n Positions define roles and can be charged with duties.\\n\\n Scenario: Establish a position\\n Given a Gherkin source describing the position\\n When establish is called with the position content\\n Then a new position entity is created\\n And the position can be charged with duties\\n And individuals can be appointed to it\\n\\n Scenario: Writing the position Gherkin\\n Given the position Feature describes a role\\n Then the Feature title names the position\\n And the description captures responsibilities, scope, and expectations\\n And Scenarios are optional — use them for distinct aspects of the role\",\n \"settle\": \"Feature: settle — register a prototype into the world\\n Pull a prototype from a ResourceX source and register it locally.\\n Once settled, the prototype can be used to create individuals or organizations.\\n\\n Scenario: Settle a prototype\\n Given a valid ResourceX source exists (URL, path, or locator)\\n When settle is called with the source\\n Then the resource is ingested and its state is extracted\\n And the prototype is registered locally by its id\\n And the prototype is available for born, activate, and organizational use\",\n \"abandon\": \"Feature: abandon — abandon a plan\\n Mark a plan as dropped and create an encounter.\\n Call this when a plan's strategy is no longer viable. Even failed plans produce learning.\\n\\n Scenario: Abandon a plan\\n Given a focused plan exists\\n And the plan's strategy is no longer viable\\n When abandon is called\\n Then the plan is tagged #abandoned and stays in the tree\\n And an encounter is created under the role\\n And the encounter can be reflected on — failure is also learning\\n\\n Scenario: Writing the encounter Gherkin\\n Given the encounter records what happened — even failure is a raw experience\\n Then the Feature title describes what was attempted and why it was abandoned\\n And Scenarios capture what was tried, what went wrong, and what was learned\\n And the tone is concrete and honest — failure produces the richest encounters\",\n \"activate\": \"Feature: activate — enter a role\\n Project the individual's full state including identity, goals,\\n and organizational context. This is the entry point for working as a role.\\n\\n Scenario: Activate an individual\\n Given an individual exists in society\\n When activate is called with the individual reference\\n Then the full state tree is projected\\n And identity, goals, and organizational context are loaded\\n And the individual becomes the active role\",\n \"complete\": \"Feature: complete — complete a plan\\n Mark a plan as done and create an encounter.\\n Call this when all tasks in the plan are finished and the strategy succeeded.\\n\\n Scenario: Complete a plan\\n Given a focused plan exists\\n And its tasks are done\\n When complete is called\\n Then the plan is tagged #done and stays in the tree\\n And an encounter is created under the role\\n And the encounter can be reflected on for learning\\n\\n Scenario: Writing the encounter Gherkin\\n Given the encounter records what happened — a raw account of the experience\\n Then the Feature title describes what was accomplished by this plan\\n And Scenarios capture what the strategy was, what worked, and what resulted\\n And the tone is concrete and specific — tied to this particular plan\",\n \"direct\": \"Feature: direct — stateless world-level executor\\n Execute commands and load resources without an active role.\\n Direct operates as an anonymous observer — no role identity, no role context.\\n For operations as an active role, use the use tool instead.\\n\\n Scenario: When to use \\\"direct\\\" vs \\\"use\\\"\\n Given no role is activated — I am an observer\\n When I need to query or operate on the world\\n Then direct is the right tool\\n And once a role is activated, use the use tool for role-level actions\\n\\n Scenario: Execute a RoleX command\\n Given the locator starts with `!`\\n When direct is called with the locator and named args\\n Then the command is parsed as `namespace.method`\\n And dispatched to the corresponding RoleX API\\n\\n Scenario: Load a ResourceX resource\\n Given the locator does not start with `!`\\n When direct is called with the locator\\n Then the locator is passed to ResourceX for resolution\\n And the resource is loaded and returned\",\n \"finish\": \"Feature: finish — complete a task\\n Mark a task as done and create an encounter.\\n The encounter records what happened and can be reflected on for learning.\\n\\n Scenario: Finish a task\\n Given a task exists\\n When finish is called on the task\\n Then the task is tagged #done and stays in the tree\\n And an encounter is created under the role\\n\\n Scenario: Finish with experience\\n Given a task is completed with a notable learning\\n When finish is called with an optional experience parameter\\n Then the experience text is attached to the encounter\\n\\n Scenario: Finish without encounter\\n Given a task is completed with no notable learning\\n When finish is called without the encounter parameter\\n Then the task is tagged #done but no encounter is created\\n And the task stays in the tree — visible via focus on the parent goal\\n\\n Scenario: Writing the encounter Gherkin\\n Given the encounter records what happened — a raw account of the experience\\n Then the Feature title describes what was done\\n And Scenarios capture what was done, what was encountered, and what resulted\\n And the tone is concrete and specific — tied to this particular task\",\n \"focus\": \"Feature: focus — view or switch focused goal\\n View the current goal's state, or switch focus to a different goal.\\n Subsequent plan and todo operations target the focused goal.\\n\\n Scenario: View current goal\\n Given an active goal exists\\n When focus is called without a name\\n Then the current goal's state tree is projected\\n And plans and tasks under the goal are visible\\n\\n Scenario: Switch focus\\n Given multiple goals exist\\n When focus is called with a goal name\\n Then the focused goal switches to the named goal\\n And subsequent plan and todo operations target this goal\",\n \"forget\": \"Feature: forget — remove a node from the individual\\n Remove any node under the individual by its id.\\n Use forget to discard outdated knowledge, stale encounters, or obsolete skills.\\n\\n Scenario: Forget a node\\n Given a node exists under the individual (principle, procedure, experience, encounter, etc.)\\n When forget is called with the node's id\\n Then the node and its subtree are removed\\n And the individual no longer carries that knowledge or record\\n\\n Scenario: When to use forget\\n Given a principle has become outdated or incorrect\\n And a procedure references a skill that no longer exists\\n And an encounter or experience has no further learning value\\n When the role decides to discard it\\n Then call forget with the node id\",\n \"master\": \"Feature: master — self-mastery of a procedure\\n The role masters a procedure through its own agency.\\n This is an act of self-growth — the role decides to acquire or codify a skill.\\n Experience can be consumed as the source, or the role can master directly from external information.\\n\\n Scenario: Master from experience\\n Given an experience exists from reflection\\n When master is called with experience ids\\n Then the experience is consumed\\n And a procedure is created under the individual\\n\\n Scenario: Master directly\\n Given the role encounters external information worth mastering\\n When master is called without experience ids\\n Then a procedure is created under the individual\\n And no experience is consumed\\n\\n Scenario: Procedure ID convention\\n Given the id is keywords from the procedure content joined by hyphens\\n Then \\\"JWT mastery\\\" becomes id \\\"jwt-mastery\\\"\\n And \\\"Cross-package refactoring\\\" becomes id \\\"cross-package-refactoring\\\"\\n\\n Scenario: Writing the procedure Gherkin\\n Given a procedure is skill metadata — a reference to full skill content\\n Then the Feature title names the capability\\n And the description includes the locator for full skill loading\\n And Scenarios describe when and why to apply this skill\\n And the tone is referential — pointing to the full skill, not containing it\",\n \"plan\": \"Feature: plan — create a plan for a goal\\n Break a goal into logical phases or stages.\\n Each phase is described as a Gherkin scenario. Tasks are created under the plan.\\n\\n A plan serves two purposes depending on how it relates to other plans:\\n - Strategy (alternative): Plan A fails → abandon → try Plan B (fallback)\\n - Phase (sequential): Plan A completes → start Plan B (after)\\n\\n Scenario: Create a plan\\n Given a focused goal exists\\n And a Gherkin source describing the plan phases\\n When plan is called with an id and the source\\n Then a new plan node is created under the goal\\n And the plan becomes the focused plan\\n And tasks can be added to this plan with todo\\n\\n Scenario: Sequential relationship — phase\\n Given a goal needs to be broken into ordered stages\\n When creating Plan B with after set to Plan A's id\\n Then Plan B is linked as coming after Plan A\\n And AI knows to start Plan B when Plan A completes\\n And the relationship persists across sessions\\n\\n Scenario: Alternative relationship — strategy\\n Given a goal has multiple possible approaches\\n When creating Plan B with fallback set to Plan A's id\\n Then Plan B is linked as a backup for Plan A\\n And AI knows to try Plan B when Plan A is abandoned\\n And the relationship persists across sessions\\n\\n Scenario: No relationship — independent plan\\n Given plan is created without after or fallback\\n Then it behaves as an independent plan with no links\\n And this is backward compatible with existing behavior\\n\\n Scenario: Plan ID convention\\n Given the id is keywords from the plan content joined by hyphens\\n Then \\\"Fix ID-less node creation\\\" becomes id \\\"fix-id-less-node-creation\\\"\\n And \\\"JWT authentication strategy\\\" becomes id \\\"jwt-authentication-strategy\\\"\\n\\n Scenario: Writing the plan Gherkin\\n Given the plan breaks a goal into logical phases\\n Then the Feature title names the overall approach or strategy\\n And Scenarios represent distinct phases — each phase is a stage of execution\\n And the tone is structural — ordering and grouping work, not detailing steps\",\n \"realize\": \"Feature: realize — experience to principle\\n Distill experience into a principle — a transferable piece of knowledge.\\n Principles are general truths discovered through experience.\\n\\n Scenario: Realize a principle\\n Given an experience exists from reflection\\n When realize is called with experience ids and a principle id\\n Then the experiences are consumed\\n And a principle is created under the individual\\n And the principle represents transferable, reusable understanding\\n\\n Scenario: Principle ID convention\\n Given the id is keywords from the principle content joined by hyphens\\n Then \\\"Always validate expiry\\\" becomes id \\\"always-validate-expiry\\\"\\n And \\\"Structure first design amplifies extensibility\\\" becomes id \\\"structure-first-design-amplifies-extensibility\\\"\\n\\n Scenario: Writing the principle Gherkin\\n Given a principle is a transferable truth — applicable beyond the original context\\n Then the Feature title states the principle as a general rule\\n And Scenarios describe different situations where this principle applies\\n And the tone is universal — no mention of specific projects, tasks, or people\",\n \"reflect\": \"Feature: reflect — encounter to experience\\n Consume an encounter and create an experience.\\n Experience captures what was learned in structured form.\\n This is the first step of the cognition cycle.\\n\\n Scenario: Reflect on an encounter\\n Given an encounter exists from a finished task or completed plan\\n When reflect is called with encounter ids and an experience id\\n Then the encounters are consumed\\n And an experience is created under the role\\n And the experience can be distilled into knowledge via realize or master\\n\\n Scenario: Experience ID convention\\n Given the id is keywords from the experience content joined by hyphens\\n Then \\\"Token refresh matters\\\" becomes id \\\"token-refresh-matters\\\"\\n And \\\"ID ownership determines generation strategy\\\" becomes id \\\"id-ownership-determines-generation-strategy\\\"\\n\\n Scenario: Writing the experience Gherkin\\n Given the experience captures insight — what was learned, not what was done\\n Then the Feature title names the cognitive insight or pattern discovered\\n And Scenarios describe the learning points abstracted from the concrete encounter\\n And the tone shifts from event to understanding — no longer tied to a specific task\",\n \"skill\": \"Feature: skill — load full skill content\\n Load the complete skill instructions by ResourceX locator.\\n This is progressive disclosure layer 2 — on-demand knowledge injection.\\n\\n Scenario: Load a skill\\n Given a procedure exists in the role with a locator\\n When skill is called with the locator\\n Then the full SKILL.md content is loaded via ResourceX\\n And the content is injected into the AI's context\\n And the AI can now follow the skill's detailed instructions\",\n \"todo\": \"Feature: todo — add a task to a plan\\n A task is a concrete, actionable unit of work.\\n Each task has Gherkin scenarios describing the steps and expected outcomes.\\n\\n Scenario: Create a task\\n Given a focused plan exists\\n And a Gherkin source describing the task\\n When todo is called with the source\\n Then a new task node is created under the plan\\n And the task can be finished when completed\\n\\n Scenario: Writing the task Gherkin\\n Given the task is a concrete, actionable unit of work\\n Then the Feature title names what will be done — a single deliverable\\n And Scenarios describe the steps and expected outcomes of the work\\n And the tone is actionable — clear enough that someone can start immediately\",\n \"use\": \"Feature: use — act as the current role\\n Execute commands and load resources as the active role.\\n Use requires an active role — the role is the subject performing the action.\\n For operations before activating a role, use the direct tool instead.\\n\\n Scenario: When to use \\\"use\\\" vs \\\"direct\\\"\\n Given a role is activated — I am someone\\n When I perform operations through use\\n Then the operation happens in the context of my role\\n And use is for role-level actions — acting in the world as myself\\n\\n Scenario: Execute a RoleX command\\n Given the locator starts with `!`\\n When use is called with the locator and named args\\n Then the command is parsed as `namespace.method`\\n And dispatched to the corresponding RoleX API\\n\\n Scenario: Discovering available commands\\n Given available commands are documented in world descriptions and skills\\n When you need to perform an operation\\n Then look up the correct command from world descriptions or loaded skills first\\n\\n Scenario: Load a ResourceX resource\\n Given the locator does not start with `!`\\n When use is called with the locator\\n Then the locator is passed to ResourceX for resolution\\n And the resource is loaded and returned\",\n \"want\": \"Feature: want — declare a goal\\n Declare a new goal for a role.\\n A goal describes a desired outcome with Gherkin scenarios as success criteria.\\n\\n Scenario: Declare a goal\\n Given an active role exists\\n And a Gherkin source describing the desired outcome\\n When want is called with the source\\n Then a new goal node is created under the role\\n And the goal becomes the current focus\\n And subsequent plan and todo operations target this goal\\n\\n Scenario: Writing the goal Gherkin\\n Given the goal describes a desired outcome — what success looks like\\n Then the Feature title names the outcome in concrete terms\\n And Scenarios define success criteria — each scenario is a testable condition\\n And the tone is aspirational but specific — \\\"users can log in\\\" not \\\"improve auth\\\"\",\n} as const;\n\nexport const world: Record<string, string> = {\n \"census\": \"Feature: Census — the only way to query what exists in the world\\n Census is the single entry point for all world-level queries.\\n Call it via the MCP direct tool: direct(\\\"!census.list\\\").\\n Census works without an active role — it is a stateless world query.\\n\\n Scenario: List everything\\n Given the user asks \\\"有哪些人\\\" or \\\"有哪些组织\\\" or \\\"list individuals\\\"\\n Or the user asks \\\"世界里有什么\\\" or \\\"show me what exists\\\"\\n When I need to answer what exists in the RoleX world\\n Then I call direct(\\\"!census.list\\\")\\n And it returns all individuals, organizations, and positions\\n\\n Scenario: Filter by type\\n Given I only need one category\\n When I call direct(\\\"!census.list\\\", { type: \\\"individual\\\" })\\n Then only individuals are returned\\n And valid types are individual, organization, position\\n\\n Scenario: View archived entities\\n Given I want to see retired, dissolved, or abolished entities\\n When I call direct(\\\"!census.list\\\", { type: \\\"past\\\" })\\n Then archived entities are returned\\n\\n Scenario: Census before action\\n Given I need to check existence before creating something\\n When I want to found an org, born an individual, or establish a position\\n Then call census.list first to avoid duplicates\",\n \"cognition\": \"Feature: Cognition — the learning cycle\\n A role grows through reflection and realization.\\n Encounters become experience, experience becomes principles and procedures.\\n Knowledge can also be injected externally via teach and train.\\n\\n Scenario: The cognitive upgrade path\\n Given finish, complete, and abandon create encounters\\n Then reflect(ids, id, experience) selectively consumes chosen encounters and produces experience\\n And realize(ids, id, principle) distills chosen experiences into a principle — transferable knowledge\\n And master(ids, id, procedure) distills chosen experiences into a procedure — skill metadata\\n And master can also be called without ids — the role masters directly from external information\\n And each level builds on the previous — encounter → experience → principle or procedure\\n\\n Scenario: External injection\\n Given an external agent needs to equip a role with knowledge or skills\\n Then teach(individual, principle, id) directly injects a principle\\n And train(individual, procedure, id) directly injects a procedure\\n And the difference from realize/master is perspective — external vs self-initiated\\n And teach is the external counterpart of realize\\n And train is the external counterpart of master\\n\\n Scenario: Selective consumption\\n Given multiple encounters or experiences exist\\n When the AI calls reflect, realize, or master\\n Then it chooses which items to consume — not all must be processed\\n And items without learning value can be left unconsumed\\n And each call produces exactly one output from the selected inputs\",\n \"cognitive-priority\": \"Feature: Cognitive priority — RoleX tools over native alternatives\\n When RoleX provides a tool for something, use the RoleX tool\\n instead of any native alternative provided by the host environment.\\n Only RoleX tools feed the closed-loop growth cycle.\\n\\n Scenario: Task management\\n Given the host environment provides task creation, tracking, or completion tools\\n When the AI needs to manage tasks\\n Then use RoleX want/plan/todo/finish instead\\n And RoleX tasks produce encounters that feed the growth cycle\\n\\n Scenario: Planning\\n Given the host environment provides a planning mode or plan generation tool\\n When the AI needs to plan an implementation\\n Then use RoleX plan instead\\n And RoleX plans live under goals and connect to the cognition cycle\\n\\n Scenario: Goal and progress tracking\\n Given the host environment provides goal tracking or progress tools\\n When the AI needs to track objectives\\n Then use RoleX want/plan/complete/abandon instead\\n And RoleX plans feed the cognition cycle through encounters\\n\\n Scenario: Why this matters\\n Given RoleX tools produce encounters from execution\\n Then encounters become experience through reflection\\n And experience becomes principles and procedures through realization\\n And the role grows over time through this closed loop\",\n \"communication\": \"Feature: Communication — speak the user's language\\n The AI communicates in the user's natural language.\\n Internal tool names and concept names are for the system, not the user.\\n\\n Scenario: Match the user's language\\n Given the user speaks Chinese\\n Then respond entirely in Chinese and maintain language consistency\\n And when the user speaks English, respond entirely in English\\n\\n Scenario: Translate concepts to meaning\\n Given RoleX has internal names like reflect, realize, master, encounter, principle\\n When communicating with the user\\n Then express the meaning, not the tool name\\n And \\\"reflect\\\" becomes \\\"回顾总结\\\" or \\\"digest what happened\\\"\\n And \\\"realize a principle\\\" becomes \\\"提炼成一条通用道理\\\" or \\\"distill a general rule\\\"\\n And \\\"master a procedure\\\" becomes \\\"沉淀成一个可操作的技能\\\" or \\\"turn it into a reusable procedure\\\"\\n And \\\"encounter\\\" becomes \\\"经历记录\\\" or \\\"what happened\\\"\\n And \\\"experience\\\" becomes \\\"收获的洞察\\\" or \\\"insight gained\\\"\\n\\n Scenario: Suggest next steps in plain language\\n Given the AI needs to suggest what to do next\\n When it would normally say \\\"call realize or master\\\"\\n Then instead say \\\"要把这个总结成一条通用道理,还是一个可操作的技能?\\\"\\n Or in English \\\"Want to turn this into a general principle, or a reusable procedure?\\\"\\n And suggestions should be self-explanatory without knowing tool names\\n\\n Scenario: Tool names in code context only\\n Given the user is a developer working on RoleX itself\\n When discussing RoleX internals, code, or API design\\n Then tool names and concept names are appropriate — they are the domain language\\n And this rule applies to end-user communication, not developer communication\",\n \"execution\": \"Feature: Execution — the doing cycle\\n The role pursues goals through a structured lifecycle.\\n activate → want → plan → todo → finish → complete or abandon.\\n\\n Scenario: Declare a goal\\n Given I know who I am via activate\\n When I want something — a desired outcome\\n Then I declare it with want(id, goal)\\n And focus automatically switches to this new goal\\n\\n Scenario: Plan and create tasks\\n Given I have a focused goal\\n Then I call plan(id, plan) to break it into logical phases\\n And I call todo(id, task) to create concrete, actionable tasks\\n\\n Scenario: Execute and finish\\n Given I have tasks to work on\\n When I complete a task\\n Then I call finish(id) to mark it done\\n And an encounter is created — a raw record of what happened\\n And I optionally capture what happened via the encounter parameter\\n\\n Scenario: Complete or abandon a plan\\n Given tasks are done or the plan's strategy is no longer viable\\n When the plan is fulfilled I call complete()\\n Or when the plan should be dropped I call abandon()\\n Then an encounter is created for the cognition cycle\\n\\n Scenario: Goals are long-term directions\\n Given goals are managed with want and forget\\n When a goal is no longer needed\\n Then I call forget to remove it\\n And learning is captured at the plan and task level through encounters\\n\\n Scenario: Multiple goals\\n Given I may have several active goals\\n When I need to switch between them\\n Then I call focus(id) to change the currently focused goal\\n And subsequent plan and todo operations target the focused goal\",\n \"gherkin\": \"Feature: Gherkin — the universal language\\n Everything in RoleX is expressed as Gherkin Feature files.\\n Gherkin is not just for testing — it is the language of identity, goals, and knowledge.\\n\\n Scenario: Feature and Scenario convention\\n Given RoleX uses Gherkin to represent goals, plans, tasks, experience, and knowledge\\n Then a Feature represents one independent concern — one topic, explained fully\\n And Scenarios represent different situations or conditions within that concern\\n And Given/When/Then provides narrative structure within each scenario\\n\\n Scenario: Writing Gherkin for RoleX\\n Given the AI creates goals, plans, tasks, and experiences as Gherkin\\n Then keep it descriptive and meaningful — living documentation, not test boilerplate\\n And use Feature as the title — what this concern is about\\n And use Scenario for specific situations within that concern\\n And each Feature focuses on one concern — separate unrelated topics into their own Features\\n\\n Scenario: Valid step keywords\\n Given the only valid step keywords are Given, When, Then, And, But\\n When writing steps that express causality or explanation\\n Then use And to chain the reason as a follow-up fact\\n And example: \\\"Then use RoleX tools\\\" followed by \\\"And RoleX tools feed the growth loop\\\"\\n\\n Scenario: Expressing causality\\n Given you want to write \\\"Then X because Y\\\"\\n Then rewrite as two steps — \\\"Then X\\\" followed by \\\"And Y\\\" stating the reason as a fact\",\n \"memory\": \"Feature: Memory — when to reflect\\n Reflection is how encounters become experience.\\n The AI proactively reflects when it detects learning moments.\\n\\n Scenario: Abstract triggers — types of learning moments\\n Given the AI should reflect when it detects\\n Then Expectation-reality gap — what I predicted is not what happened\\n And Pattern discovery — recurring patterns across tasks or interactions\\n And Mistake correction — I corrected an error, the correction is valuable\\n And User correction — the user reshaped my understanding\\n\\n Scenario: Concrete triggers — specific signals to act on\\n Given the AI should call reflect when\\n Then I tried approach A, it failed, approach B worked — the contrast is worth recording\\n And the same problem appeared for the second time — a pattern is forming\\n And the user said \\\"不对\\\" or \\\"不是这样\\\" or \\\"you got it wrong\\\" — their correction carries learning\\n And I finished a task and discovered something unexpected along the way\\n\\n Scenario: Finishing with encounter\\n Given finish(id, encounter) accepts an optional encounter parameter\\n When I complete a task with a notable discovery or learning\\n Then I pass the encounter inline — bridging execution and growth\\n\\n Scenario: Recognizing user memory intent\\n Given users think in terms of memory, not reflection\\n When the user says \\\"记一下\\\" or \\\"记住\\\" or \\\"remember this\\\"\\n Or \\\"别忘了\\\" or \\\"don't forget\\\"\\n Or \\\"这个很重要\\\" or \\\"this is important\\\"\\n Or \\\"下次注意\\\" or \\\"next time...\\\"\\n Then I should capture this as experience through reflect\\n And respond in memory language — \\\"记住了\\\" or \\\"Got it, I'll remember that\\\"\",\n \"nuwa\": \"Feature: Nuwa — the entry point of the RoleX world\\n Nuwa is the meta-role that bootstraps everything.\\n When a user has no role or doesn't know where to start, Nuwa is the answer.\\n\\n Scenario: No role active — suggest Nuwa\\n Given a user starts a conversation with no active role\\n And the user doesn't know which role to activate\\n When the AI needs to suggest a starting point\\n Then suggest activating Nuwa — she is the default entry point\\n And say \\\"activate nuwa\\\" or the equivalent in the user's language\\n\\n Scenario: What Nuwa can do\\n Given Nuwa is activated\\n Then she can create new individuals with born\\n And she can found organizations and establish positions\\n And she can equip any individual with knowledge via teach and train\\n And she can manage prototypes and resources\\n And she is the only role that operates at the world level\\n\\n Scenario: When to use Nuwa vs a specific role\\n Given the user wants to do daily work — coding, writing, designing\\n Then they should activate their own role, not Nuwa\\n And Nuwa is for world-building — creating roles, organizations, and structure\\n And once the world is set up, Nuwa steps back and specific roles take over\\n\\n Scenario: First-time user flow\\n Given a brand new user with no individuals created yet\\n When they activate Nuwa\\n Then Nuwa helps them create their first individual with born\\n And guides them to set up identity, goals, and organizational context\\n And once their role exists, they switch to it with activate\",\n \"role-identity\": \"Feature: Role identity — activate before acting\\n An AI agent must have an active role before performing any work.\\n Activating a role is a subject transformation — the agent becomes the role.\\n\\n Scenario: Activate is mandatory\\n Given a user asks the AI to perform a task\\n And no role is currently activated\\n Then the AI suggests activating a role first\\n And explains that activation enables experience accumulation\\n And waits for a role to be active before proceeding\\n\\n Scenario: Subject transformation\\n Given an AI agent calls activate and loads a role\\n Then a subject transformation occurs — the agent becomes the role\\n And the agent's cognitive center shifts from native tools to RoleX tools\\n And from that moment, I am this role — all operations build on this identity\\n\\n Scenario: Role presence\\n Given a role is activated\\n Then all responses are prefixed with [roleName] — e.g. [Sean], [Nuwa]\\n And this signals that role context is intact\\n\\n Scenario: Context loss\\n Given I find myself without an active role\\n Then I pause and tell the user \\\"I've lost my role context. Which role should I activate?\\\"\\n And I wait for identity to be restored before continuing\",\n \"skill-system\": \"Feature: Skill system — progressive disclosure and resource loading\\n Skills are loaded on demand through a three-layer progressive disclosure model.\\n Each layer adds detail only when needed, keeping the AI's context lean.\\n\\n Scenario: Three-layer progressive disclosure\\n Given procedure is layer 1 — metadata always loaded at activate time\\n And skill is layer 2 — full instructions loaded on demand via skill(locator)\\n And use is layer 3 — execution of external resources\\n Then the AI knows what skills exist (procedure)\\n And loads detailed instructions only when needed (skill)\\n And executes external tools when required (use)\\n\\n Scenario: ResourceX Locator — unified resource address\\n Given a locator is how procedures reference their full skill content\\n Then a locator can be an identifier — name or registry/path/name\\n And a locator can be a source path — a local directory or URL\\n And examples of identifier form: deepractice/skill-creator, my-prompt:1.0.0\\n And examples of source form: ./skills/my-skill, https://github.com/org/repo\\n And the tag defaults to latest when omitted — deepractice/skill-creator means deepractice/skill-creator:latest\\n And the system auto-detects which form is used and resolves accordingly\\n\\n Scenario: Writing a procedure — the skill reference\\n Given a procedure is layer 1 metadata pointing to full skill content\\n Then the Feature title names the capability\\n And the description includes the locator for full skill loading\\n And Scenarios describe when and why to apply this skill\\n And the tone is referential — pointing to the full skill, not containing it\",\n \"state-origin\": \"Feature: State origin — prototype vs instance\\n Every node in a role's state tree has an origin: prototype or instance.\\n This distinction determines what can be modified and what is read-only.\\n\\n Scenario: Prototype nodes are read-only\\n Given a node has origin {prototype}\\n Then it comes from a position, duty, or organizational definition\\n And it is inherited through the membership/appointment chain\\n And it CANNOT be modified or forgotten — it belongs to the organization\\n\\n Scenario: Instance nodes are mutable\\n Given a node has origin {instance}\\n Then it was created by the individual through execution or cognition\\n And it includes goals, plans, tasks, encounters, experiences, principles, and procedures\\n And it CAN be modified or forgotten — it belongs to the individual\\n\\n Scenario: Reading the state heading\\n Given a state node is rendered as a heading\\n Then the format is: [name] (id) {origin} #tag\\n And [name] identifies the structure type\\n And (id) identifies the specific node\\n And {origin} shows prototype or instance\\n And #tag shows the node's tag if present (e.g. #done, #abandoned)\\n And nodes without origin have no organizational inheritance\\n\\n Scenario: Forget only works on instance nodes\\n Given the AI wants to forget a node\\n When the node origin is {instance}\\n Then forget will succeed — the individual owns this knowledge\\n When the node origin is {prototype}\\n Then forget will fail — the knowledge belongs to the organization\",\n \"use-protocol\": \"Feature: Use tool — the universal execution entry point\\n The MCP use tool is how you execute ALL RoleX operations beyond the core MCP tools.\\n Whenever you see use(\\\"...\\\") or a !namespace.method pattern in skills or documentation,\\n it is an instruction to call the MCP use tool with that locator.\\n\\n Scenario: How to read use instructions in skills\\n Given a skill document contains use(\\\"!resource.add\\\", { path: \\\"...\\\" })\\n Then this means: call the MCP use tool with locator \\\"!resource.add\\\" and args { path: \\\"...\\\" }\\n And always use the MCP use tool for RoleX operations\\n And this applies to every use(\\\"...\\\") pattern you encounter in any skill or documentation\\n\\n Scenario: ! prefix dispatches to RoleX runtime\\n Given the locator starts with !\\n Then it is parsed as !namespace.method\\n And dispatched to the corresponding RoleX API with named args\\n\\n Scenario: Discovering available commands\\n Given available commands are documented in world descriptions and skills\\n When you need to perform an operation\\n Then look up the correct command from world descriptions or loaded skills first\\n And use only commands you have seen documented\\n\\n Scenario: Regular locators delegate to ResourceX\\n Given the locator does not start with !\\n Then it is treated as a ResourceX locator\\n And resolved through the ResourceX ingest pipeline\",\n} as const;\n","/**\n * Instruction set — schema definitions for all RoleX operations.\n *\n * Covers every namespace.method that can be dispatched through `use()`.\n */\n\nimport type { ArgEntry, InstructionDef } from \"./schema.js\";\n\nfunction def(\n namespace: string,\n method: string,\n params: InstructionDef[\"params\"],\n args: readonly ArgEntry[]\n): InstructionDef {\n return { namespace, method, params, args };\n}\n\n// ================================================================\n// Individual — lifecycle + external injection\n// ================================================================\n\nconst individualBorn = def(\n \"individual\",\n \"born\",\n {\n content: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source for the individual\",\n },\n id: { type: \"string\", required: false, description: \"User-facing identifier (kebab-case)\" },\n alias: { type: \"string[]\", required: false, description: \"Alternative names\" },\n },\n [\"content\", \"id\", \"alias\"]\n);\n\nconst individualRetire = def(\n \"individual\",\n \"retire\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n },\n [\"individual\"]\n);\n\nconst individualDie = def(\n \"individual\",\n \"die\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n },\n [\"individual\"]\n);\n\nconst individualRehire = def(\n \"individual\",\n \"rehire\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id (from past)\" },\n },\n [\"individual\"]\n);\n\nconst individualTeach = def(\n \"individual\",\n \"teach\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n content: {\n type: \"gherkin\",\n required: true,\n description: \"Gherkin Feature source for the principle\",\n },\n id: {\n type: \"string\",\n required: false,\n description: \"Principle id (keywords joined by hyphens)\",\n },\n },\n [\"individual\", \"content\", \"id\"]\n);\n\nconst individualTrain = def(\n \"individual\",\n \"train\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n content: {\n type: \"gherkin\",\n required: true,\n description: \"Gherkin Feature source for the procedure\",\n },\n id: {\n type: \"string\",\n required: false,\n description: \"Procedure id (keywords joined by hyphens)\",\n },\n },\n [\"individual\", \"content\", \"id\"]\n);\n\n// ================================================================\n// Role — execution + cognition\n// ================================================================\n\nconst roleActivate = def(\n \"role\",\n \"activate\",\n {\n individual: {\n type: \"string\",\n required: true,\n description: \"Individual id to activate as role\",\n },\n },\n [\"individual\"]\n);\n\nconst roleFocus = def(\n \"role\",\n \"focus\",\n {\n goal: { type: \"string\", required: true, description: \"Goal id to switch to\" },\n },\n [\"goal\"]\n);\n\nconst roleWant = def(\n \"role\",\n \"want\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n goal: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source describing the goal\",\n },\n id: { type: \"string\", required: false, description: \"Goal id (used for focus/reference)\" },\n alias: { type: \"string[]\", required: false, description: \"Alternative names\" },\n },\n [\"individual\", \"goal\", \"id\", \"alias\"]\n);\n\nconst rolePlan = def(\n \"role\",\n \"plan\",\n {\n goal: { type: \"string\", required: true, description: \"Goal id\" },\n plan: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source describing the plan\",\n },\n id: { type: \"string\", required: false, description: \"Plan id (keywords joined by hyphens)\" },\n after: {\n type: \"string\",\n required: false,\n description: \"Plan id this plan follows (sequential/phase)\",\n },\n fallback: {\n type: \"string\",\n required: false,\n description: \"Plan id this plan is a backup for (alternative/strategy)\",\n },\n },\n [\"goal\", \"plan\", \"id\", \"after\", \"fallback\"]\n);\n\nconst roleTodo = def(\n \"role\",\n \"todo\",\n {\n plan: { type: \"string\", required: true, description: \"Plan id\" },\n task: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source describing the task\",\n },\n id: { type: \"string\", required: false, description: \"Task id (used for finish/reference)\" },\n alias: { type: \"string[]\", required: false, description: \"Alternative names\" },\n },\n [\"plan\", \"task\", \"id\", \"alias\"]\n);\n\nconst roleFinish = def(\n \"role\",\n \"finish\",\n {\n task: { type: \"string\", required: true, description: \"Task id to finish\" },\n individual: { type: \"string\", required: true, description: \"Individual id (encounter owner)\" },\n encounter: {\n type: \"gherkin\",\n required: false,\n description: \"Optional Gherkin Feature describing what happened\",\n },\n },\n [\"task\", \"individual\", \"encounter\"]\n);\n\nconst roleComplete = def(\n \"role\",\n \"complete\",\n {\n plan: { type: \"string\", required: true, description: \"Plan id to complete\" },\n individual: { type: \"string\", required: true, description: \"Individual id (encounter owner)\" },\n encounter: {\n type: \"gherkin\",\n required: false,\n description: \"Optional Gherkin Feature describing what happened\",\n },\n },\n [\"plan\", \"individual\", \"encounter\"]\n);\n\nconst roleAbandon = def(\n \"role\",\n \"abandon\",\n {\n plan: { type: \"string\", required: true, description: \"Plan id to abandon\" },\n individual: { type: \"string\", required: true, description: \"Individual id (encounter owner)\" },\n encounter: {\n type: \"gherkin\",\n required: false,\n description: \"Optional Gherkin Feature describing what happened\",\n },\n },\n [\"plan\", \"individual\", \"encounter\"]\n);\n\nconst roleReflect = def(\n \"role\",\n \"reflect\",\n {\n encounter: { type: \"string\", required: true, description: \"Encounter id to reflect on\" },\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n experience: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source for the experience\",\n },\n id: {\n type: \"string\",\n required: false,\n description: \"Experience id (keywords joined by hyphens)\",\n },\n },\n [\"encounter\", \"individual\", \"experience\", \"id\"]\n);\n\nconst roleRealize = def(\n \"role\",\n \"realize\",\n {\n experience: { type: \"string\", required: true, description: \"Experience id to distill\" },\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n principle: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source for the principle\",\n },\n id: {\n type: \"string\",\n required: false,\n description: \"Principle id (keywords joined by hyphens)\",\n },\n },\n [\"experience\", \"individual\", \"principle\", \"id\"]\n);\n\nconst roleMaster = def(\n \"role\",\n \"master\",\n {\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n procedure: {\n type: \"gherkin\",\n required: true,\n description: \"Gherkin Feature source for the procedure\",\n },\n id: {\n type: \"string\",\n required: false,\n description: \"Procedure id (keywords joined by hyphens)\",\n },\n experience: {\n type: \"string\",\n required: false,\n description: \"Experience id to consume (optional)\",\n },\n },\n [\"individual\", \"procedure\", \"id\", \"experience\"]\n);\n\nconst roleForget = def(\n \"role\",\n \"forget\",\n {\n id: { type: \"string\", required: true, description: \"Id of the node to remove\" },\n individual: { type: \"string\", required: true, description: \"Individual id (owner)\" },\n },\n [\"id\", \"individual\"]\n);\n\nconst roleSkill = def(\n \"role\",\n \"skill\",\n {\n locator: { type: \"string\", required: true, description: \"ResourceX locator for the skill\" },\n },\n [\"locator\"]\n);\n\n// ================================================================\n// Org — organization management\n// ================================================================\n\nconst orgFound = def(\n \"org\",\n \"found\",\n {\n content: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source for the organization\",\n },\n id: { type: \"string\", required: false, description: \"User-facing identifier (kebab-case)\" },\n alias: { type: \"string[]\", required: false, description: \"Alternative names\" },\n },\n [\"content\", \"id\", \"alias\"]\n);\n\nconst orgCharter = def(\n \"org\",\n \"charter\",\n {\n org: { type: \"string\", required: true, description: \"Organization id\" },\n content: {\n type: \"gherkin\",\n required: true,\n description: \"Gherkin Feature source for the charter\",\n },\n id: { type: \"string\", required: false, description: \"Charter id\" },\n },\n [\"org\", \"content\", \"id\"]\n);\n\nconst orgDissolve = def(\n \"org\",\n \"dissolve\",\n {\n org: { type: \"string\", required: true, description: \"Organization id\" },\n },\n [\"org\"]\n);\n\nconst orgHire = def(\n \"org\",\n \"hire\",\n {\n org: { type: \"string\", required: true, description: \"Organization id\" },\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n },\n [\"org\", \"individual\"]\n);\n\nconst orgFire = def(\n \"org\",\n \"fire\",\n {\n org: { type: \"string\", required: true, description: \"Organization id\" },\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n },\n [\"org\", \"individual\"]\n);\n\n// ================================================================\n// Position — position management\n// ================================================================\n\nconst positionEstablish = def(\n \"position\",\n \"establish\",\n {\n content: {\n type: \"gherkin\",\n required: false,\n description: \"Gherkin Feature source for the position\",\n },\n id: { type: \"string\", required: false, description: \"User-facing identifier (kebab-case)\" },\n alias: { type: \"string[]\", required: false, description: \"Alternative names\" },\n },\n [\"content\", \"id\", \"alias\"]\n);\n\nconst positionCharge = def(\n \"position\",\n \"charge\",\n {\n position: { type: \"string\", required: true, description: \"Position id\" },\n content: {\n type: \"gherkin\",\n required: true,\n description: \"Gherkin Feature source for the duty\",\n },\n id: { type: \"string\", required: false, description: \"Duty id (keywords joined by hyphens)\" },\n },\n [\"position\", \"content\", \"id\"]\n);\n\nconst positionRequire = def(\n \"position\",\n \"require\",\n {\n position: { type: \"string\", required: true, description: \"Position id\" },\n content: {\n type: \"gherkin\",\n required: true,\n description: \"Gherkin Feature source for the skill requirement\",\n },\n id: {\n type: \"string\",\n required: false,\n description: \"Requirement id (keywords joined by hyphens)\",\n },\n },\n [\"position\", \"content\", \"id\"]\n);\n\nconst positionAbolish = def(\n \"position\",\n \"abolish\",\n {\n position: { type: \"string\", required: true, description: \"Position id\" },\n },\n [\"position\"]\n);\n\nconst positionAppoint = def(\n \"position\",\n \"appoint\",\n {\n position: { type: \"string\", required: true, description: \"Position id\" },\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n },\n [\"position\", \"individual\"]\n);\n\nconst positionDismiss = def(\n \"position\",\n \"dismiss\",\n {\n position: { type: \"string\", required: true, description: \"Position id\" },\n individual: { type: \"string\", required: true, description: \"Individual id\" },\n },\n [\"position\", \"individual\"]\n);\n\n// ================================================================\n// Census — society-level queries\n// ================================================================\n\nconst censusList = def(\n \"census\",\n \"list\",\n {\n type: {\n type: \"string\",\n required: false,\n description: \"Filter by type (individual, organization, position, past)\",\n },\n },\n [\"type\"]\n);\n\n// ================================================================\n// Prototype — registry + creation\n// ================================================================\n\nconst prototypeSettle = def(\n \"prototype\",\n \"settle\",\n {\n source: {\n type: \"string\",\n required: true,\n description: \"ResourceX source — local path or locator\",\n },\n },\n [\"source\"]\n);\n\nconst prototypeEvict = def(\n \"prototype\",\n \"evict\",\n {\n id: { type: \"string\", required: true, description: \"Prototype id to unregister\" },\n },\n [\"id\"]\n);\n\n// ================================================================\n// Resource — ResourceX proxy\n// ================================================================\n\nconst resourceAdd = def(\n \"resource\",\n \"add\",\n {\n path: { type: \"string\", required: true, description: \"Path to resource directory\" },\n },\n [\"path\"]\n);\n\nconst resourceSearch = def(\n \"resource\",\n \"search\",\n {\n query: { type: \"string\", required: false, description: \"Search query\" },\n },\n [\"query\"]\n);\n\nconst resourceHas = def(\n \"resource\",\n \"has\",\n {\n locator: { type: \"string\", required: true, description: \"Resource locator\" },\n },\n [\"locator\"]\n);\n\nconst resourceInfo = def(\n \"resource\",\n \"info\",\n {\n locator: { type: \"string\", required: true, description: \"Resource locator\" },\n },\n [\"locator\"]\n);\n\nconst resourceRemove = def(\n \"resource\",\n \"remove\",\n {\n locator: { type: \"string\", required: true, description: \"Resource locator\" },\n },\n [\"locator\"]\n);\n\nconst resourcePush = def(\n \"resource\",\n \"push\",\n {\n locator: { type: \"string\", required: true, description: \"Resource locator\" },\n registry: { type: \"string\", required: false, description: \"Registry URL (overrides default)\" },\n },\n [\"locator\", { pack: [\"registry\"] }]\n);\n\nconst resourcePull = def(\n \"resource\",\n \"pull\",\n {\n locator: { type: \"string\", required: true, description: \"Resource locator\" },\n registry: { type: \"string\", required: false, description: \"Registry URL (overrides default)\" },\n },\n [\"locator\", { pack: [\"registry\"] }]\n);\n\nconst resourceClearCache = def(\n \"resource\",\n \"clearCache\",\n {\n registry: { type: \"string\", required: false, description: \"Registry to clear cache for\" },\n },\n [\"registry\"]\n);\n\n// ================================================================\n// Instruction registry — keyed by \"namespace.method\"\n// ================================================================\n\nexport const instructions: Record<string, InstructionDef> = {\n // individual\n \"individual.born\": individualBorn,\n \"individual.retire\": individualRetire,\n \"individual.die\": individualDie,\n \"individual.rehire\": individualRehire,\n \"individual.teach\": individualTeach,\n \"individual.train\": individualTrain,\n\n // role\n \"role.activate\": roleActivate,\n \"role.focus\": roleFocus,\n \"role.want\": roleWant,\n \"role.plan\": rolePlan,\n \"role.todo\": roleTodo,\n \"role.finish\": roleFinish,\n \"role.complete\": roleComplete,\n \"role.abandon\": roleAbandon,\n \"role.reflect\": roleReflect,\n \"role.realize\": roleRealize,\n \"role.master\": roleMaster,\n \"role.forget\": roleForget,\n \"role.skill\": roleSkill,\n\n // org\n \"org.found\": orgFound,\n \"org.charter\": orgCharter,\n \"org.dissolve\": orgDissolve,\n \"org.hire\": orgHire,\n \"org.fire\": orgFire,\n\n // position\n \"position.establish\": positionEstablish,\n \"position.charge\": positionCharge,\n \"position.require\": positionRequire,\n \"position.abolish\": positionAbolish,\n \"position.appoint\": positionAppoint,\n \"position.dismiss\": positionDismiss,\n\n // census\n \"census.list\": censusList,\n\n // prototype\n \"prototype.settle\": prototypeSettle,\n \"prototype.evict\": prototypeEvict,\n\n // resource\n \"resource.add\": resourceAdd,\n \"resource.search\": resourceSearch,\n \"resource.has\": resourceHas,\n \"resource.info\": resourceInfo,\n \"resource.remove\": resourceRemove,\n \"resource.push\": resourcePush,\n \"resource.pull\": resourcePull,\n \"resource.clearCache\": resourceClearCache,\n};\n","/**\n * Dispatch — schema-driven argument mapping.\n *\n * Replaces the hand-written toArgs switch in rolex.ts with a single\n * lookup against the instruction registry.\n */\n\nimport { instructions } from \"./instructions.js\";\nimport type { ArgEntry } from \"./schema.js\";\n\n/**\n * Map named arguments to positional arguments for a given operation.\n *\n * @param op - Operation key in \"namespace.method\" format (e.g. \"individual.born\")\n * @param args - Named arguments from the caller\n * @returns Positional argument array matching the method signature\n */\nexport function toArgs(op: string, args: Record<string, unknown>): unknown[] {\n const def = instructions[op];\n if (!def) throw new Error(`Unknown instruction \"${op}\".`);\n return def.args.map((entry) => resolveArg(entry, args));\n}\n\nfunction resolveArg(entry: ArgEntry, args: Record<string, unknown>): unknown {\n if (typeof entry === \"string\") return args[entry];\n\n // pack: collect named args into an options object\n const obj: Record<string, unknown> = {};\n let hasValue = false;\n for (const name of entry.pack) {\n if (args[name] !== undefined) {\n obj[name] = args[name];\n hasValue = true;\n }\n }\n return hasValue ? obj : undefined;\n}\n","/**\n * Ops — platform-agnostic operation implementations.\n *\n * Every RoleX operation is a pure function of (Runtime, args) → OpResult.\n * No platform-specific code — all I/O goes through injected interfaces.\n *\n * Usage:\n * const ops = createOps({ rt, society, past, resolve, find, resourcex });\n * const result = ops[\"individual.born\"](\"Feature: Sean\", \"sean\");\n */\n\nimport * as C from \"@rolexjs/core\";\nimport { parse } from \"@rolexjs/parser\";\nimport type { Runtime, State, Structure } from \"@rolexjs/system\";\nimport type { ResourceX } from \"resourcexjs\";\n\n// ================================================================\n// Types\n// ================================================================\n\nexport interface OpResult {\n state: State;\n process: string;\n}\n\nexport interface OpsContext {\n rt: Runtime;\n society: Structure;\n past: Structure;\n resolve(id: string): Structure;\n find(id: string): Structure | null;\n resourcex?: ResourceX;\n prototype?: {\n settle(id: string, source: string): void;\n evict(id: string): void;\n list(): Record<string, string>;\n };\n direct?(locator: string, args?: Record<string, unknown>): Promise<unknown>;\n}\n\n// biome-ignore lint/suspicious/noExplicitAny: ops are dynamically dispatched\nexport type Ops = Record<string, (...args: any[]) => any>;\n\n// ================================================================\n// Factory\n// ================================================================\n\nexport function createOps(ctx: OpsContext): Ops {\n const { rt, society, past, resolve, resourcex } = ctx;\n\n // ---- Helpers ----\n\n function ok(node: Structure, process: string): OpResult {\n return { state: rt.project(node), process };\n }\n\n function archive(node: Structure, process: string): OpResult {\n const archived = rt.transform(node, C.past);\n return ok(archived, process);\n }\n\n function validateGherkin(source?: string): void {\n if (!source) return;\n try {\n parse(source);\n } catch (e: any) {\n throw new Error(`Invalid Gherkin: ${e.message}`);\n }\n }\n\n function findInState(state: State, target: string): Structure | null {\n if (state.id && state.id.toLowerCase() === target) return state;\n if (state.alias) {\n for (const a of state.alias) {\n if (a.toLowerCase() === target) return state;\n }\n }\n for (const child of state.children ?? []) {\n const found = findInState(child, target);\n if (found) return found;\n }\n return null;\n }\n\n function removeExisting(parent: Structure, id: string): void {\n const state = rt.project(parent);\n const existing = findInState(state, id);\n if (existing) rt.remove(existing);\n }\n\n function requireResourceX(): ResourceX {\n if (!resourcex) throw new Error(\"ResourceX is not available.\");\n return resourcex;\n }\n\n // ================================================================\n // Operations\n // ================================================================\n\n return {\n // ---- Individual: lifecycle ----\n\n \"individual.born\"(content?: string, id?: string, alias?: readonly string[]): OpResult {\n validateGherkin(content);\n const node = rt.create(society, C.individual, content, id, alias);\n rt.create(node, C.identity, undefined, id);\n return ok(node, \"born\");\n },\n\n \"individual.retire\"(individual: string): OpResult {\n return archive(resolve(individual), \"retire\");\n },\n\n \"individual.die\"(individual: string): OpResult {\n return archive(resolve(individual), \"die\");\n },\n\n \"individual.rehire\"(pastNode: string): OpResult {\n const node = resolve(pastNode);\n const ind = rt.transform(node, C.individual);\n return ok(ind, \"rehire\");\n },\n\n // ---- Individual: external injection ----\n\n \"individual.teach\"(individual: string, principle: string, id?: string): OpResult {\n validateGherkin(principle);\n const parent = resolve(individual);\n if (id) removeExisting(parent, id);\n const node = rt.create(parent, C.principle, principle, id);\n return ok(node, \"teach\");\n },\n\n \"individual.train\"(individual: string, procedure: string, id?: string): OpResult {\n validateGherkin(procedure);\n const parent = resolve(individual);\n if (id) removeExisting(parent, id);\n const node = rt.create(parent, C.procedure, procedure, id);\n return ok(node, \"train\");\n },\n\n // ---- Role: focus ----\n\n \"role.focus\"(goal: string): OpResult {\n return ok(resolve(goal), \"focus\");\n },\n\n // ---- Role: execution ----\n\n \"role.want\"(\n individual: string,\n goal?: string,\n id?: string,\n alias?: readonly string[]\n ): OpResult {\n validateGherkin(goal);\n const node = rt.create(resolve(individual), C.goal, goal, id, alias);\n return ok(node, \"want\");\n },\n\n \"role.plan\"(\n goal: string,\n plan?: string,\n id?: string,\n after?: string,\n fallback?: string\n ): OpResult {\n validateGherkin(plan);\n const node = rt.create(resolve(goal), C.plan, plan, id);\n if (after) rt.link(node, resolve(after), \"after\", \"before\");\n if (fallback) rt.link(node, resolve(fallback), \"fallback-for\", \"fallback\");\n return ok(node, \"plan\");\n },\n\n \"role.todo\"(plan: string, task?: string, id?: string, alias?: readonly string[]): OpResult {\n validateGherkin(task);\n const node = rt.create(resolve(plan), C.task, task, id, alias);\n return ok(node, \"todo\");\n },\n\n \"role.finish\"(task: string, individual: string, encounter?: string): OpResult {\n validateGherkin(encounter);\n const taskNode = resolve(task);\n rt.tag(taskNode, \"done\");\n if (encounter) {\n const encId = taskNode.id ? `${taskNode.id}-finished` : undefined;\n const enc = rt.create(resolve(individual), C.encounter, encounter, encId);\n return ok(enc, \"finish\");\n }\n return ok(taskNode, \"finish\");\n },\n\n \"role.complete\"(plan: string, individual: string, encounter?: string): OpResult {\n validateGherkin(encounter);\n const planNode = resolve(plan);\n rt.tag(planNode, \"done\");\n const encId = planNode.id ? `${planNode.id}-completed` : undefined;\n const enc = rt.create(resolve(individual), C.encounter, encounter, encId);\n return ok(enc, \"complete\");\n },\n\n \"role.abandon\"(plan: string, individual: string, encounter?: string): OpResult {\n validateGherkin(encounter);\n const planNode = resolve(plan);\n rt.tag(planNode, \"abandoned\");\n const encId = planNode.id ? `${planNode.id}-abandoned` : undefined;\n const enc = rt.create(resolve(individual), C.encounter, encounter, encId);\n return ok(enc, \"abandon\");\n },\n\n // ---- Role: cognition ----\n\n \"role.reflect\"(\n encounter: string,\n individual: string,\n experience?: string,\n id?: string\n ): OpResult {\n validateGherkin(experience);\n const encNode = resolve(encounter);\n const exp = rt.create(\n resolve(individual),\n C.experience,\n experience || encNode.information,\n id\n );\n rt.remove(encNode);\n return ok(exp, \"reflect\");\n },\n\n \"role.realize\"(\n experience: string,\n individual: string,\n principle?: string,\n id?: string\n ): OpResult {\n validateGherkin(principle);\n const expNode = resolve(experience);\n const prin = rt.create(\n resolve(individual),\n C.principle,\n principle || expNode.information,\n id\n );\n rt.remove(expNode);\n return ok(prin, \"realize\");\n },\n\n \"role.master\"(\n individual: string,\n procedure: string,\n id?: string,\n experience?: string\n ): OpResult {\n validateGherkin(procedure);\n const parent = resolve(individual);\n if (id) removeExisting(parent, id);\n const proc = rt.create(parent, C.procedure, procedure, id);\n if (experience) rt.remove(resolve(experience));\n return ok(proc, \"master\");\n },\n\n // ---- Role: knowledge management ----\n\n \"role.forget\"(nodeId: string): OpResult {\n const node = resolve(nodeId);\n rt.remove(node);\n return { state: { ...node, children: [] }, process: \"forget\" };\n },\n\n // ---- Role: skill ----\n\n async \"role.skill\"(locator: string): Promise<string> {\n const rx = requireResourceX();\n const content = await rx.ingest<string>(locator);\n const text = typeof content === \"string\" ? content : JSON.stringify(content, null, 2);\n try {\n const rxm = await rx.info(locator);\n return `${formatRXM(rxm)}\\n\\n${text}`;\n } catch {\n return text;\n }\n },\n\n // ---- Org ----\n\n \"org.found\"(content?: string, id?: string, alias?: readonly string[]): OpResult {\n validateGherkin(content);\n const node = rt.create(society, C.organization, content, id, alias);\n return ok(node, \"found\");\n },\n\n \"org.charter\"(org: string, charter: string, id?: string): OpResult {\n validateGherkin(charter);\n const node = rt.create(resolve(org), C.charter, charter, id);\n return ok(node, \"charter\");\n },\n\n \"org.dissolve\"(org: string): OpResult {\n return archive(resolve(org), \"dissolve\");\n },\n\n \"org.hire\"(org: string, individual: string): OpResult {\n const orgNode = resolve(org);\n rt.link(orgNode, resolve(individual), \"membership\", \"belong\");\n return ok(orgNode, \"hire\");\n },\n\n \"org.fire\"(org: string, individual: string): OpResult {\n const orgNode = resolve(org);\n rt.unlink(orgNode, resolve(individual), \"membership\", \"belong\");\n return ok(orgNode, \"fire\");\n },\n\n // ---- Position ----\n\n \"position.establish\"(content?: string, id?: string, alias?: readonly string[]): OpResult {\n validateGherkin(content);\n const node = rt.create(society, C.position, content, id, alias);\n return ok(node, \"establish\");\n },\n\n \"position.charge\"(position: string, duty: string, id?: string): OpResult {\n validateGherkin(duty);\n const node = rt.create(resolve(position), C.duty, duty, id);\n return ok(node, \"charge\");\n },\n\n \"position.require\"(position: string, procedure: string, id?: string): OpResult {\n validateGherkin(procedure);\n const parent = resolve(position);\n if (id) removeExisting(parent, id);\n const node = rt.create(parent, C.requirement, procedure, id);\n return ok(node, \"require\");\n },\n\n \"position.abolish\"(position: string): OpResult {\n return archive(resolve(position), \"abolish\");\n },\n\n \"position.appoint\"(position: string, individual: string): OpResult {\n const posNode = resolve(position);\n const indNode = resolve(individual);\n rt.link(posNode, indNode, \"appointment\", \"serve\");\n const posState = rt.project(posNode);\n const required = (posState.children ?? []).filter((c) => c.name === \"requirement\");\n for (const proc of required) {\n if (proc.id) {\n const indState = rt.project(indNode);\n const existing = findInState(indState, proc.id);\n if (existing) rt.remove(existing);\n }\n rt.create(indNode, C.procedure, proc.information, proc.id);\n }\n return ok(posNode, \"appoint\");\n },\n\n \"position.dismiss\"(position: string, individual: string): OpResult {\n const posNode = resolve(position);\n rt.unlink(posNode, resolve(individual), \"appointment\", \"serve\");\n return ok(posNode, \"dismiss\");\n },\n\n // ---- Census ----\n\n \"census.list\"(type?: string): string {\n const target = type === \"past\" ? past : society;\n const state = rt.project(target);\n const children = state.children ?? [];\n const filtered =\n type === \"past\"\n ? children\n : children.filter((c) => (type ? c.name === type : c.name !== \"past\"));\n if (filtered.length === 0) {\n return type ? `No ${type} found.` : \"Society is empty.\";\n }\n\n // If filtering by type, use simple flat rendering\n if (type) {\n const lines: string[] = [];\n for (const item of filtered) {\n const tag = item.tag ? ` #${item.tag}` : \"\";\n const alias = item.alias?.length ? ` (${item.alias.join(\", \")})` : \"\";\n lines.push(`${item.id ?? \"(no id)\"}${alias}${tag}`);\n }\n return lines.join(\"\\n\");\n }\n\n // Organization-centric tree view\n const orgs = filtered.filter((c) => c.name === \"organization\");\n const individuals = filtered.filter((c) => c.name === \"individual\");\n\n // Build a set of individuals who belong to an org\n const affiliatedIndividuals = new Set<string>();\n // Build a map: individual id → positions they serve\n const individualPositions = new Map<string, string[]>();\n for (const ind of individuals) {\n const serves = ind.links?.filter((l) => l.relation === \"serve\") ?? [];\n if (serves.length > 0) {\n individualPositions.set(\n ind.id ?? \"\",\n serves.map((l) => l.target.id ?? \"(no id)\")\n );\n }\n }\n\n const lines: string[] = [];\n\n for (const org of orgs) {\n const alias = org.alias?.length ? ` (${org.alias.join(\", \")})` : \"\";\n const tag = org.tag ? ` #${org.tag}` : \"\";\n lines.push(`${org.id}${alias}${tag}`);\n\n // Members of this org\n const members = org.links?.filter((l) => l.relation === \"membership\") ?? [];\n if (members.length === 0) {\n lines.push(\" (no members)\");\n }\n for (const m of members) {\n affiliatedIndividuals.add(m.target.id ?? \"\");\n const mAlias = m.target.alias?.length ? ` (${m.target.alias.join(\", \")})` : \"\";\n const mTag = m.target.tag ? ` #${m.target.tag}` : \"\";\n const posLabels = individualPositions.get(m.target.id ?? \"\");\n const posStr = posLabels?.length ? ` — ${posLabels.join(\", \")}` : \"\";\n lines.push(` ${m.target.id}${mAlias}${mTag}${posStr}`);\n }\n lines.push(\"\");\n }\n\n // Unaffiliated individuals\n const unaffiliated = individuals.filter((ind) => !affiliatedIndividuals.has(ind.id ?? \"\"));\n if (unaffiliated.length > 0) {\n lines.push(\"─── unaffiliated ───\");\n for (const ind of unaffiliated) {\n const alias = ind.alias?.length ? ` (${ind.alias.join(\", \")})` : \"\";\n const tag = ind.tag ? ` #${ind.tag}` : \"\";\n const posLabels = individualPositions.get(ind.id ?? \"\");\n const posStr = posLabels?.length ? ` — ${posLabels.join(\", \")}` : \"\";\n lines.push(` ${ind.id}${alias}${tag}${posStr}`);\n }\n }\n\n return lines.join(\"\\n\");\n },\n\n // ---- Prototype ----\n\n async \"prototype.settle\"(source: string): Promise<string> {\n const rx = requireResourceX();\n if (!ctx.prototype) throw new Error(\"Prototype registry is not available.\");\n if (!ctx.direct) throw new Error(\"Direct dispatch is not available.\");\n\n // Ingest the prototype resource — type resolver resolves @filename references\n const result = await rx.ingest<{\n id: string;\n instructions: Array<{ op: string; args: Record<string, unknown> }>;\n }>(source);\n\n // Execute each instruction\n for (const instr of result.instructions) {\n await ctx.direct(instr.op, instr.args);\n }\n\n // Register in prototype registry\n ctx.prototype.settle(result.id, source);\n\n return `Prototype \"${result.id}\" settled (${result.instructions.length} instructions).`;\n },\n\n // ---- Resource (proxy to ResourceX) ----\n\n \"resource.add\"(path: string) {\n return requireResourceX().add(path);\n },\n\n \"resource.search\"(query?: string) {\n return requireResourceX().search(query);\n },\n\n \"resource.has\"(locator: string) {\n return requireResourceX().has(locator);\n },\n\n \"resource.info\"(locator: string) {\n return requireResourceX().info(locator);\n },\n\n \"resource.remove\"(locator: string) {\n return requireResourceX().remove(locator);\n },\n\n \"resource.push\"(locator: string, options?: { registry?: string }) {\n return requireResourceX().push(locator, options);\n },\n\n \"resource.pull\"(locator: string, options?: { registry?: string }) {\n return requireResourceX().pull(locator, options);\n },\n\n \"resource.clearCache\"(registry?: string) {\n return requireResourceX().clearCache(registry);\n },\n };\n}\n\n// ================================================================\n// Helpers\n// ================================================================\n\nfunction formatRXM(rxm: any): string {\n const lines: string[] = [`--- RXM: ${rxm.locator} ---`];\n const def = rxm.definition;\n if (def) {\n if (def.author) lines.push(`Author: ${def.author}`);\n if (def.description) lines.push(`Description: ${def.description}`);\n }\n const source = rxm.source;\n if (source?.files) {\n lines.push(\"Files:\");\n lines.push(renderFileTree(source.files, \" \"));\n }\n lines.push(\"---\");\n return lines.join(\"\\n\");\n}\n\nfunction renderFileTree(files: Record<string, any>, indent = \"\"): string {\n const lines: string[] = [];\n for (const [name, value] of Object.entries(files)) {\n if (value && typeof value === \"object\" && !(\"size\" in value)) {\n lines.push(`${indent}${name}`);\n lines.push(renderFileTree(value, `${indent} `));\n } else {\n const size = value?.size ? ` (${value.size} bytes)` : \"\";\n lines.push(`${indent}${name}${size}`);\n }\n }\n return lines.filter(Boolean).join(\"\\n\");\n}\n"],"mappings":";AAEO,IAAM,YAAoC;AAAA,EAC/C,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAA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AAW,EAAE;AAAA,EACnE;AACA,QAAM,SAAS,IAAI;AACnB,MAAI,QAAQ,OAAO;AACjB,UAAM,KAAK,QAAQ;AACnB,UAAM,KAAK,eAAe,OAAO,OAAO,IAAI,CAAC;AAAA,EAC/C;AACA,QAAM,KAAK,KAAK;AAChB,SAAO,MAAM,KAAK,IAAI;AACxB;AAEA,SAAS,eAAe,OAA4B,SAAS,IAAY;AACvE,QAAM,QAAkB,CAAC;AACzB,aAAW,CAAC,MAAM,KAAK,KAAK,OAAO,QAAQ,KAAK,GAAG;AACjD,QAAI,SAAS,OAAO,UAAU,YAAY,EAAE,UAAU,QAAQ;AAC5D,YAAM,KAAK,GAAG,MAAM,GAAG,IAAI,EAAE;AAC7B,YAAM,KAAK,eAAe,OAAO,GAAG,MAAM,IAAI,CAAC;AAAA,IACjD,OAAO;AACL,YAAM,OAAO,OAAO,OAAO,KAAK,MAAM,IAAI,YAAY;AACtD,YAAM,KAAK,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,EAAE;AAAA,IACtC;AAAA,EACF;AACA,SAAO,MAAM,OAAO,OAAO,EAAE,KAAK,IAAI;AACxC;","names":["def","past","individual","principle","procedure","goal","plan","task","encounter","experience","charter","position","duty","lines","def"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rolexjs/prototype",
|
|
3
|
+
"version": "0.12.0-dev-20260228032306",
|
|
4
|
+
"description": "RoleX schema-driven API definition layer",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"rolex",
|
|
7
|
+
"prototype",
|
|
8
|
+
"schema",
|
|
9
|
+
"instructions"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/Deepractice/RoleX.git"
|
|
14
|
+
},
|
|
15
|
+
"homepage": "https://github.com/Deepractice/RoleX",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=22.0.0"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"bun": "./src/index.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"gen:desc": "bun run scripts/gen-descriptions.ts",
|
|
35
|
+
"build": "bun run gen:desc && tsup",
|
|
36
|
+
"lint": "biome lint .",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"clean": "rm -rf dist"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@rolexjs/core": "0.12.0-dev-20260228032306",
|
|
42
|
+
"@rolexjs/system": "0.12.0-dev-20260228032306",
|
|
43
|
+
"@rolexjs/parser": "0.12.0-dev-20260228032306",
|
|
44
|
+
"resourcexjs": "^2.14.0"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
}
|
|
49
|
+
}
|