-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathoutput.schema.json
More file actions
111 lines (111 loc) · 4.62 KB
/
output.schema.json
File metadata and controls
111 lines (111 loc) · 4.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"title": "DesignDecisions",
"description": "Explicit design decisions derived from Stage 1 router concepts and reference implementations, used by Stage 3 to generate code.",
"type": "object",
"additionalProperties": false,
"required": ["selectedHook", "wrappingStrategy", "viewNameAlgorithm", "targetPackage", "referenceImplementation", "ssr"],
"properties": {
"selectedHook": {
"type": "object",
"additionalProperties": false,
"required": ["name", "rationale"],
"properties": {
"name": {
"type": "string",
"description": "Hook name from 01-router-concepts.json, selected by the deterministic priority rules."
},
"rationale": {
"type": "string",
"description": "Which rules each candidate passed/failed and why the selected hook won."
}
}
},
"wrappingStrategy": {
"type": "object",
"additionalProperties": false,
"required": ["pattern", "target", "rationale"],
"properties": {
"pattern": {
"enum": ["wrap-factory", "renderless-component", "provider", "wrap-hook", "other"],
"description": "wrap-factory: Wrap the router creation function, subscribe to hook inside. renderless-component: Component that calls the hook during lifecycle. provider: DI provider that injects the router and subscribes to events. wrap-hook: Wrap a user-facing hook to intercept route data. other: Escape hatch for unknown patterns."
},
"target": {
"type": "string",
"description": "What specifically to wrap/provide. E.g. 'createRouter from vue-router', 'ENVIRONMENT_INITIALIZER with inject(Router)'."
},
"rationale": {
"type": "string",
"description": "Why this is idiomatic for the framework."
}
}
},
"viewNameAlgorithm": {
"type": "object",
"additionalProperties": false,
"required": ["family", "rationale"],
"properties": {
"family": {
"enum": ["route-id", "matched-records", "param-substitution"],
"description": "route-id: Framework provides parameterized route pattern as string. Minimal post-processing. matched-records: Framework provides matched route records. Iterate and concatenate path segments. param-substitution: Framework provides evaluated pathname + params. Reconstruct route template. Least preferred."
},
"rationale": {
"type": "string",
"description": "Why this family, based on the hook's availableApi."
}
}
},
"targetPackage": {
"type": "object",
"additionalProperties": false,
"required": ["mode", "package"],
"properties": {
"mode": {
"enum": ["new-package", "extend-existing"],
"description": "new-package: Create a new packages/rum-<framework>/ from scratch. extend-existing: Add router support to an existing package (e.g. adding TanStack Router to rum-react)."
},
"package": {
"type": "string",
"description": "Target package directory name. For new-package: 'rum-<framework>'. For extend-existing: the existing package (e.g. 'rum-react')."
},
"subpath": {
"type": "string",
"description": "Only for extend-existing. The subdirectory for this router's files within the existing package. E.g. 'src/domain/tanstackRouter/' within packages/rum-react/."
}
}
},
"referenceImplementation": {
"type": "object",
"additionalProperties": false,
"required": ["primary", "rationale"],
"properties": {
"primary": {
"type": "string",
"description": "Which packages/rum-* to model after (e.g. 'rum-vue'). Stage 3 reads this implementation as its primary source for code patterns."
},
"rationale": {
"type": "string",
"description": "Why this is the closest match."
}
}
},
"ssr": {
"type": "object",
"additionalProperties": false,
"required": ["handling"],
"properties": {
"handling": {
"type": "string",
"description": "How to ensure client-side-only execution. 'N/A' if ssr.supported is false in Stage 1."
}
}
},
"notes": {
"type": "string",
"description": "Free text for additional design context, trade-offs, unmapped concepts, or anything Stage 3 needs to know."
},
"exitReason": {
"type": "string",
"description": "Only set if Stage 2 cannot proceed (e.g., no hook satisfies afterCancellation: true). When set, all other fields may be empty stubs and the pipeline will stop."
}
}
}