MCPcopy
hub / github.com/Fission-AI/OpenSpec / makeRoot

Function makeRoot

src/core/root-selection.ts:108–122  ·  view source on GitHub ↗
(
  rootPath: string,
  source: OpenSpecRootSource,
  storeId?: string
)

Source from the content-addressed store, hash-verified

106}
107
108function makeRoot(
109 rootPath: string,
110 source: OpenSpecRootSource,
111 storeId?: string
112): ResolvedOpenSpecRoot {
113 return {
114 path: rootPath,
115 changesDir: path.join(rootPath, 'openspec', 'changes'),
116 specsDir: path.join(rootPath, 'openspec', 'specs'),
117 archiveDir: path.join(rootPath, 'openspec', 'changes', 'archive'),
118 defaultSchema: 'spec-driven',
119 source,
120 ...(storeId ? { storeId } : {}),
121 };
122}
123
124function canonicalDirectory(startPath: string): string {
125 const resolved = path.resolve(startPath);

Callers 3

resolveStoreRootFunction · 0.85
resolveOpenSpecRootFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected