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

@ -227,7 +227,7 @@ Norwegian public sector governance (Digdir, DFØ), EU AI Act (Annex III checklis
BCDR planning, hybrid and edge deployment, sovereign cloud (Norway regions), network architecture, monitoring and observability. BCDR planning, hybrid and edge deployment, sovereign cloud (Norway regions), network architecture, monitoring and observability.
> [!NOTE] > [!NOTE]
> All reference documents were generated and verified via the Microsoft Learn MCP server. Regenerate with `/architect:generate-skills` to refresh against current documentation. Check freshness with `bash scripts/kb-staleness-check.sh`. > All reference documents are generated and verified via the Microsoft Learn MCP server. A weekly cron job (`scripts/kb-update/weekly-kb-cron.mjs`) automatically polls Microsoft Learn sitemaps for changes, updates stale files via MCP research, and commits to the repository. Last full update: April 2026. Manual refresh: `/architect:generate-skills --update`.
--- ---

View file

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