@owlmeans/viable-common 0.0.19 → 0.0.20

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.
Files changed (118) hide show
  1. package/README.md +2 -2
  2. package/agent-meta/manifest.json +2 -2
  3. package/agent-meta/skills/agent-presentation/SKILL.md +1 -1
  4. package/agent-meta/skills/viable-common/SKILL.md +195 -10
  5. package/build/ba/consts.d.ts +2 -3
  6. package/build/ba/consts.d.ts.map +1 -1
  7. package/build/ba/consts.js +2 -3
  8. package/build/ba/consts.js.map +1 -1
  9. package/build/ba/helpers.d.ts +2 -1
  10. package/build/ba/helpers.d.ts.map +1 -1
  11. package/build/ba/helpers.js +3 -2
  12. package/build/ba/helpers.js.map +1 -1
  13. package/build/ba/types.d.ts +17 -2
  14. package/build/ba/types.d.ts.map +1 -1
  15. package/build/connect/consts.d.ts +5 -8
  16. package/build/connect/consts.d.ts.map +1 -1
  17. package/build/connect/consts.js +5 -8
  18. package/build/connect/consts.js.map +1 -1
  19. package/build/connect/entrypoints.d.ts +1 -43
  20. package/build/connect/entrypoints.d.ts.map +1 -1
  21. package/build/connect/entrypoints.js +1 -18
  22. package/build/connect/entrypoints.js.map +1 -1
  23. package/build/connect/index.d.ts +1 -0
  24. package/build/connect/index.d.ts.map +1 -1
  25. package/build/connect/index.js +1 -0
  26. package/build/connect/index.js.map +1 -1
  27. package/build/connect/jobs.d.ts +25 -0
  28. package/build/connect/jobs.d.ts.map +1 -0
  29. package/build/connect/jobs.js +29 -0
  30. package/build/connect/jobs.js.map +1 -0
  31. package/build/connect/references.d.ts +1 -40
  32. package/build/connect/references.d.ts.map +1 -1
  33. package/build/connect/references.js +0 -8
  34. package/build/connect/references.js.map +1 -1
  35. package/build/connect/schemas.d.ts +1 -7
  36. package/build/connect/schemas.d.ts.map +1 -1
  37. package/build/connect/schemas.js +1 -25
  38. package/build/connect/schemas.js.map +1 -1
  39. package/build/connect/types.d.ts +30 -45
  40. package/build/connect/types.d.ts.map +1 -1
  41. package/build/design/consts.d.ts +0 -2
  42. package/build/design/consts.d.ts.map +1 -1
  43. package/build/design/consts.js +0 -2
  44. package/build/design/consts.js.map +1 -1
  45. package/build/design/helpers.d.ts +6 -2
  46. package/build/design/helpers.d.ts.map +1 -1
  47. package/build/design/helpers.js +6 -2
  48. package/build/design/helpers.js.map +1 -1
  49. package/build/design/types.d.ts +12 -11
  50. package/build/design/types.d.ts.map +1 -1
  51. package/build/execution/types.d.ts +11 -0
  52. package/build/execution/types.d.ts.map +1 -1
  53. package/build/index.d.ts +1 -0
  54. package/build/index.d.ts.map +1 -1
  55. package/build/index.js +1 -0
  56. package/build/index.js.map +1 -1
  57. package/build/planning/consts.d.ts +141 -0
  58. package/build/planning/consts.d.ts.map +1 -0
  59. package/build/planning/consts.js +170 -0
  60. package/build/planning/consts.js.map +1 -0
  61. package/build/planning/errors.d.ts +64 -0
  62. package/build/planning/errors.d.ts.map +1 -0
  63. package/build/planning/errors.js +99 -0
  64. package/build/planning/errors.js.map +1 -0
  65. package/build/planning/flows.d.ts +34 -0
  66. package/build/planning/flows.d.ts.map +1 -0
  67. package/build/planning/flows.js +174 -0
  68. package/build/planning/flows.js.map +1 -0
  69. package/build/planning/helpers.d.ts +54 -0
  70. package/build/planning/helpers.d.ts.map +1 -0
  71. package/build/planning/helpers.js +101 -0
  72. package/build/planning/helpers.js.map +1 -0
  73. package/build/planning/index.d.ts +7 -0
  74. package/build/planning/index.d.ts.map +1 -0
  75. package/build/planning/index.js +6 -0
  76. package/build/planning/index.js.map +1 -0
  77. package/build/planning/schemas.d.ts +23 -0
  78. package/build/planning/schemas.d.ts.map +1 -0
  79. package/build/planning/schemas.js +65 -0
  80. package/build/planning/schemas.js.map +1 -0
  81. package/build/planning/types.d.ts +70 -0
  82. package/build/planning/types.d.ts.map +1 -0
  83. package/build/planning/types.js +2 -0
  84. package/build/planning/types.js.map +1 -0
  85. package/build/scaffold/schemas.d.ts.map +1 -1
  86. package/build/scaffold/schemas.js +7 -2
  87. package/build/scaffold/schemas.js.map +1 -1
  88. package/build/scaffold/types.d.ts +5 -1
  89. package/build/scaffold/types.d.ts.map +1 -1
  90. package/package.json +3 -1
  91. package/src/ba/consts.ts +2 -3
  92. package/src/ba/helpers.ts +3 -2
  93. package/src/ba/types.ts +17 -2
  94. package/src/connect/consts.ts +5 -8
  95. package/src/connect/entrypoints.ts +2 -41
  96. package/src/connect/index.ts +1 -0
  97. package/src/connect/jobs.ts +40 -0
  98. package/src/connect/references.ts +1 -22
  99. package/src/connect/schemas.ts +2 -29
  100. package/src/connect/types.ts +30 -51
  101. package/src/design/consts.ts +0 -3
  102. package/src/design/helpers.ts +6 -2
  103. package/src/design/types.ts +12 -11
  104. package/src/execution/types.ts +11 -0
  105. package/src/index.ts +1 -0
  106. package/src/planning/consts.ts +182 -0
  107. package/src/planning/errors.ts +117 -0
  108. package/src/planning/flows.ts +204 -0
  109. package/src/planning/helpers.ts +133 -0
  110. package/src/planning/index.ts +6 -0
  111. package/src/planning/schemas.ts +70 -0
  112. package/src/planning/types.ts +75 -0
  113. package/src/scaffold/schemas.ts +7 -2
  114. package/src/scaffold/types.ts +10 -1
  115. package/tests/branding.spec.ts +37 -0
  116. package/tests/connect-entrypoints.spec.ts +35 -3
  117. package/tests/design.spec.ts +3 -3
  118. package/tests/planning.spec.ts +356 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/planning/consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAGzD;;;;;;;;GAQG;AAEH,sGAAsG;AACtG,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAgB,CAAA;AACnD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAA;AACpD,oGAAoG;AACpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAA;AAE7C;;;GAGG;AACH,MAAM,CAA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,MAAM,CAAA;AACpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAA;AAExC,mGAAmG;AACnG,MAAM,CAAC,MAAM,iBAAiB,GAAe,MAAM,CAAC,MAAM,CAAC;IACzD,MAAM,EAAE,wBAAwB;IAChC,KAAK,EAAE,SAAS,CAAC,MAAM;IACvB,MAAM,EAAE,uBAAuB;IAC/B,SAAS,EAAE,IAAI;IACf,YAAY,EAAE,SAAS,CAAC,MAAM;CAC/B,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAe,MAAM,CAAC,MAAM,CAAC;IAC3D,KAAK,EAAE,SAAS,CAAC,IAAI;IACrB,YAAY,EAAE,SAAS,CAAC,MAAM;IAC9B,iGAAiG;IACjG,oEAAoE;IACpE,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,eAAe,GAAe,MAAM,CAAC,MAAM,CAAC;IACvD,GAAG,iBAAiB,EAAE,MAAM,EAAE,sBAAsB;CACrD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAe,MAAM,CAAC,MAAM,CAAC;IAC/D,GAAG,iBAAiB,EAAE,MAAM,EAAE,8BAA8B;CAC7D,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAe,MAAM,CAAC,MAAM,CAAC;IAC/D,GAAG,iBAAiB,EAAE,MAAM,EAAE,8BAA8B;CAC7D,CAAC,CAAA"}
