Establish a single, explicit source-of-truth approach for configuration resolution: (1) honor user-supplied overrides first, (2) otherwise derive from the active context/environment, and (3) only then fall back to defaults; additionally, treat repository-level configuration/lock files as canonical entrypoints for developer tooling.
How to apply:
Example (pattern for precedence):
export async function runLogsCommand(opts = {}) {
const baseUrl =
opts.baseUrl ||
opts["base-url"] ||
getBaseUrl({ context: opts.context }); // derived from active context/env
// ...use baseUrl to build requests
}