# Core File Structure (Strict)

This document defines the canonical **physical** structure for `core/`.

It describes where code lives, not the full behavioral rules.

Core rules and responsibilities are defined elsewhere.

## 1) Core is feature-based

Core is organized by bounded context / feature.

```text
core/
  shared/
  <context>/
    domain/
    application/
```

## 2) `core/<context>/domain/`

Domain contains business truth.

Canonical folders:

```text
core/<context>/domain/
  entities/
  value-objects/
  services/
  events/
  errors/
```

See [`docs/architecture/core/DOMAIN_OBJECTS.md`](docs/architecture/core/DOMAIN_OBJECTS.md:1).

## 3) `core/<context>/application/`

Application coordinates business intents.

Canonical folders:

```text
core/<context>/application/
  commands/
  queries/
  use-cases/
  services/
  ports/
```

See:

- [`docs/architecture/core/USECASES.md`](docs/architecture/core/USECASES.md:1)
- [`docs/architecture/core/CQRS.md`](docs/architecture/core/CQRS.md:1)

