JoyJoy Docs

Architecture

Joy's internal architecture - crate structure, data model, status workflow, and configuration.

Crate Structure

Joy is implemented in Rust as a set of crates within the joyint/joy repository. The joy-core library crate contains the shared logic, while joy-cli and joy-ai are binary and library crates that depend on it.

What joy-core Provides

ModulePurpose
Item modelTypes, priorities, effort, tags, dependencies, parent-child relationships
YAML I/ORead and write .joy/ files with validation
Status logicState machine for item lifecycle
Event logAppend-only log of all actions for audit
Config systemLayered configuration with defaults, project, and personal overrides
Git integrationCommit detection, branch awareness, VCS abstraction

Data Model

The data model centers on workspaces, projects, items, and milestones.

Item Types

Every item has a type that describes what kind of work it represents:

TypePurpose
epicLarge body of work, contains child items
storyUser-facing feature or change
taskTechnical work, implementation step
bugDefect to fix
reworkImprovement to existing code (refactor, cleanup)
decisionArchitectural or process decision to document
ideaCaptured thought, not yet committed to

Priority and Effort

Priority levels: critical, high, medium, low.

Effort uses a 1-7 scale: 1 = trivial, 2 = small, 3 = medium, 4 = large, 5 = major, 6 = heavy, 7 = massive.

Status Workflow

Items follow a defined lifecycle. The status workflow ensures items move through predictable states.

Status Descriptions

StatusMeaning
newJust created, not yet triaged
openAccepted and ready to work on
in-progressActively being worked on
reviewWork done, waiting for review
closedCompleted and verified
deferredPostponed, can be reopened later

Config Layering

Joy uses a layered configuration system. Each layer overrides the previous one, so project settings can override defaults, and personal preferences can override project settings.

How Layering Works

  1. Code defaults - Hard-coded values in joy-core. Always present, always reasonable.
  2. config.defaults.yaml - Shipped with Joy, defines the default configuration schema and values.
  3. Global config - User-level settings in ~/.config/joy/config.yaml. Apply to all workspaces.
  4. Personal config - Project-level personal overrides in .joy/config.personal.yaml. Gitignored, per-user.

Each layer only needs to specify the values it wants to override. Everything else falls through to the layer below.