What is source code as a source of truth?

Definition

Source code as a source of truth directs developers and agents to inspect the current repository rather than relying on detached summaries of what the system supposedly does. Code, schemas, tests, build configuration, and version history provide direct evidence of the implemented state.

Source code does not explain every intention, so concise documentation remains useful for policy, architecture, and requirements that cannot be inferred safely. The goal is to avoid duplicating rapidly changing implementation details in a separate memory store that can drift without detection.

ELI5

Treating source code as a source of truth means checking the current implementation for how software actually behaves. Code, schemas, tests, build settings, and history provide stronger evidence than a detached summary that may be outdated.

For example, an agent should inspect the current authentication code before explaining its permission rules. Documentation still records requirements and intent that code cannot explain safely, but duplicated implementation details can drift.

Does source code contain every project requirement?

No. Product intent, safety rules, permissions, and future requirements may need documentation, but implementation claims should be checked against current code.

Why should a coding agent inspect source code directly?

Direct inspection reflects the current implementation and reduces the risk of acting on an outdated summary or remembered plan.

  1. Theo Browne beside the words Delete the Memory
Definition card for source code source of truth: What is source code as a source of truth?

Source code as a source of truth means treating the current implementation and its executable constraints as the authoritative record of software behavior.