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
This commit is contained in:
Lex Christopherson
2026-01-19 23:40:51 -06:00
parent 06ac420326
commit d77141e985

View File

@@ -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)