MCPcopy Create free account
hub / github.com/SethGammon/Citadel / checkSetup

Function checkSetup

scripts/operating-proof.js:101–133  ·  view source on GitHub ↗
(projectRoot, dashboard)

Source from the content-addressed store, hash-verified

99}
100
101function checkSetup(projectRoot, dashboard) {
102 const requiredState = listExisting(projectRoot, [
103 '.planning',
104 '.planning/campaigns',
105 '.planning/telemetry',
106 ]);
107 const hasCompleteSetup = requiredState.includes('.planning/campaigns')
108 && requiredState.includes('.planning/telemetry');
109
110 if (hasCompleteSetup) {
111 return {
112 id: 'setup',
113 status: 'pass',
114 detail: `planning state present (${requiredState.join(', ') || '.planning'})`,
115 evidence: requiredState,
116 };
117 }
118
119 const setupHint = dashboard.nextAction?.command === '/do setup --express';
120 const hasPartialSetup = requiredState.includes('.planning');
121 const partialEvidence = unique([
122 ...requiredState,
123 '/do setup --express',
124 ]);
125 return {
126 id: 'setup',
127 status: setupHint || hasPartialSetup ? 'partial' : 'fail',
128 detail: setupHint || hasPartialSetup
129 ? 'project is not initialized yet; dashboard points to /do setup --express'
130 : 'project is missing complete setup state and dashboard did not provide an express setup path',
131 evidence: setupHint || hasPartialSetup ? partialEvidence : requiredState,
132 };
133}
134
135function checkOrient(dashboard) {
136 const action = dashboard.nextAction || {};

Callers 1

buildProofFunction · 0.85

Calls 2

listExistingFunction · 0.85
uniqueFunction · 0.70

Tested by

no test coverage detected