Files
TORCH/scripts/fix-duplication.mjs
T
google-labs-jules[bot]andPR0M3TH3AN 58c4f14d57 docs(prompts): sync roster.json and scheduler rosters
- Updated roster.json based on prompt directory scan.
- Regenerated daily and weekly scheduler markdown tables.
- Added run artifacts and task log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 02:10:29 +00:00

33 lines
917 B
JavaScript

import fs from 'fs';
const fix = (filePath) => {
let content = fs.readFileSync(filePath, 'utf8');
const header = '| # | Agent Name | Prompt File |\n|---|------------|-------------|';
const parts = content.split(header);
if (parts.length < 2) return; // Should not happen
const pre = parts[0];
const post = parts[1];
const lines = post.split('\n');
const tableLines = [];
let i = 0;
// Skip initial empty lines if any (though usually generateTable doesn't add them at start)
while(i < lines.length && lines[i].trim() === '') i++;
// Capture rows
while(i < lines.length && lines[i].trim().startsWith('|')) {
tableLines.push(lines[i]);
i++;
}
const newContent = pre + header + '\n' + tableLines.join('\n') + '\n';
fs.writeFileSync(filePath, newContent);
console.log(`Fixed ${filePath}`);
};
fix('src/prompts/daily-scheduler.md');
fix('src/prompts/weekly-scheduler.md');