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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user