From d77141e9859082df89071bc44ff55a6303d42779 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Mon, 19 Jan 2026 23:40:51 -0600 Subject: [PATCH] feat(02-01): integrate convention detection into index update flow - Call detectConventions() after every index.json write - Write conventions.json alongside index.json - No staleness check needed - detection is fast, always regenerated --- hooks/intel-index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hooks/intel-index.js b/hooks/intel-index.js index 1c2390d17..6b04b4b5d 100755 --- a/hooks/intel-index.js +++ b/hooks/intel-index.js @@ -351,6 +351,11 @@ function updateIndex(filePath, exports, imports) { // Write atomically fs.writeFileSync(indexPath, JSON.stringify(index, null, 2)); + + // Detect and save conventions (regenerated on every index update) + const conventions = detectConventions(index); + const conventionsPath = path.join(process.cwd(), '.planning', 'intel', 'conventions.json'); + fs.writeFileSync(conventionsPath, JSON.stringify(conventions, null, 2)); } // Read JSON from stdin (standard hook pattern)