shep

Architecture Documentation

This directory contains documentation about Shep AI CLIโ€™s system architecture and design patterns.

Contents

Document Description
overview.md High-level system architecture and component interactions
clean-architecture.md Clean Architecture implementation details
repository-pattern.md Data persistence and repository pattern
agent-system.md LangGraph-based agent system design and implementation
git-checkpoints.md Hidden-ref worktree snapshots per agent step, diff, restore
settings-service.md Global settings service architecture
spaces.md Spaces, product lines and memory isolation
tracker-sync.md Linear and Jira connections and two-way sync
knowledge.md Notion knowledge sources and what agents read
opportunities.md Signals, opportunities, scoring and the capacity line
feedback.md Keyed feedback intake and lexical themes
discovery.md The agent that proposes evidence-backed opportunities
incidents.md Incidents, triage, runtime actions and alert intake
outcomes.md Ship tracking, outcome verdicts, telling customers
docs-first.md Docs-first policy, phase instructions and the merge gate
autopilot.md Autopilot passes and factory status
bug-loop.md Investigations, ranked hypotheses and test-first fixes
pr-comment-loop.md Review comments read, addressed and answered

Quick Reference

Architecture Layers

Presentation -> Application -> Domain <- Infrastructure
     |              |          ^           ^
   CLI/Web      Use Cases   Entities   Repositories

Key Principles

  1. Dependency Inversion - High-level modules donโ€™t depend on low-level modules
  2. Single Responsibility - Each component has one reason to change
  3. Interface Segregation - Many specific interfaces over one general-purpose
  4. Open/Closed - Open for extension, closed for modification

Getting Started

New contributors should read:

  1. overview.md - Understand the big picture
  2. clean-architecture.md - Learn the layer structure
  3. Specific pattern docs as needed

Maintaining This Directory

Update when:

File naming:

Cross-references: