DEV Community

Cover image for The Rules That Make History Trustworthy
synthaicode
synthaicode

Posted on

The Rules That Make History Trustworthy

Why Log Prompts Are Infrastructure, Not Instructions

Up to this point in this series, I intentionally avoided showing
any concrete “log prompts” or detailed operational rules.

That wasn’t because they don’t exist.

It was because showing them too early makes them look like
AI instructions.

They aren’t.

What follows is not a prompt.
It is infrastructure.


What These Rules Actually Control

Let’s be precise about the scope.

These rules do not control:

  • how the AI reasons
  • how ideas are generated
  • how exploration happens
  • how conversations flow

They control exactly one thing:

What is allowed to become history.

That is why they must exist,
and why they must be stable.


Global Operation Rules

These rules live alongside the repository.
They are not session-specific.
They are not conversational.

They define historical legitimacy.


diff_log Operation Rules

### diff_log usage
- All design changes and structural differences must be added to `docs/diff_log/`
  and saved in the format `diff_{feature}_{YYYYMMDD}.md`.
- Important architectural updates and migration-related changes
  must always be recorded in `diff_log/`.
Enter fullscreen mode Exit fullscreen mode

This is not about documentation quality.
This is a single-source-of-truth declaration.

If a decision is not in diff_log/,
it does not exist historically.


Progress Log Operation (Kafka.Context)

Purpose

- Make it possible to trace “what was decided” and “why” later.
- Explicitly welcome “we don’t know yet” to surface uncertainty early.
Enter fullscreen mode Exit fullscreen mode

Especially this point matters:

“We don’t know yet” is welcome.

History that hides uncertainty

quietly becomes fiction.


Recording Locations

- Design differences (decisions / changes): `docs/diff_log/`
- Feature-level working notes (implementation, tests, validation):
  `features/{feature-name}/`
Enter fullscreen mode Exit fullscreen mode

This enforces a rule explained earlier in the series:

Exploration and decisions must never share a container.


Minimal Rules

- If uncertainties remain, always record them explicitly as
  “unresolved questions”.
- Every unresolved question must include a clear next action.
- Any decision that affects external users, contracts, or guarantees
  must be recorded in the decision history.
- Exploratory work and provisional thinking must never be recorded
  as historical fact.
Enter fullscreen mode Exit fullscreen mode

These are not workflow optimizations.

They are boundaries for historical validity.


Why This Is Not an AI Prompt

It may look like something you would give to an AI.

It isn’t.

These rules do not say:

  • “write logs like this”
  • “behave this way”
  • “follow these steps”

Instead, they say:

Only artifacts that follow these rules are allowed to survive.

AI behavior adapts naturally to that reality.


Where to Put These Rules (Quick Reference)

Because these rules are infrastructure,
where they live matters as much as what they say.

| Tool / Environment | Entry Point File (AI reads first) | Canonical Rule Location | Notes |
|--------------------|----------------------------------|--------------------------|-------|
| Claude Code (CLI)  | `CLAUDE.md`                      | `docs/workflows/context_infrastructure.md` | Keep entry file short; link to canonical rules. |
| Cursor / VS Code   | `.cursorrules`                   | `docs/workflows/context_infrastructure.md` | Auto-loaded at project start. |
| GitHub Copilot     | `README.md`                      | `docs/workflows/context_infrastructure.md` | No single standard; rely on README discovery. |
| Claude Projects    | Project Instructions / Knowledge | `docs/workflows/context_infrastructure.md` | Add canonical rules as Project Knowledge. |
| ChatGPT (Web)      | Manual attachment                | `docs/workflows/context_infrastructure.md` | Attach or paste at session start. |
Enter fullscreen mode Exit fullscreen mode

The rules themselves live in one place only:

docs/workflows/context_infrastructure.md is the canonical source.
All other files are entry points, not duplicates.


Why This Must Be Stable Infrastructure

If these rules change frequently:

  • history becomes inconsistent
  • older decisions lose legitimacy
  • context reconstruction breaks

That’s why these rules are:

  • boring
  • conservative
  • slow to change

Infrastructure should be harder to change than code.


How AI Learns These Rules

AI is not trained on these rules explicitly.

It learns them by observing:

  • which artifacts persist
  • which are referenced later
  • which are ignored or discarded

History teaches behavior better than instructions.


The Key Inversion

Most systems try to control AI like this:

“Please behave correctly.”

This system does the opposite:

“Only correct things are allowed to remain.”

That inversion is the core of this series.


Closing

These rules are not about logging.
They are about trust.
If you want to collaborate with AI over months,
history must be:

  • sparse
  • explicit
  • authoritative

That does not happen by accident.
It happens because infrastructure enforces it.


This article is part of the Context as Infrastructure series —
exploring how long-term AI collaboration depends on structure, not memory.

Top comments (0)