@@ -0,0 +1,64 @@
1
+ import { ResilientError } from '@owlmeans/error';
2
+ import { ResourceError } from '@owlmeans/resource';
3
+ /**
4
+ * The project and story refusals every process that writes a planning card can raise.
5
+ *
6
+ * Declared HERE rather than by the platform because the viable planning plugin throws them from a
7
+ * process-neutral package, and a refusal class that exists only on one side of a hop cannot be
8
+ * `instanceof`-matched on the other. Type names and markers are wire contracts: the browser
9
+ * phrases a refusal by marker (`viable-project:…`), so neither may change. The bases are declared
10
+ * with them because an error class is unmarshalled by type name with the LAST registration
11
+ * winning — a second declaration of a base anywhere else would replace this one.
12
+ */
13
+ export declare class ProjectResourceError extends ResourceError {
14
+ static typeName: string;
15
+ constructor(message?: string);
16
+ }
17
+ /** No project card with that id in the caller's organization. */
18
+ export declare class ProjectNotFound extends ProjectResourceError {
19
+ static typeName: string;
20
+ constructor(message?: string);
21
+ }
22
+ /** The project exists, and the caller may not act on it. */
23
+ export declare class ProjectPermissionError extends ProjectResourceError {
24
+ static typeName: string;
25
+ constructor(message?: string);
26
+ }
27
+ export declare class ProjectStoryError extends ProjectResourceError {
28
+ static typeName: string;
29
+ constructor(message?: string);
30
+ }
31
+ /** No story card with that id or code under the project. */
32
+ export declare class ProjectStoryNotFound extends ProjectStoryError {
33
+ static typeName: string;
34
+ constructor(message?: string);
35
+ }
36
+ /**
37
+ * The story is in a state the requested write does not apply to.
38
+ *
39
+ * `wrong-status` is the marker a completed story's refusal carries — the manager matches the whole
40
+ * `viable-project:story:missconfigured:` prefix, so the reason after it is free to grow.
41
+ */
42
+ export declare class ProjectStoryMissconfigured extends ProjectStoryError {
43
+ static typeName: string;
44
+ constructor(message?: string);
45
+ }
46
+ export declare class ProjectError extends ResilientError {
47
+ static typeName: string;
48
+ constructor(message?: string);
49
+ }
50
+ export declare class ProjectAgentError extends ProjectError {
51
+ static typeName: string;
52
+ constructor(message?: string);
53
+ }
54
+ /**
55
+ * The project's agent is already busy with what was asked for.
56
+ *
57
+ * `story` is the reason a second story start carries: one story of a project is in progress at a
58
+ * time, because a develop run holds the project's sandbox for its whole length.
59
+ */
60
+ export declare class ProjectAgentOccupied extends ProjectAgentError {
61
+ static typeName: string;
62
+ constructor(message?: string);
63
+ }
64
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/planning/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;IACrD,OAAuB,QAAQ,SAA2C;IAE1E,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,iEAAiE;AACjE,qBAAa,eAAgB,SAAQ,oBAAoB;IACvD,OAAuB,QAAQ,SAA6C;IAE5E,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,4DAA4D;AAC5D,qBAAa,sBAAuB,SAAQ,oBAAoB;IAC9D,OAAuB,QAAQ,SAA+C;IAE9E,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,qBAAa,iBAAkB,SAAQ,oBAAoB;IACzD,OAAuB,QAAQ,SAA0C;IAEzE,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,4DAA4D;AAC5D,qBAAa,oBAAqB,SAAQ,iBAAiB;IACzD,OAAuB,QAAQ,SAA0C;IAEzE,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;GAKG;AACH,qBAAa,0BAA2B,SAAQ,iBAAiB;IAC/D,OAAuB,QAAQ,SAAgD;IAE/E,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED,qBAAa,YAAa,SAAQ,cAAc;IAC9C,OAAuB,QAAQ,SAA4C;IAE3E,YAAY,OAAO,GAAE,MAAgB,EAEpC;CACF;AAED,qBAAa,iBAAkB,SAAQ,YAAY;IACjD,OAAuB,QAAQ,SAAkC;IAEjE,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF;AAED;;;;;GAKG;AACH,qBAAa,oBAAqB,SAAQ,iBAAiB;IACzD,OAAuB,QAAQ,SAA0C;IAEzE,YAAY,OAAO,GAAE,MAAgB,EAGpC;CACF"}
@@ -0,0 +1,99 @@
1
+ import { ResilientError } from '@owlmeans/error';
2
+ import { ResourceError } from '@owlmeans/resource';
3
+ /**
4
+ * The project and story refusals every process that writes a planning card can raise.
5
+ *
6
+ * Declared HERE rather than by the platform because the viable planning plugin throws them from a
7
+ * process-neutral package, and a refusal class that exists only on one side of a hop cannot be
8
+ * `instanceof`-matched on the other. Type names and markers are wire contracts: the browser
9
+ * phrases a refusal by marker (`viable-project:…`), so neither may change. The bases are declared
10
+ * with them because an error class is unmarshalled by type name with the LAST registration
11
+ * winning — a second declaration of a base anywhere else would replace this one.
12
+ */
13
+ export class ProjectResourceError extends ResourceError {
14
+ static typeName = `ViableProject${ResourceError.typeName}`;
15
+ constructor(message = 'error') {
16
+ super(`viable-project:${message}`);
17
+ this.type = ProjectResourceError.typeName;
18
+ }
19
+ }
20
+ /** No project card with that id in the caller's organization. */
21
+ export class ProjectNotFound extends ProjectResourceError {
22
+ static typeName = `NotFound${ProjectResourceError.typeName}`;
23
+ constructor(message = 'error') {
24
+ super(`not-found:${message}`);
25
+ this.type = ProjectNotFound.typeName;
26
+ }
27
+ }
28
+ /** The project exists, and the caller may not act on it. */
29
+ export class ProjectPermissionError extends ProjectResourceError {
30
+ static typeName = `Permission${ProjectResourceError.typeName}`;
31
+ constructor(message = 'error') {
32
+ super(`permission:${message}`);
33
+ this.type = ProjectPermissionError.typeName;
34
+ }
35
+ }
36
+ export class ProjectStoryError extends ProjectResourceError {
37
+ static typeName = `Story${ProjectResourceError.typeName}`;
38
+ constructor(message = 'error') {
39
+ super(`story:${message}`);
40
+ this.type = ProjectStoryError.typeName;
41
+ }
42
+ }
43
+ /** No story card with that id or code under the project. */
44
+ export class ProjectStoryNotFound extends ProjectStoryError {
45
+ static typeName = `NotFound${ProjectStoryError.typeName}`;
46
+ constructor(message = 'error') {
47
+ super(`not-found:${message}`);
48
+ this.type = ProjectStoryNotFound.typeName;
49
+ }
50
+ }
51
+ /**
52
+ * The story is in a state the requested write does not apply to.
53
+ *
54
+ * `wrong-status` is the marker a completed story's refusal carries — the manager matches the whole
55
+ * `viable-project:story:missconfigured:` prefix, so the reason after it is free to grow.
56
+ */
57
+ export class ProjectStoryMissconfigured extends ProjectStoryError {
58
+ static typeName = `Missconfigured${ProjectStoryError.typeName}`;
59
+ constructor(message = 'error') {
60
+ super(`missconfigured:${message}`);
61
+ this.type = ProjectStoryMissconfigured.typeName;
62
+ }
63
+ }
64
+ export class ProjectError extends ResilientError {
65
+ static typeName = `ViableProject${ResilientError.typeName}`;
66
+ constructor(message = 'error') {
67
+ super(ProjectError.typeName, `viable-project:${message}`);
68
+ }
69
+ }
70
+ export class ProjectAgentError extends ProjectError {
71
+ static typeName = `Agent${ProjectError.typeName}`;
72
+ constructor(message = 'error') {
73
+ super(`agent:${message}`);
74
+ this.type = ProjectAgentError.typeName;
75
+ }
76
+ }
77
+ /**
78
+ * The project's agent is already busy with what was asked for.
79
+ *
80
+ * `story` is the reason a second story start carries: one story of a project is in progress at a
81
+ * time, because a develop run holds the project's sandbox for its whole length.
82
+ */
83
+ export class ProjectAgentOccupied extends ProjectAgentError {
84
+ static typeName = `Occupied${ProjectAgentError.typeName}`;
85
+ constructor(message = 'error') {
86
+ super(`occupied:${message}`);
87
+ this.type = ProjectAgentOccupied.typeName;
88
+ }
89
+ }
90
+ ResilientError.registerErrorClass(ProjectResourceError);
91
+ ResilientError.registerErrorClass(ProjectNotFound);
92
+ ResilientError.registerErrorClass(ProjectPermissionError);
93
+ ResilientError.registerErrorClass(ProjectStoryError);
94
+ ResilientError.registerErrorClass(ProjectStoryNotFound);
95
+ ResilientError.registerErrorClass(ProjectStoryMissconfigured);
96
+ ResilientError.registerErrorClass(ProjectError);
97
+ ResilientError.registerErrorClass(ProjectAgentError);
98
+ ResilientError.registerErrorClass(ProjectAgentOccupied);
99
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/planning/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD;;;;;;;;;GASG;AACH,MAAM,OAA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oBAAoB,CAAC,CAAA;AACvD,cAAc,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAA;AAClD,cAAc,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAA;AACzD,cAAc,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AACpD,cAAc,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;AACvD,cAAc,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;AAC7D,cAAc,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAA;AAC/C,cAAc,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;AACpD,cAAc,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA"}
@@ -0,0 +1,34 @@
1
+ import type { AnyTypeSchema, ProjectTypeSchema, RelationshipType, SpecificationSlot, StatusFlowSchema, WorkcardTypeSchema } from '@owlmeans/planning';
2
+ /**
3
+ * The story flow.
4
+ *
5
+ * `failed` maps to PLANNED: a failed story is work still to do, so "done" is the closed count and
6
+ * a retry is simply `start` again. `reset` from anywhere is the manual recovery — the one move a
7
+ * completed story still accepts.
8
+ */
9
+ export declare const VIABLE_STORY_FLOW_SCHEMA: StatusFlowSchema;
10
+ /**
11
+ * The project flow.
12
+ *
13
+ * A create lands at `draft`; confirming the brief is `confirm`; the end of an initialization is
14
+ * `activate`. A reinitialization and a failed initialization are SLOT facts, not transitions, and
15
+ * destroying a project is a `delete` plus the platform's cascade — never `archive`.
16
+ */
17
+ export declare const VIABLE_PROJECT_FLOW_SCHEMA: StatusFlowSchema;
18
+ /** A document is written or revised; it has no lifecycle to move through. */
19
+ export declare const VIABLE_SPEC_FLOW_SCHEMA: StatusFlowSchema;
20
+ /** The brief a person confirms, and the plan the scaffold draws from it. */
21
+ export declare const VIABLE_PROJECT_SLOTS: SpecificationSlot[];
22
+ /** A story's design — the payload the implementation stage consumes. */
23
+ export declare const VIABLE_STORY_SLOTS: SpecificationSlot[];
24
+ export declare const VIABLE_STORY_RELATIONSHIPS: RelationshipType[];
25
+ export declare const VIABLE_PROJECT_TYPE_SCHEMA: ProjectTypeSchema;
26
+ export declare const VIABLE_STORY_TYPE_SCHEMA: WorkcardTypeSchema;
27
+ export declare const VIABLE_SPEC_TYPE_SCHEMA: WorkcardTypeSchema;
28
+ /** Registered so their prefixes and flow are decided once; not creatable under a project yet. */
29
+ export declare const VIABLE_RESERVED_TYPE_SCHEMAS: WorkcardTypeSchema[];
30
+ /** Every Viable type — what a planning plugin registers. */
31
+ export declare const VIABLE_TYPE_SCHEMAS: AnyTypeSchema[];
32
+ /** Every Viable flow — registered beside the types. */
33
+ export declare const VIABLE_FLOW_SCHEMAS: StatusFlowSchema[];
34
+ //# sourceMappingURL=flows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flows.d.ts","sourceRoot":"","sources":["../../src/planning/flows.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EACvF,kBAAkB,EACnB,MAAM,oBAAoB,CAAA;AAgB3B;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBA6BtC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBA6BxC,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,EAAE,gBAOrC,CAAA;AAMD,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAOnD,CAAA;AAED,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,EAAE,iBAAiB,EAOjD,CAAA;AAKD,eAAO,MAAM,0BAA0B,EAAE,gBAAgB,EAIxD,CAAA;AAED,eAAO,MAAM,0BAA0B,EAAE,iBAUxC,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,kBAUtC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,kBAOrC,CAAA;AAaD,iGAAiG;AACjG,eAAO,MAAM,4BAA4B,EAAE,kBAAkB,EAI5D,CAAA;AAED,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,EAAE,aAAa,EAK9C,CAAA;AAED,uDAAuD;AACvD,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAIjD,CAAA"}
@@ -0,0 +1,174 @@
1
+ import { IntrinsicPolicy, IntrinsicStatus, SpecificationFormat, WorkcardKind } from '@owlmeans/planning';
2
+ import { STORY_DESIGN_VERSION } from '../design/consts.js';
3
+ import { StoryDesignSchema } from '../design/schemas.js';
4
+ import { ScaffoldPlanSchema } from '../scaffold/schemas.js';
5
+ import { VIABLE_BUG_CODE, VIABLE_BUG_TYPE, VIABLE_DESIGN_REVISIONS_KEPT, VIABLE_IMPROVEMENT_CODE, VIABLE_IMPROVEMENT_TYPE, VIABLE_PROJECT_CODE, VIABLE_PROJECT_FLOW, VIABLE_PROJECT_TYPE, VIABLE_REQUIREMENT_CODE, VIABLE_REQUIREMENT_TYPE, VIABLE_SPEC_FLOW, VIABLE_SPEC_TYPE, VIABLE_STORY_CODE, VIABLE_STORY_FLOW, VIABLE_STORY_TYPE, ViableProjectStatus, ViableProjectTransition, ViableRelationship, ViableSpecCategory, ViableSpecStatus, ViableStoryStatus, ViableStoryTransition, ViableTone, } from './consts.js';
6
+ import { ViableOpenFieldsSchema, ViableProjectFieldsSchema, ViableSpecFieldsSchema, ViableStoryFieldsSchema, } from './schemas.js';
7
+ /**
8
+ * The story flow.
9
+ *
10
+ * `failed` maps to PLANNED: a failed story is work still to do, so "done" is the closed count and
11
+ * a retry is simply `start` again. `reset` from anywhere is the manual recovery — the one move a
12
+ * completed story still accepts.
13
+ */
14
+ export const VIABLE_STORY_FLOW_SCHEMA = {
15
+ id: VIABLE_STORY_FLOW,
16
+ version: 1,
17
+ statuses: [
18
+ { key: ViableStoryStatus.Planned, intrinsic: IntrinsicStatus.Planned, initial: true, tone: ViableTone.Blue },
19
+ { key: ViableStoryStatus.InProgress, intrinsic: IntrinsicStatus.InProgress, tone: ViableTone.Yellow },
20
+ { key: ViableStoryStatus.Completed, intrinsic: IntrinsicStatus.Closed, tone: ViableTone.Green },
21
+ { key: ViableStoryStatus.Failed, intrinsic: IntrinsicStatus.Planned, tone: ViableTone.Red },
22
+ ],
23
+ transitions: [
24
+ {
25
+ name: ViableStoryTransition.Start,
26
+ from: [ViableStoryStatus.Planned, ViableStoryStatus.Failed],
27
+ to: ViableStoryStatus.InProgress,
28
+ explicit: true,
29
+ },
30
+ {
31
+ name: ViableStoryTransition.Complete,
32
+ from: [ViableStoryStatus.InProgress],
33
+ to: ViableStoryStatus.Completed,
34
+ explicit: true,
35
+ },
36
+ {
37
+ name: ViableStoryTransition.Fail,
38
+ from: [ViableStoryStatus.InProgress],
39
+ to: ViableStoryStatus.Failed,
40
+ },
41
+ { name: ViableStoryTransition.Reset, from: '*', to: ViableStoryStatus.Planned, explicit: true },
42
+ ],
43
+ };
44
+ /**
45
+ * The project flow.
46
+ *
47
+ * A create lands at `draft`; confirming the brief is `confirm`; the end of an initialization is
48
+ * `activate`. A reinitialization and a failed initialization are SLOT facts, not transitions, and
49
+ * destroying a project is a `delete` plus the platform's cascade — never `archive`.
50
+ */
51
+ export const VIABLE_PROJECT_FLOW_SCHEMA = {
52
+ id: VIABLE_PROJECT_FLOW,
53
+ version: 1,
54
+ statuses: [
55
+ { key: ViableProjectStatus.Draft, intrinsic: IntrinsicStatus.Planned, initial: true, tone: ViableTone.Blue },
56
+ { key: ViableProjectStatus.Confirmed, intrinsic: IntrinsicStatus.InProgress, tone: ViableTone.Yellow },
57
+ { key: ViableProjectStatus.Active, intrinsic: IntrinsicStatus.InProgress, tone: ViableTone.Green },
58
+ { key: ViableProjectStatus.Archived, intrinsic: IntrinsicStatus.Closed, tone: ViableTone.Neutral },
59
+ ],
60
+ transitions: [
61
+ {
62
+ name: ViableProjectTransition.Confirm,
63
+ from: [ViableProjectStatus.Draft],
64
+ to: ViableProjectStatus.Confirmed,
65
+ explicit: true,
66
+ },
67
+ {
68
+ name: ViableProjectTransition.Activate,
69
+ from: [ViableProjectStatus.Confirmed],
70
+ to: ViableProjectStatus.Active,
71
+ },
72
+ { name: ViableProjectTransition.Archive, from: '*', to: ViableProjectStatus.Archived, explicit: true },
73
+ {
74
+ name: ViableProjectTransition.Reopen,
75
+ from: [ViableProjectStatus.Archived],
76
+ to: ViableProjectStatus.Active,
77
+ explicit: true,
78
+ },
79
+ ],
80
+ };
81
+ /** A document is written or revised; it has no lifecycle to move through. */
82
+ export const VIABLE_SPEC_FLOW_SCHEMA = {
83
+ id: VIABLE_SPEC_FLOW,
84
+ version: 1,
85
+ statuses: [
86
+ { key: ViableSpecStatus.Current, intrinsic: IntrinsicStatus.Closed, initial: true, tone: ViableTone.Neutral },
87
+ ],
88
+ transitions: [],
89
+ };
90
+ const slot = (category, format, extra = {}) => ({ category, format, type: VIABLE_SPEC_TYPE, ...extra });
91
+ /** The brief a person confirms, and the plan the scaffold draws from it. */
92
+ export const VIABLE_PROJECT_SLOTS = [
93
+ slot(ViableSpecCategory.Specification, SpecificationFormat.Markdown, { required: true }),
94
+ slot(ViableSpecCategory.Vision, SpecificationFormat.Markdown),
95
+ slot(ViableSpecCategory.DesignSystem, SpecificationFormat.Markdown),
96
+ slot(ViableSpecCategory.Scaffold, SpecificationFormat.Json, {
97
+ revisioned: true, keepRevisions: VIABLE_DESIGN_REVISIONS_KEPT, schema: ScaffoldPlanSchema,
98
+ }),
99
+ ];
100
+ /** A story's design — the payload the implementation stage consumes. */
101
+ export const VIABLE_STORY_SLOTS = [
102
+ slot(ViableSpecCategory.Design, SpecificationFormat.Json, {
103
+ revisioned: true,
104
+ keepRevisions: VIABLE_DESIGN_REVISIONS_KEPT,
105
+ schema: StoryDesignSchema,
106
+ version: STORY_DESIGN_VERSION,
107
+ }),
108
+ ];
109
+ const storyLink = (name) => ({ name, from: [VIABLE_STORY_TYPE], to: [VIABLE_STORY_TYPE], single: true });
110
+ export const VIABLE_STORY_RELATIONSHIPS = [
111
+ storyLink(ViableRelationship.Follows),
112
+ storyLink(ViableRelationship.SharesWidget),
113
+ storyLink(ViableRelationship.SharesScreen),
114
+ ];
115
+ export const VIABLE_PROJECT_TYPE_SCHEMA = {
116
+ type: VIABLE_PROJECT_TYPE,
117
+ kind: WorkcardKind.Project,
118
+ version: 1,
119
+ fields: ViableProjectFieldsSchema,
120
+ flows: [VIABLE_PROJECT_FLOW],
121
+ intrinsic: IntrinsicPolicy.Primary,
122
+ specifications: VIABLE_PROJECT_SLOTS,
123
+ code: VIABLE_PROJECT_CODE,
124
+ cardTypes: [VIABLE_STORY_TYPE],
125
+ };
126
+ export const VIABLE_STORY_TYPE_SCHEMA = {
127
+ type: VIABLE_STORY_TYPE,
128
+ kind: WorkcardKind.Card,
129
+ version: 1,
130
+ fields: ViableStoryFieldsSchema,
131
+ flows: [VIABLE_STORY_FLOW],
132
+ intrinsic: IntrinsicPolicy.Primary,
133
+ specifications: VIABLE_STORY_SLOTS,
134
+ relationships: VIABLE_STORY_RELATIONSHIPS,
135
+ code: VIABLE_STORY_CODE,
136
+ };
137
+ export const VIABLE_SPEC_TYPE_SCHEMA = {
138
+ type: VIABLE_SPEC_TYPE,
139
+ kind: WorkcardKind.Specification,
140
+ version: 1,
141
+ fields: ViableSpecFieldsSchema,
142
+ flows: [VIABLE_SPEC_FLOW],
143
+ specifications: [],
144
+ };
145
+ const reserved = (type, code) => ({
146
+ type,
147
+ kind: WorkcardKind.Card,
148
+ version: 1,
149
+ fields: ViableOpenFieldsSchema,
150
+ flows: [VIABLE_STORY_FLOW],
151
+ intrinsic: IntrinsicPolicy.Primary,
152
+ specifications: [],
153
+ code,
154
+ });
155
+ /** Registered so their prefixes and flow are decided once; not creatable under a project yet. */
156
+ export const VIABLE_RESERVED_TYPE_SCHEMAS = [
157
+ reserved(VIABLE_BUG_TYPE, VIABLE_BUG_CODE),
158
+ reserved(VIABLE_IMPROVEMENT_TYPE, VIABLE_IMPROVEMENT_CODE),
159
+ reserved(VIABLE_REQUIREMENT_TYPE, VIABLE_REQUIREMENT_CODE),
160
+ ];
161
+ /** Every Viable type — what a planning plugin registers. */
162
+ export const VIABLE_TYPE_SCHEMAS = [
163
+ VIABLE_PROJECT_TYPE_SCHEMA,
164
+ VIABLE_STORY_TYPE_SCHEMA,
165
+ VIABLE_SPEC_TYPE_SCHEMA,
166
+ ...VIABLE_RESERVED_TYPE_SCHEMAS,
167
+ ];
168
+ /** Every Viable flow — registered beside the types. */
169
+ export const VIABLE_FLOW_SCHEMAS = [
170
+ VIABLE_PROJECT_FLOW_SCHEMA,
171
+ VIABLE_STORY_FLOW_SCHEMA,
172
+ VIABLE_SPEC_FLOW_SCHEMA,
173
+ ];
174
+ //# sourceMappingURL=flows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flows.js","sourceRoot":"","sources":["../../src/planning/flows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAKxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EACL,eAAe,EAAE,eAAe,EAAE,4BAA4B,EAAE,uBAAuB,EACvF,uBAAuB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EACtF,uBAAuB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,gBAAgB,EACpF,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAC5E,uBAAuB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EACjF,iBAAiB,EAAE,qBAAqB,EAAE,UAAU,GACrD,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,sBAAsB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,uBAAuB,GACnG,MAAM,cAAc,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,gBAAgB;IACtB,IAAI,EAAE,YAAY,CAAC,aAAa;IAChC,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,CAAC,gBAAgB,CAAC;IACzB,cAAc,EAAE,EAAE;CACnB,CAAA;AAED,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,IAAgC,EAAsB,EAAE,CAAC,CAAC;IACxF,IAAI;IACJ,IAAI,EAAE,YAAY,CAAC,IAAI;IACvB,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,CAAC,iBAAiB,CAAC;IAC1B,SAAS,EAAE,eAAe,CAAC,OAAO;IAClC,cAAc,EAAE,EAAE;IAClB,IAAI;CACL,CAAC,CAAA;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,4BAA4B,GAAyB;IAChE,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;IAC1D,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC;CAC3D,CAAA;AAED,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAoB;IAClD,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;IACvB,GAAG,4BAA4B;CAChC,CAAA;AAED,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAuB;IACrD,0BAA0B;IAC1B,wBAAwB;IACxB,uBAAuB;CACxB,CAAA"}
@@ -0,0 +1,54 @@
1
+ import type { Specification, Workcard } from '@owlmeans/planning';
2
+ import type { StoryDraft } from '../areas/types.js';
3
+ import type { AgentProject, UserStory } from '../ba/types.js';
4
+ import type { StoryDesign } from '../design/types.js';
5
+ import type { StoryWriteInput } from '../metadata/types.js';
6
+ import type { StoryWriteContent, ViableProjectCard, ViableProjectFields, ViableStoryCard, ViableStoryFields } from './types.js';
7
+ /** A `viable:project` card — kind AND type, since a foreign provider may share either alone. */
8
+ export declare const isViableProject: (card?: Workcard | null) => card is ViableProjectCard;
9
+ /** A `viable:user-story` card. */
10
+ export declare const isViableStory: (card?: Workcard | null) => card is ViableStoryCard;
11
+ /** Whether a write came from a person (`web`, `connect`) rather than the platform's own runs. */
12
+ export declare const isUserChannel: (channel?: string | null) => boolean;
13
+ export declare const projectFieldsOf: (card: Workcard) => ViableProjectFields;
14
+ /**
15
+ * A story card's fields, with the two required ones always answered.
16
+ *
17
+ * An absent area reads as `guest` — the area that guards nothing — and an absent primary flag as
18
+ * `false`, so a reader never branches on a card written by a store that dropped them.
19
+ */
20
+ export declare const storyFieldsOf: (card: Workcard) => ViableStoryFields;
21
+ /** The draft shape the analysis prompts and moderation take, from a card. */
22
+ export declare const storyDraftOf: (card: Workcard) => StoryDraft;
23
+ /**
24
+ * The aggregate the coders take, for a story CARD.
25
+ *
26
+ * The card wins on the narrative, the code, the area and the actor — a person may have changed any
27
+ * of them since the design was written. The design supplies what only it knows: the entities and
28
+ * the screens. Without a design the aggregate has no screens yet.
29
+ */
30
+ export declare const userStoryOf: (card: Workcard, design?: StoryDesign | null) => UserStory;
31
+ /**
32
+ * The current document of one category among a card's specifications.
33
+ *
34
+ * The highest revision wins, then the most recently updated; a category nobody wrote answers
35
+ * `null`.
36
+ */
37
+ export declare const currentSpecOf: (specs: readonly Specification[], category: string) => Specification | null;
38
+ /** The body of a category's current document, `''` when there is none. */
39
+ export declare const currentSpecBody: (specs: readonly Specification[], category: string) => string;
40
+ /**
41
+ * The brief a generator reads, assembled from the project card and its specifications.
42
+ *
43
+ * `name` is the card's title and `alias` its code; a brief part nobody wrote is `''`, which is
44
+ * what every prompt already treats as "not stated".
45
+ */
46
+ export declare const projectBriefOf: (project: Workcard, specs: readonly Specification[]) => AgentProject;
47
+ /**
48
+ * What the metadata store writes to `docs/stories/<code>.md`, from the card and a run's content.
49
+ *
50
+ * The CODE is the target's only story identifier — a card id never reaches a target file — so a
51
+ * story card without one is refused rather than filed under its id.
52
+ */
53
+ export declare const storyWriteInputOf: (card: Workcard, content: StoryWriteContent) => StoryWriteInput;
54
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/planning/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAK3D,OAAO,KAAK,EACV,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,EAC9F,MAAM,YAAY,CAAA;AAEnB,gGAAgG;AAChG,eAAO,MAAM,eAAe,UAAW,QAAQ,GAAG,IAAI,KAAG,IAAI,IAAI,iBACwB,CAAA;AAEzF,kCAAkC;AAClC,eAAO,MAAM,aAAa,UAAW,QAAQ,GAAG,IAAI,KAAG,IAAI,IAAI,eACqB,CAAA;AAEpF,iGAAiG;AACjG,eAAO,MAAM,aAAa,aAAc,MAAM,GAAG,IAAI,KAAG,OACG,CAAA;AAE3D,eAAO,MAAM,eAAe,SAAU,QAAQ,KAAG,mBACL,CAAA;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,SAAU,QAAQ,KAAG,iBAI9C,CAAA;AAED,6EAA6E;AAC7E,eAAO,MAAM,YAAY,SAAU,QAAQ,KAAG,UACW,CAAA;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,SAAU,QAAQ,WAAW,WAAW,GAAG,IAAI,KAAG,SAczE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,aAAa,UACjB,SAAS,aAAa,EAAE,YAAY,MAAM,KAChD,aAAa,GAAG,IASP,CAAA;AAEZ,0EAA0E;AAC1E,eAAO,MAAM,eAAe,UAAW,SAAS,aAAa,EAAE,YAAY,MAAM,KAAG,MACxC,CAAA;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,cAAc,YAAa,QAAQ,SAAS,SAAS,aAAa,EAAE,KAAG,YAYnF,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,SAAU,QAAQ,WAAW,iBAAiB,KAAG,eAa9E,CAAA"}
@@ -0,0 +1,101 @@
1
+ import { WorkcardKind } from '@owlmeans/planning';
2
+ import { ProjectArea } from '../areas/consts.js';
3
+ import { userStoryOfDesign } from '../design/helpers.js';
4
+ import { VIABLE_PROJECT_TYPE, VIABLE_STORY_TYPE, VIABLE_USER_CHANNELS, ViableSpecCategory, } from './consts.js';
5
+ import { ProjectStoryMissconfigured } from './errors.js';
6
+ /** A `viable:project` card — kind AND type, since a foreign provider may share either alone. */
7
+ export const isViableProject = (card) => card != null && card.kind === WorkcardKind.Project && card.type === VIABLE_PROJECT_TYPE;
8
+ /** A `viable:user-story` card. */
9
+ export const isViableStory = (card) => card != null && card.kind === WorkcardKind.Card && card.type === VIABLE_STORY_TYPE;
10
+ /** Whether a write came from a person (`web`, `connect`) rather than the platform's own runs. */
11
+ export const isUserChannel = (channel) => channel != null && VIABLE_USER_CHANNELS.includes(channel);
12
+ export const projectFieldsOf = (card) => (card.fields ?? {});
13
+ /**
14
+ * A story card's fields, with the two required ones always answered.
15
+ *
16
+ * An absent area reads as `guest` — the area that guards nothing — and an absent primary flag as
17
+ * `false`, so a reader never branches on a card written by a store that dropped them.
18
+ */
19
+ export const storyFieldsOf = (card) => {
20
+ const fields = (card.fields ?? {});
21
+ return { ...fields, area: fields.area ?? ProjectArea.Guest, primary: fields.primary === true };
22
+ };
23
+ /** The draft shape the analysis prompts and moderation take, from a card. */
24
+ export const storyDraftOf = (card) => ({ story: card.title, area: storyFieldsOf(card).area });
25
+ /**
26
+ * The aggregate the coders take, for a story CARD.
27
+ *
28
+ * The card wins on the narrative, the code, the area and the actor — a person may have changed any
29
+ * of them since the design was written. The design supplies what only it knows: the entities and
30
+ * the screens. Without a design the aggregate has no screens yet.
31
+ */
32
+ export const userStoryOf = (card, design) => {
33
+ const fields = storyFieldsOf(card);
34
+ const base = design != null
35
+ ? userStoryOfDesign(design)
36
+ : { story: card.title, area: fields.area, entity: null, entities: [], screens: [] };
37
+ const code = card.code ?? base.code;
38
+ return {
39
+ ...base,
40
+ story: card.title,
41
+ ...(code != null ? { code } : {}),
42
+ area: fields.area,
43
+ ...(fields.actor != null ? { actor: fields.actor } : {}),
44
+ };
45
+ };
46
+ /**
47
+ * The current document of one category among a card's specifications.
48
+ *
49
+ * The highest revision wins, then the most recently updated; a category nobody wrote answers
50
+ * `null`.
51
+ */
52
+ export const currentSpecOf = (specs, category) => specs
53
+ .filter(spec => spec.category === category)
54
+ .reduce((best, spec) => {
55
+ if (best == null)
56
+ return spec;
57
+ const byRevision = (spec.revision ?? 0) - (best.revision ?? 0);
58
+ if (byRevision !== 0)
59
+ return byRevision > 0 ? spec : best;
60
+ return (spec.updatedAt ?? spec.createdAt) > (best.updatedAt ?? best.createdAt) ? spec : best;
61
+ }, null);
62
+ /** The body of a category's current document, `''` when there is none. */
63
+ export const currentSpecBody = (specs, category) => currentSpecOf(specs, category)?.body ?? '';
64
+ /**
65
+ * The brief a generator reads, assembled from the project card and its specifications.
66
+ *
67
+ * `name` is the card's title and `alias` its code; a brief part nobody wrote is `''`, which is
68
+ * what every prompt already treats as "not stated".
69
+ */
70
+ export const projectBriefOf = (project, specs) => {
71
+ const { language } = projectFieldsOf(project);
72
+ return {
73
+ name: project.title,
74
+ ...(project.code != null ? { alias: project.code } : {}),
75
+ description: project.description ?? '',
76
+ specification: currentSpecBody(specs, ViableSpecCategory.Specification),
77
+ designSystem: currentSpecBody(specs, ViableSpecCategory.DesignSystem),
78
+ vision: currentSpecBody(specs, ViableSpecCategory.Vision),
79
+ ...(language != null ? { language } : {}),
80
+ };
81
+ };
82
+ /**
83
+ * What the metadata store writes to `docs/stories/<code>.md`, from the card and a run's content.
84
+ *
85
+ * The CODE is the target's only story identifier — a card id never reaches a target file — so a
86
+ * story card without one is refused rather than filed under its id.
87
+ */
88
+ export const storyWriteInputOf = (card, content) => {
89
+ if (card.code == null || card.code === '') {
90
+ throw new ProjectStoryMissconfigured('no-code');
91
+ }
92
+ const { status, ...rest } = content;
93
+ return {
94
+ ...rest,
95
+ code: card.code,
96
+ narrative: card.title,
97
+ status: status ?? card.status,
98
+ primary: storyFieldsOf(card).primary,
99
+ };
100
+ };
101
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/planning/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAGxD,OAAO,EACL,mBAAmB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,kBAAkB,GACjF,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAKxD,gGAAgG;AAChG,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAsB,EAA6B,EAAE,CACnF,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,mBAAmB,CAAA;AAEzF,kCAAkC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAsB,EAA2B,EAAE,CAC/E,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,CAAA;AAEpF,iGAAiG;AACjG,MAAM,CAAC,MAA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AI,IAAI,CAAC,MAAM;QAC7B,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO;KACrC,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ export * from './consts.js';
2
+ export * from './errors.js';
3
+ export * from './schemas.js';
4
+ export * from './flows.js';
5
+ export * from './helpers.js';
6
+ export type * from './types.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/planning/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,mBAAmB,YAAY,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './consts.js';
2
+ export * from './errors.js';
3
+ export * from './schemas.js';
4
+ export * from './flows.js';
5
+ export * from './helpers.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/planning/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,23 @@
1
+ import type { JSONSchemaType } from 'ajv';
2
+ import type { ViableProjectFields, ViableStoryFields } from './types.js';
3
+ /**
4
+ * The `fields` schema of a `viable:project` card.
5
+ *
6
+ * A record-element schema: hand-written, cast, every optional key nullable with its type, every
7
+ * nullable enum listing `null`. Plain strings where the vocabulary grows in a library this record
8
+ * does not redeploy with (blueprint, case, game kind).
9
+ */
10
+ export declare const ViableProjectFieldsSchema: JSONSchemaType<ViableProjectFields>;
11
+ /**
12
+ * The `fields` schema of a `viable:user-story` card.
13
+ *
14
+ * `area` is required, and a create that carries none is still valid by the time it is checked:
15
+ * validation runs after the planning middlewares, and the viable plugin's re-format hook fills the
16
+ * area of a narrative a person wrote.
17
+ */
18
+ export declare const ViableStoryFieldsSchema: JSONSchemaType<ViableStoryFields>;
19
+ /** The open `fields` of a reserved card type — nothing is decided about them yet. */
20
+ export declare const ViableOpenFieldsSchema: JSONSchemaType<Record<string, unknown>>;
21
+ /** A document carries nothing under `fields`: its payload is the specification body. */
22
+ export declare const ViableSpecFieldsSchema: JSONSchemaType<Record<string, never>>;
23
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/planning/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAOzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,EAiBtB,cAAc,CAAC,mBAAmB,CAAC,CAAA;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAWpB,cAAc,CAAC,iBAAiB,CAAC,CAAA;AAEjD,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,EAKnB,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;AAEvD,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,EAKnB,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA"}