ccguard
Version:
Automated enforcement of net-negative LOC, complexity constraints, and quality standards for Claude code
30 lines (28 loc) • 1.01 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SnapshotCommand = void 0;
exports.SnapshotCommand = {
name: 'snapshot',
description: 'Take a snapshot of the current project LOC baseline',
execute: async (guardManager) => {
try {
const result = await guardManager.takeSnapshot();
return {
decision: 'block',
reason: `Snapshot baseline updated successfully!
New LOC threshold set:
• Maximum allowed LOC: ${result.totalLoc}
• Files tracked: ${result.fileCount}
• Timestamp: ${new Date(result.timestamp).toLocaleString()}
Any changes that would exceed ${result.totalLoc} lines will be rejected.`,
};
}
catch (error) {
return {
decision: 'block',
reason: `Failed to take snapshot: ${error instanceof Error ? error.message : 'Unknown error'}`,
};
}
}
};
//# sourceMappingURL=SnapshotCommand.js.map