# Ticket 3.6 — Recent Projects Tracking

**Phase**: 3 — Daemon & CLI
**Priority**: Low
**Depends on**: 3.1, 3.2

## Description

Track recently used projects in a config file (`~/.conduit/config.json`) so the daemon can restore them on restart and the CLI can show quick-access suggestions.

## Acceptance Criteria

### AC1: Records project on registration

```gherkin
Given a project is registered with the daemon
When the registration succeeds
Then the project directory and slug are saved to ~/.conduit/config.json
And the timestamp of last use is recorded
```

### AC2: Persists across daemon restarts

```gherkin
Given 3 projects were registered before the daemon stopped
When the daemon restarts
Then it reads the config file
And it can display the recent projects list (but does NOT auto-register them)
```

### AC3: Limits list size

```gherkin
Given 20 projects have been registered over time
When a 21st is registered
Then the oldest project is removed from the recent list
And the list never exceeds 20 entries
```

### AC4: CLI shows recent projects

```gherkin
When I run `npx conduit --list`
Then it shows currently registered projects AND recent projects (inactive)
And recent projects are marked as "(inactive — run conduit in that directory to re-register)"
```

## Testable Components

| Component | Test Type | What to Assert |
|-----------|-----------|----------------|
| `addRecent(directory, slug)` | Unit | Appends to config, updates timestamp |
| `getRecent()` | Unit | Returns sorted list, most recent first |
| `pruneRecent(maxSize)` | Unit | Removes oldest when over limit |
| Config file I/O | Unit | Reads/writes valid JSON |

## Reference

- Claude-relay recent tracking: `../claude-relay/lib/config.js` (~clayrc file)
