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

Function writeTrial

scripts/usefulness-trial.js:207–214  ·  view source on GitHub ↗
(projectRoot, trial)

Source from the content-addressed store, hash-verified

205 lines.push(`- Task: ${trial.task}`);
206 lines.push(`- Next: ${trial.nextAction}`);
207 lines.push('---');
208 return `${lines.join('\n')}\n`;
209}
210
211function writeTrial(projectRoot, trial) {
212 const outDir = path.join(projectRoot, '.planning', 'usefulness-trial');
213 fs.mkdirSync(outDir, { recursive: true });
214 const outPath = path.join(outDir, 'latest.md');
215 fs.writeFileSync(outPath, renderTrial(trial), 'utf8');
216 trial.reportPath = normalizePath(path.relative(projectRoot, outPath));
217 return trial.reportPath;

Callers 2

mainFunction · 0.85

Calls 2

renderTrialFunction · 0.85
normalizePathFunction · 0.70

Tested by

no test coverage detected