@rolexjs/core 1.4.0 → 1.5.0-dev-20260309054045

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 CHANGED
@@ -146,6 +146,7 @@ declare const scopeProject: _rolexjs_system.Process;
146
146
  declare const milestoneProject: _rolexjs_system.Process;
147
147
  declare const deliverProject: _rolexjs_system.Process;
148
148
  declare const wikiProject: _rolexjs_system.Process;
149
+ declare const produceProject: _rolexjs_system.Process;
149
150
 
150
151
  declare const ownProduct: _rolexjs_system.Process;
151
152
  declare const disownProduct: _rolexjs_system.Process;
@@ -158,7 +159,6 @@ declare const born: _rolexjs_system.Process;
158
159
  declare const found: _rolexjs_system.Process;
159
160
  declare const establish: _rolexjs_system.Process;
160
161
  declare const launch: _rolexjs_system.Process;
161
- declare const publish: _rolexjs_system.Process;
162
162
  declare const retire: _rolexjs_system.Process;
163
163
  declare const die: _rolexjs_system.Process;
164
164
  declare const archive: _rolexjs_system.Process;
@@ -227,7 +227,7 @@ interface CommandResultMap {
227
227
  "project.deliver": CommandResult;
228
228
  "project.wiki": CommandResult;
229
229
  "project.archive": CommandResult;
230
- "product.create": CommandResult;
230
+ "project.produce": CommandResult;
231
231
  "product.strategy": CommandResult;
232
232
  "product.spec": CommandResult;
233
233
  "product.release": CommandResult;
@@ -568,4 +568,4 @@ interface Protocol {
568
568
  /** The protocol instance — single source of truth for all channel adapters. */
569
569
  declare const protocol: Protocol;
570
570
 
571
- export { type ApplyResult, type ArgEntry, type CommandContext, type CommandResult, type CommandResultMap, type Commands, type ContextData, type InstructionDef, type Migration, type MigrationRecord, type ParamDef, type ParamType, type Platform, type Protocol, type PrototypeData, type PrototypeRepository, type Renderer, RendererRouter, Role, type RoleDeps, type RoleSnapshot, type RoleX, type RoleXRepository, RoleXService, type ToolDef, abandon, abolish, activate, applyPrototype, appoint, archive, background, born, channel, channelProduct, charge, charter, charterOrg, complete, createCommands, deliverProject, deliverable, deprecate, die, directives, dismiss, disownProduct, dissolve, duty, encounter, enroll, establish, experience, findInState, finish, fire, found, goal, hire, identity, individual, instructions, launch, master, milestone, milestoneProject, mindset, organization, ownProduct, past, plan, planGoal, position, principle, procedure, processes, product, project, protocol, publish, realize, reflect, rehire, release, releaseProduct, removeParticipant, requirement, retire, scope, scopeProject, society, spec, specProduct, strategy, strategyProduct, task, toArgs, todo, tone, want, wiki, wikiProject, world };
571
+ export { type ApplyResult, type ArgEntry, type CommandContext, type CommandResult, type CommandResultMap, type Commands, type ContextData, type InstructionDef, type Migration, type MigrationRecord, type ParamDef, type ParamType, type Platform, type Protocol, type PrototypeData, type PrototypeRepository, type Renderer, RendererRouter, Role, type RoleDeps, type RoleSnapshot, type RoleX, type RoleXRepository, RoleXService, type ToolDef, abandon, abolish, activate, applyPrototype, appoint, archive, background, born, channel, channelProduct, charge, charter, charterOrg, complete, createCommands, deliverProject, deliverable, deprecate, die, directives, dismiss, disownProduct, dissolve, duty, encounter, enroll, establish, experience, findInState, finish, fire, found, goal, hire, identity, individual, instructions, launch, master, milestone, milestoneProject, mindset, organization, ownProduct, past, plan, planGoal, position, principle, procedure, processes, produceProject, product, project, protocol, realize, reflect, rehire, release, releaseProduct, removeParticipant, requirement, retire, scope, scopeProject, society, spec, specProduct, strategy, strategyProduct, task, toArgs, todo, tone, want, wiki, wikiProject, world };
package/dist/index.js CHANGED
@@ -39,6 +39,7 @@ var requirement = structure("requirement", "Required skill for this position", p
39
39
  var project = structure("project", "A process container for organized work", society, [
40
40
  relation("participation", "Who participates in this project", individual),
41
41
  relation("ownership", "Which organization owns this project", organization)
42
+ // production → product is a forward declaration; product is defined below
42
43
  ]);
43
44
  var scope = structure(
44
45
  "scope",
@@ -56,7 +57,10 @@ var product = structure(
56
57
  "product",
57
58
  "A product with vision, contracts, and releases",
58
59
  society,
59
- [relation("ownership", "Who owns this product", individual)]
60
+ [
61
+ relation("ownership", "Who owns this product", individual),
62
+ relation("origin", "Which project produced this product", project)
63
+ ]
60
64
  );
61
65
  var strategy = structure("strategy", "Product strategy \u2014 how to win", product);
62
66
  var spec = structure("spec", "Product behavior contract \u2014 BDD specification", product);
@@ -180,6 +184,12 @@ var deliverProject = process4(
180
184
  create3(deliverable)
181
185
  );
182
186
  var wikiProject = process4("wiki", "Add a wiki entry to a project", project, create3(wiki));
187
+ var produceProject = process4(
188
+ "produce",
189
+ "Produce a product from this project",
190
+ project,
191
+ create3(product)
192
+ );
183
193
 
184
194
  // src/product.ts
185
195
  import { create as create4, link as link3, process as process5, unlink as unlink3 } from "@rolexjs/system";
@@ -231,7 +241,6 @@ var born = process6(
231
241
  var found = process6("found", "Found an organization", society, create5(organization));
232
242
  var establish = process6("establish", "Establish a position", society, create5(position));
233
243
  var launch = process6("launch", "Launch a project", society, create5(project));
234
- var publish = process6("publish", "Publish a product", society, create5(product));
235
244
  var retire = process6(
236
245
  "retire",
237
246
  "Retire an individual",
@@ -877,12 +886,15 @@ ${text}`;
877
886
  async "project.archive"(project2) {
878
887
  return archive2(await resolve(project2), "archive");
879
888
  },
880
- // ---- Product ----
881
- async "product.create"(content, id, alias) {
889
+ async "project.produce"(project2, content, id, alias) {
882
890
  validateGherkin(content);
891
+ const projNode = await resolve(project2);
883
892
  const node = await rt.create(society2, product, content, id, alias);
884
- return ok(node, "create");
893
+ await rt.link(projNode, node, "production", "produce");
894
+ await rt.link(node, projNode, "origin", "produced-by");
895
+ return ok(node, "produce");
885
896
  },
897
+ // ---- Product ----
886
898
  async "product.strategy"(product2, strategy2, id) {
887
899
  validateGherkin(strategy2);
888
900
  const node = await rt.create(await resolve(product2), strategy, strategy2, id);
@@ -1644,19 +1656,20 @@ var projectArchive = def(
1644
1656
  },
1645
1657
  ["project"]
1646
1658
  );
1647
- var productCreate = def(
1648
- "product",
1649
- "create",
1659
+ var projectProduce = def(
1660
+ "project",
1661
+ "produce",
1650
1662
  {
1663
+ project: { type: "string", required: true, description: "Project id" },
1651
1664
  content: {
1652
1665
  type: "gherkin",
1653
1666
  required: false,
1654
1667
  description: "Gherkin Feature source for the product (vision)"
1655
1668
  },
1656
- id: { type: "string", required: true, description: "User-facing identifier (kebab-case)" },
1669
+ id: { type: "string", required: true, description: "Product id (kebab-case)" },
1657
1670
  alias: { type: "string[]", required: false, description: "Alternative names" }
1658
1671
  },
1659
- ["content", "id", "alias"]
1672
+ ["project", "content", "id", "alias"]
1660
1673
  );
1661
1674
  var productStrategy = def(
1662
1675
  "product",
@@ -1985,8 +1998,8 @@ var instructions = {
1985
1998
  "project.deliver": projectDeliver,
1986
1999
  "project.wiki": projectWiki,
1987
2000
  "project.archive": projectArchive,
2001
+ "project.produce": projectProduce,
1988
2002
  // product
1989
- "product.create": productCreate,
1990
2003
  "product.strategy": productStrategy,
1991
2004
  "product.spec": productSpec,
1992
2005
  "product.release": productRelease,
@@ -2958,10 +2971,10 @@ export {
2958
2971
  procedure,
2959
2972
  process7 as process,
2960
2973
  processes,
2974
+ produceProject,
2961
2975
  product,
2962
2976
  project,
2963
2977
  protocol,
2964
- publish,
2965
2978
  realize,
2966
2979
  reflect,
2967
2980
  rehire,