(projectRoot, dashboard)
| 99 | } |
| 100 | |
| 101 | function 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 | |
| 135 | function checkOrient(dashboard) { |
| 136 | const action = dashboard.nextAction || {}; |
no test coverage detected