---
id: 17
title: "Backend: Project model & discovery"
assignee: claude
tags: [backend, projects, architecture]
created: 2026-02-10
---

## Description

Add the concept of a "project" as the top-level abstraction. A project is a standalone board — a directory containing `tasks/`, `prompts/`, `documents/`, and its own config.

### Directory Structure

```
workspace/                    # root dir passed to mdboard
  .mdboard.yaml               # workspace config (project list, order, defaults)
  my-project/
    tasks/
      config.yaml
      backlog/
      todo/
      in-progress/
      review/
      done/
    prompts/
    documents/
  another-project/
    tasks/
      config.yaml
      ...
    prompts/
    documents/
```

### What to build

1. **Workspace config** — `.mdboard.yaml` at the workspace root. Stores project metadata (name, description, order). Projects are auto-discovered by scanning for subdirs containing `tasks/config.yaml`.
2. **Project class** — New class in `server.py` that wraps a Board + two ResourceStores (prompts, documents) for a single project directory.
3. **Workspace class** — Discovers projects in the workspace dir, creates/manages Project instances, provides listing.
4. **Backward compatibility** — If the server is pointed at a directory that IS a project (has `tasks/config.yaml` directly), run in single-project mode seamlessly.

## Acceptance Criteria
- [ ] `.mdboard.yaml` schema defined and loaded
- [ ] Project class encapsulates Board + ResourceStores for one project
- [ ] Workspace class discovers projects by scanning subdirectories
- [ ] Auto-discovery: any subdir with `tasks/config.yaml` is a project
- [ ] Single-project backward compat: existing setups work without changes
- [ ] Unit-testable: classes can be instantiated without starting server

## Notes
