Skip to content

Instantly share code, notes, and snippets.

@pedrovasconcellos
Created November 3, 2025 04:47
Show Gist options
  • Select an option

  • Save pedrovasconcellos/c5a91994a660e199e2f3bc933ecd84bf to your computer and use it in GitHub Desktop.

Select an option

Save pedrovasconcellos/c5a91994a660e199e2f3bc933ecd84bf to your computer and use it in GitHub Desktop.
What is a Memory Bank?

What Is the Memory Bank For?

They are checklists that serve as verification guides to ensure that changes carried out by artificial intelligence (AI) in the code respect the defined standards and workflows of the project, reducing errors and maintaining consistency.

1. Before implementing

Purpose

Ensure that the work starts with the correct understanding and planning.

What it does

  • "Reviewed the conventions" — reads the project standards before starting
  • "Identified the affected layers" — defines which layers will be affected in order to choose the workflow (Quick/Task)
  • "Declared/updated the required gateways and DTOs" — declares interfaces (ports) first, not afterwards

Why it is important

  • Prevents dependency violations
  • Defines contracts before implementing
  • Chooses the appropriate workflow

2. During implementation

Purpose

Maintain quality and principles throughout development.

What it does

  • "Dependencies flow inward only" — ensures that dependencies flow inward
  • "Adapters remain thin" — avoids business logic in the adapters.
  • "Configurable values read through the configuration layer" — avoids hardcoded values

Note: Adapters should be responsible only for translation, orchestration, and input/output. Business logic must reside in the entities and domain services.

Why it is important

  • Keeps the architecture clean during the work
  • Preserves testability
  • Facilitates future maintenance

3. Before requesting review

Purpose

Ensure that everything is complete and documented before asking for a review.

What it does

  • "Tests updated/passing" — ensures tests for the affected layers
  • "Documentation adjusted" — updates the relevant documentation
  • "Memory Bank context + quick changes recorded" — records changes in the memory system

Why it is important

  • Prevents reviews with incomplete work
  • Keeps the documentation up to date
  • Preserves the history of changes

Overall assessment

Conclusion

Strengths:

  • ✅ Covers the entire cycle (before, during, and after)
  • ✅ Focus on Clean Architecture (dependencies, layers)
  • ✅ Practical and actionable
  • ✅ Useful for AIs (clear checkpoints)
  • ✅ Integrates with the project’s memory system

Value:

  • For humans: mental checklists
  • For AIs: programmatic guides
  • For the project: consistency and quality

Recommendations (optional)

  • Add brief examples of what “not to do”
  • Specify where to record changes in the Memory Bank
  • Include automated validation whenever possible (for example, import verification)

The checklists work as:

  • 🎯 quality guides to maintain project standards
  • 🛡️ prevention of common errors (dependencies, logic in the wrong place)
  • 📋 consistent work pattern
  • 🤖 clear instructions for AIs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment