feat(ms-ai-architect): tune weekly KB cron and update README

- Remove file limit (was 10, now processes all critical+high+medium)
- Increase max-turns to 200 and timeout to 60min
- Add medium priority to update filter
- Update README KB note to reflect automated weekly updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-04-10 11:47:05 +02:00
commit 589711e29b
2 changed files with 6 additions and 5 deletions

View file

@ -18,7 +18,7 @@ const DATA_DIR = join(__dirname, 'data');
const CLAUDE_BIN = '/Users/ktg/.local/bin/claude';
const LOG_FILE = '/tmp/kb-cron.log';
const MAX_UPDATE_FILES = 10;
const MAX_UPDATE_FILES = Infinity;
function log(msg) {
const ts = new Date().toISOString();
@ -83,7 +83,7 @@ if (critical + high === 0) {
// Build list of stale files (critical + high only, max MAX_UPDATE_FILES)
const staleFiles = (report.files || [])
.filter(f => f.priority === 'critical' || f.priority === 'high')
.filter(f => f.priority === 'critical' || f.priority === 'high' || f.priority === 'medium')
.slice(0, MAX_UPDATE_FILES);
log(`Spawning Claude to update ${staleFiles.length} stale files...`);
@ -131,11 +131,12 @@ try {
execFileSync(CLAUDE_BIN, [
'-p', prompt,
'--model', 'sonnet',
'--permission-mode', 'acceptEdits',
'--allowedTools', 'Read,Edit,Bash,Glob,Grep,mcp__microsoft-learn__microsoft_docs_search,mcp__microsoft-learn__microsoft_docs_fetch',
'--max-turns', '30',
'--max-turns', '200',
], {
stdio: 'inherit',
timeout: 15 * 60 * 1000,
timeout: 60 * 60 * 1000,
cwd: PLUGIN_ROOT,
});
log('Claude session completed.');