Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ logs/security/
# Runtime data
.adc/

# Claude Code session artifacts (local-only, events sync to Hub)
.claude/progress/
# Workflow plugin runtime data (ephemeral, not committed)
.claude/progress/*/events.jsonl
.claude/progress/*/current.md
.claude/progress/*/history.md
.claude/progress/index.md
.claude/teams/
.claude/tasks/
.claude/settings.json
Expand Down
5 changes: 2 additions & 3 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ If tests don't exist for the area you're modifying, **that doesn't exempt you fr
> that future agents read. If agent docs are stale, agents produce wrong code, which wastes time and money.
> **Failing to update docs is the same as shipping broken code. Treat it that way.**

`npm run check:docs` enforces that source changes include doc updates. Accepted doc paths: `ai-docs/`, `docs/plans/`, `docs/progress/`, `.claude/agents/`, `docs/tracker.json`, and `CLAUDE.md`. Use this mapping to know which docs to update:
`npm run check:docs` enforces that source changes include doc updates. Accepted doc paths: `ai-docs/`, `docs/plans/`, `.claude/agents/`, `docs/tracker.json`, and `CLAUDE.md`. Use this mapping to know which docs to update:

| Change Type | Docs to Update |
|-------------|----------------|
Expand All @@ -122,10 +122,9 @@ If tests don't exist for the area you're modifying, **that doesn't exempt you fr
| New shared utility | `FEATURES-INDEX.md` (shared sections), `CODEBASE-GUARDIAN.md` (placement rules) |
| UI layout changes | `user-interface-flow.md` (UX flow sections), `FEATURES-INDEX.md` (layouts) |
| New feature module | `FEATURES-INDEX.md` (feature table), `ARCHITECTURE.md` (system diagram if applicable) |
| Gap resolution | `user-interface-flow.md` (mark gap RESOLVED with date and description) |
| New pattern or convention | `PATTERNS.md` (pattern example with code), **ALL relevant agent files** |
| Feature plan or design doc | `docs/plans/<feature>-plan.md` (implementation plan) |
| Plan lifecycle changes | `docs/tracker.json` (update status, add new entry) |
| Plan lifecycle changes | `docs/tracker.json` |
| Any change to file structure, imports, or conventions | **ALL `.claude/agents/*.md` files that reference the affected area** |

**Checklist before committing — ALL items are mandatory:**
Expand Down
14 changes: 5 additions & 9 deletions ai-docs/CODEBASE-GUARDIAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@
|------|----------|------|
| `tracker.json` | `docs/tracker.json` | Single source of truth for plan status. MUST be updated when plans change status. |
| `validate-tracker.mjs` | `scripts/validate-tracker.mjs` | Validation script — do not move. |
| Active plans | `docs/plans/` | Plans with status DRAFT, APPROVED, IN_PROGRESS, BLOCKED, TRACKING |
| Active progress | `docs/progress/` | Progress files for features currently being implemented |
| Archived plans | `doc-history/plans/` | Plans with status IMPLEMENTED, SUPERSEDED, ABANDONED, ARCHIVED |
| Archived progress | `doc-history/progress/` | Progress files for completed features |

**Archival rules:**
- Plans with status `IMPLEMENTED` or `SUPERSEDED` that are older than 14 days should be archived
- When archiving: `git mv` the file to `doc-history/`, update `docs/tracker.json` paths, set status to `ARCHIVED`
- `npm run validate:tracker` must pass after any archival operation
| Active plans | `docs/plans/` | Plans with status DRAFT, APPROVED, IN_PROGRESS, TRACKING |

**Cleanup rules:**
- Plans for features with status `IMPLEMENTED` that are older than 14 days should be deleted and their tracker entry removed
- `npm run validate:tracker` must pass after any cleanup operation

### Feature Module Structure (MANDATORY)

Expand Down
12 changes: 4 additions & 8 deletions ai-docs/FEATURES-INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ The IPC contract has been split from a single monolithic file into **27 domain f
| `data-management` | Data store registry, retention settings, cleanup, usage, export/import (8 invoke + 1 event) |
| `security` | Security settings, audit export (3 channels) |
| `window` | Window controls (minimize, maximize, close, isMaximized) |
| `tracker` | Plan tracker (list, get, update docs/tracker.json via IPC) |
| `workflow` | Workflow execution |

Each domain folder contains:
Expand Down Expand Up @@ -608,19 +609,14 @@ npm run format # Prettier format
| `DRAFT` | Initial write-up, not yet approved |
| `APPROVED` | Design approved, ready for implementation |
| `IN_PROGRESS` | Currently being implemented |
| `BLOCKED` | Implementation blocked by external dependency |
| `IMPLEMENTED` | Code merged and working |
| `SUPERSEDED` | Replaced by a newer plan (see `supersededBy` field) |
| `ABANDONED` | Decided not to implement |
| `ARCHIVED` | Completed and moved to `doc-history/` |
| `ARCHIVED` | Completed and removed from active tracking |
| `TRACKING` | Living document (roadmap, etc.) — no implementation phase |

### File Organization

- **Active plans**: `docs/plans/` — plans currently in backlog or in progress
- **Active progress**: `docs/progress/` — crash-recovery files for active features
- **Archived plans**: `doc-history/plans/` — completed/superseded plans
- **Archived progress**: `doc-history/progress/` — progress files for completed features
- **Plans**: `docs/plans/` — design docs for active and recently completed features
- **Tracker**: `docs/tracker.json` — single source of truth for plan status (v2 schema)

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ When starting a new feature, the Team Lead follows this sequence:
```
1. READ the design document
2. DECOMPOSE into tasks with dependencies
3. CREATE progress file: docs/progress/<feature>-progress.md
3. UPDATE `docs/tracker.json`: add entry with status `IN_PROGRESS`
4. CREATE team: TeamCreate with team_name
5. CREATE tasks: TaskCreate for each task with descriptions + acceptance criteria
6. SET dependencies: TaskUpdate with addBlockedBy for each task
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Progress File Template

> Copy this to `docs/progress/<feature-name>-progress.md` when starting a new feature.
> Template for crash-recovery progress tracking. Used by the workflow plugin in `.claude/progress/`.

---

Expand Down
17 changes: 7 additions & 10 deletions ai-docs/prompts/implementing-features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ PLAN ──▶ TRACK ──▶ ASSIGN ──▶ BUILD+DOCS ──▶ TEST ──
│ │ └─ TeamCreate, TaskCreate with dependencies,
│ │ spawn agents with full initialization
│ │
│ └─ Create progress file at docs/progress/<feature-name>-progress.md
│ Update tracker.json: add entry with status IN_PROGRESS
│ └─ Update tracker.json: add entry with status IN_PROGRESS
└─ Read design doc, decompose into tasks,
identify agent roles, map dependencies.
Expand Down Expand Up @@ -78,7 +77,7 @@ The Team Lead MUST update `docs/tracker.json` at each lifecycle transition:
| Work blocked | Set status to `BLOCKED` |
| Implementation complete | Set status to `IMPLEMENTED` |
| Feature superseded | Set status to `SUPERSEDED`, set `supersededBy` field |
| Feature archived | Move files to `doc-history/`, update paths, set status to `ARCHIVED` |
| Feature archived | Delete plan file, remove tracker entry or set status to `ARCHIVED` |

Always update `statusChangedAt` when changing status. Run `npm run validate:tracker` to verify.

Expand All @@ -92,9 +91,7 @@ Claude Code sessions can terminate unexpectedly (terminal close, timeout, proces

### The Progress File

**Location**: `docs/progress/<feature-name>-progress.md`

The Team Lead MUST create this file BEFORE spawning any agents, and update it after EVERY significant state change (agent complete, agent failed, phase transition).
Progress is tracked via the team's TaskList and the `.claude/progress/` runtime directory (auto-managed by the workflow plugin). The Team Lead updates tracker.json status after each phase transition.

**When to update the progress file:**
- After creating the team and tasks
Expand Down Expand Up @@ -163,7 +160,7 @@ If resuming from crash:
The Team Lead must update `docs/tracker.json` at these lifecycle points:
- **New feature**: Add entry with status `IN_PROGRESS`
- **Feature complete**: Set status to `IMPLEMENTED`
- **Feature archived**: Move files to `doc-history/`, update paths, set status to `ARCHIVED`
- **Feature archived**: Delete plan file, remove tracker entry or set status to `ARCHIVED`
- **Feature superseded**: Set status to `SUPERSEDED`, set `supersededBy` field

Run `npm run validate:tracker` to verify tracker integrity after any changes.
Expand All @@ -172,7 +169,7 @@ Run `npm run validate:tracker` to verify tracker integrity after any changes.

When a Team Lead agent starts and detects existing progress:

1. Read `docs/progress/<feature-name>-progress.md`
1. Check `docs/tracker.json` for feature status
2. Run `git worktree list` to verify worktree state
3. Check if the team still exists (read `~/.claude/teams/<team-name>/config.json`)
4. If team exists: use `TaskList` to get current state, resume from first pending task
Expand Down Expand Up @@ -272,7 +269,7 @@ Claude-UI/
│ ├── ipc-contract.ts # THE source of truth for IPC
│ ├── constants/ # Theme constants, route paths
│ └── types/ # Domain type definitions
└── doc-history/ # Archived planning docs
└── docs/tracker.json # Plan status tracker (v2)
```

### Updating the Structure
Expand Down Expand Up @@ -655,7 +652,7 @@ Use this checklist when starting any new feature implementation:

1. READ design doc / plan
2. DECOMPOSE into tasks with dependencies
3. CREATE progress file at `docs/progress/<feature-name>-progress.md`
3. UPDATE `docs/tracker.json`: add entry with status `IN_PROGRESS`
3b. UPDATE tracker: Add entry to `docs/tracker.json` with status `IN_PROGRESS`
4. CREATE team via TeamCreate
5. CREATE tasks via TaskCreate with proper `blockedBy` relationships
Expand Down
Loading
Loading