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

Function parseReadinessReport

scripts/stack-plan.js:77–98  ·  view source on GitHub ↗
(projectRoot, filePath)

Source from the content-addressed store, hash-verified

75}
76
77function parseReadinessReport(projectRoot, filePath) {
78 const content = readText(filePath);
79 if (!content) return null;
80 const relativePath = normalizePath(path.relative(projectRoot, filePath));
81 const status = lineValue(content, 'Status') || 'unknown';
82 const branch = lineValue(content, 'Branch') || path.basename(filePath, path.extname(filePath));
83 return {
84 path: relativePath,
85 generatedAt: lineValue(content, 'Generated') || null,
86 status,
87 ready: status === 'ready',
88 pr: lineValue(content, 'PR') || null,
89 branch,
90 head: lineValue(content, 'Head') || null,
91 gates: {
92 prUrl: gateStatus(content, 'Pull request URL'),
93 git: gateStatus(content, 'Git worktree'),
94 dashboard: gateStatus(content, 'Dashboard repairs'),
95 verification: gateStatus(content, 'Verification'),
96 },
97 };
98}
99
100function readReadinessReports(projectRoot) {
101 const dir = path.join(projectRoot, '.planning', 'pr-readiness');

Callers 2

readReadinessReportsFunction · 0.70
test-stack-plan.jsFile · 0.70

Calls 4

readTextFunction · 0.70
normalizePathFunction · 0.70
lineValueFunction · 0.70
gateStatusFunction · 0.70

Tested by

no test coverage detected