@company-semantics/contracts 0.45.0 → 0.46.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/src/index.ts CHANGED
@@ -312,6 +312,7 @@ export { ENVELOPE_TRANSITIONS } from './ci-envelope/index'
312
312
  // @see company-semantics-control/docs/ralph.md for usage
313
313
  export type {
314
314
  // PRD types
315
+ AllowedRepo,
315
316
  RalphPRDCategory,
316
317
  RalphPRDPriority,
317
318
  RalphPRDItem,
@@ -330,4 +331,7 @@ export type {
330
331
  RalphTL3Policy,
331
332
  RalphTrustPolicy,
332
333
  RalphDemotionReason,
333
- } from './ralph/index'
334
+ } from './ralph/index';
335
+
336
+ // Ralph constants (cross-repo support)
337
+ export { REPO_PRECEDENCE } from './ralph/index'
@@ -12,12 +12,16 @@
12
12
 
13
13
  // PRD types
14
14
  export type {
15
+ AllowedRepo,
15
16
  RalphPRDCategory,
16
17
  RalphPRDPriority,
17
18
  RalphPRDItem,
18
19
  RalphPRD,
19
20
  } from './prd';
20
21
 
22
+ // PRD constants (cross-repo support)
23
+ export { REPO_PRECEDENCE } from './prd';
24
+
21
25
  // Progress types
22
26
  export type {
23
27
  RalphIteration,
package/src/ralph/prd.ts CHANGED
@@ -10,6 +10,35 @@
10
10
  * @see company-semantics-control/docs/ralph.md for usage
11
11
  */
12
12
 
13
+ // =============================================================================
14
+ // Cross-Repo Types
15
+ // =============================================================================
16
+
17
+ /**
18
+ * Allowed sibling repositories in the company-semantics release universe.
19
+ * Order matters: contracts must come first (dependency source).
20
+ *
21
+ * Used for:
22
+ * - Per-feature repo targeting in PRDs
23
+ * - Contracts cascade updates
24
+ * - Validation of repo graph (no cycles)
25
+ */
26
+ export const REPO_PRECEDENCE = [
27
+ 'company-semantics-contracts',
28
+ 'company-semantics-control',
29
+ 'company-semantics-ci',
30
+ 'company-semantics-backend',
31
+ 'company-semantics-edge',
32
+ 'company-semantics-site',
33
+ 'company-semantics-app',
34
+ ] as const;
35
+
36
+ /**
37
+ * Valid repository names for cross-repo PRD features.
38
+ * Derived from REPO_PRECEDENCE for type safety.
39
+ */
40
+ export type AllowedRepo = (typeof REPO_PRECEDENCE)[number];
41
+
13
42
  // =============================================================================
14
43
  // PRD Item Types
15
44
  // =============================================================================
@@ -53,6 +82,8 @@ export type RalphPRDItem = {
53
82
  priority: RalphPRDPriority;
54
83
  /** IDs of features that must complete before this one */
55
84
  blockedBy?: string[];
85
+ /** Target repository for this feature (inherits from PRD if omitted) */
86
+ repo?: AllowedRepo;
56
87
  };
57
88
 
58
89
  // =============================================================================