Maintain consistent coding patterns and prioritize readability to make code easier to understand and maintain. This includes using consistent approaches for similar operations, avoiding overly complex constructions, and ensuring code follows predictable patterns.

Key practices:

Example of improving consistency:

// Inconsistent - different patterns for similar operations
const upgrades = Object.keys(upgrade);
const pins = Object.keys(pin);
if (Object.keys(patch).length) { // Different pattern

// Consistent - same pattern for all similar operations  
const upgrades = Object.keys(upgrade);
const pins = Object.keys(pin);
const patches = Object.keys(patch);
if (patches.length) {

Example of extracting complex conditions:

// Hard to read when repeated
if (options.iac && options.report && !options.legacy) {

// Extract to descriptive function
const isIacReportFlow = () => options.iac && options.report && !options.legacy;
if (isIacReportFlow()) {

This approach reduces cognitive load, makes code more predictable, and helps maintain consistency across the codebase.