Correct Code Framework teaches learners to investigate before they answer. The CCF discipline transfers across technical domains, while each domain-specific pipeline adapts to its own evidence, constraints, and proof rules.
�What tool, command, pattern, process, or answer should I use?�
This pushes people toward action before they understand the motive, scope, legal movement, evidence, risk, or invariant that makes the action lawful.
�What must be true before this action is trusted?�
This forces the investigator to define intent, scope, route, evidence, constraints, invariant, verification, and closure before acting.
| Domain | Intent | Scope | Route | Invariant |
|---|---|---|---|---|
| Git | Move repository state. | Files, hunks, commits, branches. | Add, commit, merge, revert, reset. | No important work is lost. |
| Codex | Delegate engineering work. | Repo, files, feature, tests. | Investigate, patch, test, summarize. | Architecture and behavior remain safe. |
| Debugging | Find the cause of failure. | Logs, stack trace, failing path, state. | Reproduce, isolate, test, fix. | The real cause is fixed, not hidden. |
| Architecture | Place responsibility correctly. | API, application, domain, infrastructure. | Route behavior through proper layers. | Business truth stays protected. |
| Databases | Change persistent state. | Tables, rows, indexes, transactions. | Query, update, commit, rollback. | Data remains consistent. |
| Algorithms | Produce a correct answer. | Problem space and active frame. | Traversal, operator, recorder, termination. | Correctness survives every step. |
Turns confusion into a sequence of why, what, who, which, how, where, and when.
Removes tools, commands, routes, and solutions that violate the current structure.
Identifies the route that fits the intent, scope, constraints, and invariant.
Turns the final answer into a closing argument that can be explained and reviewed.
| Primitive | Question | Reasoning Concern | Decision Value |
|---|---|---|---|
| WHY | Why is the system moving? | Intent, motive, purpose, success condition. | Prevents solving the wrong problem. |
| WHAT | What exists and what must be produced? | Inputs, outputs, state, environment, deliverable. | Defines the problem space and answer space. |
| WHERE | Where is evaluation allowed? | Scope, boundary, frame, file, module, region, layer. | Prevents touching the wrong area. |
| WHO | Who owns the state or evidence? | Recorder, source of truth, state owner, evidence container. | Identifies where proof lives. |
| WHICH | Which candidate qualifies? | Constraints, validation, selection, exclusion, survivor logic. | Separates valid evidence from invalid evidence. |
| HOW | How should movement occur? | Route, operation, scanner, command, algorithm, workflow. | Chooses the lawful method. |
| WHEN | When is the case complete? | Dependency, timing, termination, verification, closure. | Prevents premature action and endless work. |
Intent explains why the system moves. It defines the purpose, goal, motive, and success condition. Without intent, the system may execute the wrong action correctly.
Failure mode: solving the wrong problem.
Scope explains what the system is allowed to touch. It defines the environment, boundary, frame, module, file, state region, or candidate group.
Failure mode: touching the wrong area.
Route explains how movement occurs. It defines the operation, traversal, command, workflow, algorithm, or transition path.
Failure mode: using the wrong method.
Invariant explains what must remain true. It is the proof condition that keeps the system correct while movement occurs.
Failure mode: producing output that runs but is not lawful.
| Stability Concern | Universal Question | Computer Science Examples | Stability Test |
|---|---|---|---|
| INTENT | Why are we moving? | Find pair, commit work, fix bug, send packet, execute instruction. | Can the system explain the outcome it exists to produce? |
| SCOPE | What are we allowed to touch? | Array window, Git files, service layer, memory segment, database rows. | Can the system explain the boundary of lawful action? |
| ROUTE | How do we move? | Two pointers, merge, transaction, API pipeline, fetch-decode-execute. | Can the system justify the method without guessing? |
| INVARIANT | What must remain true? | Sorted window validity, no lost commits, valid domain state, message integrity. | Can the system prove correctness survives movement? |
Instead of holding the whole problem in your head, you answer one lawful question at a time.
It teaches when a tool is lawful, not just what the tool does.
Every route must preserve the invariant, which turns action into proof.
The final answer can be defended as a closing argument instead of shown as a trick.
The same pattern works for algorithms, Git, Codex, databases, debugging, and systems.
Learners stop depending on memorized labels and start deriving lawful decisions.
| Existing Name | Domain | What It Does | CCF Interpretation |
|---|---|---|---|
| Scientific Method | Science | Observation, hypothesis, test, conclusion. | Evidence-driven reasoning pipeline. |
| OODA Loop | Military / Strategy | Observe, orient, decide, act. | Decision pipeline under uncertainty. |
| Decision Tree | Analytics / AI | Sequence of branching questions. | Structured elimination pipeline. |
| Root Cause Analysis | Engineering | Trace symptoms back to causes. | Debugging reasoning pipeline. |
| Incident Response | Security / Operations | Detect, contain, investigate, recover. | System-stability pipeline. |
| Precondition / Postcondition | Formal Methods | Prove what must be true before and after execution. | Invariant-centered reasoning. |
| CCF Reasoning Pipeline | Computer Science Learning | Intent, scope, route, invariant, evidence, movement, proof. | General-purpose computational reasoning framework. |
Algorithms are often taught as named solutions: binary search, DFS, BFS, dynamic programming, sliding window. This gives students labels but not always the decision logic behind the labels.
Missing layer: solution selection.
Syntax is easy to grade. A final answer is easy to check. But the reasoning path requires teaching questions, constraints, invariants, evidence, and proof.
Missing layer: structured investigation.
| Problem | Without A Pipeline | With A Pipeline | Adoption Benefit |
|---|---|---|---|
| Algorithms | Pattern guessing. | Structure-driven derivation. | Better unfamiliar problem solving. |
| Git | Command memorization. | Repository-state reasoning. | Fewer lost changes and safer history. |
| Codex / AI Agents | Vague prompts. | Scoped engineering delegation. | More reliable AI-generated work. |
| Architecture | Layer confusion. | Intent, boundary, route, invariant alignment. | Cleaner systems and better design decisions. |
| Debugging | Random code changes. | Evidence-first investigation. | Faster root-cause discovery. |
| Education | Memorization dependency. | Decision-making skill. | Higher confidence and deeper transfer. |
Use the pipeline to derive lawful movement instead of memorizing patterns.
Use the pipeline to move repository state safely.
Use the pipeline to direct AI agents as engineering investigators.
Use the pipeline to protect state through transactions.