Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
04b6af9
auto-claude: subtask-1-1 - Create docs/ directory with Docsify index.…
fireapache Dec 29, 2025
678372c
auto-claude: subtask-1-2 - Create documentation home page (README.md)…
fireapache Dec 29, 2025
5305266
auto-claude: subtask-1-3 - Create sidebar navigation structure (_side…
fireapache Dec 29, 2025
607b4bf
auto-claude: subtask-1-4 - Create getting-started.md with quick start…
fireapache Dec 29, 2025
3f81081
auto-claude: subtask-2-1 - Create architecture overview page
fireapache Dec 29, 2025
63e9f8b
auto-claude: subtask-2-2 - Create backend architecture page documenti…
fireapache Dec 29, 2025
296157c
auto-claude: subtask-2-3 - Create frontend architecture page document…
fireapache Dec 29, 2025
da5b5c4
auto-claude: subtask-2-4 - Create integration documentation
fireapache Dec 29, 2025
5c961f8
auto-claude: subtask-3-1 - Create agents module documentation
fireapache Dec 29, 2025
81a0976
auto-claude: subtask-3-2 - Create analysis module documentation
fireapache Dec 29, 2025
9419c2a
auto-claude: subtask-3-3 - Create CLI module documentation covering b…
fireapache Dec 29, 2025
ac03c57
auto-claude: subtask-3-4 - Create core and context modules documentat…
fireapache Dec 29, 2025
fa1ba84
auto-claude: subtask-3-5 - Create implementation plan and integration…
fireapache Dec 29, 2025
4d52d4a
auto-claude: subtask-4-1 - Create main process documentation covering…
fireapache Dec 29, 2025
81917d7
auto-claude: subtask-4-2 - Create IPC handlers documentation covering…
fireapache Dec 29, 2025
66b247d
auto-claude: subtask-4-3 - Create renderer components documentation
fireapache Dec 29, 2025
c6d51a6
auto-claude: subtask-4-4 - Create state management documentation cove…
fireapache Dec 29, 2025
1fae4b1
auto-claude: subtask-5-1 - Create use case diagrams page showing acto…
fireapache Dec 29, 2025
9d78a72
auto-claude: subtask-5-2 - Create sequence diagrams page showing task…
fireapache Dec 30, 2025
6ca2f40
auto-claude: subtask-5-3 - Create class structure diagrams page showi…
fireapache Dec 30, 2025
835d3f9
docs: Add dark mode theme and local server instructions
fireapache Dec 30, 2025
0f77ae8
scripts: Add cross-platform documentation server scripts
fireapache Dec 30, 2025
2d46282
ci: Add GitHub Action for automated documentation updates
fireapache Dec 30, 2025
1eb86fb
ci: Update docs workflow - technical overview focus, direct commits
fireapache Dec 30, 2025
e5eb2f0
fix: Use absolute paths in sidebar to prevent path duplication
fireapache Dec 30, 2025
5632eec
fix: Fix Mermaid diagram syntax errors in documentation
fireapache Dec 30, 2025
c6d3533
ci: Use last updated date to track commits for doc updates
fireapache Dec 30, 2025
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
177 changes: 177 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: Update Documentation

on:
push:
branches:
- develop
paths:
# Only trigger on source code changes, not docs themselves
- 'apps/backend/**/*.py'
- 'apps/frontend/src/**/*.ts'
- 'apps/frontend/src/**/*.tsx'

jobs:
update-docs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 10 # Fetch recent commits for analysis

- name: Get commits since last doc update
id: commits
run: |
# Extract last updated date from docs/README.md (format: > Last updated: YYYY-MM-DD)
LAST_UPDATE=$(grep -oP '(?<=Last updated: )\d{4}-\d{2}-\d{2}' docs/README.md || echo "")
echo "last_update=$LAST_UPDATE" >> $GITHUB_OUTPUT

if [ -n "$LAST_UPDATE" ]; then
echo "Documentation was last updated on: $LAST_UPDATE"
# Get commits since the last documentation update
COMMITS=$(git log --oneline --since="$LAST_UPDATE" --no-merges -- 'apps/backend/**/*.py' 'apps/frontend/src/**/*.ts' 'apps/frontend/src/**/*.tsx')
CHANGED_FILES=$(git diff --name-only $(git rev-list -1 --before="$LAST_UPDATE" HEAD) HEAD -- 'apps/backend/**/*.py' 'apps/frontend/src/**/*.ts' 'apps/frontend/src/**/*.tsx' 2>/dev/null || echo "")
else
echo "No last update date found, using recent commits"
COMMITS=$(git log --oneline -10 --no-merges)
CHANGED_FILES=$(git diff --name-only HEAD~5 HEAD 2>/dev/null || git diff --name-only HEAD)
fi

echo "commits<<EOF" >> $GITHUB_OUTPUT
echo "$COMMITS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

echo "changed_files<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGED_FILES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

# Store today's date for updating README
echo "today=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT

Comment on lines +28 to +54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Shell quoting and robustness improvements recommended.

The bash script has several quoting issues flagged by shellcheck that could cause unexpected behavior with filenames containing spaces or special characters. Additionally, consider more robust error handling for git operations.

🔧 Proposed improvements for shell safety
       - name: Get commits since last doc update
         id: commits
         run: |
           # Extract last updated date from docs/README.md (format: > Last updated: YYYY-MM-DD)
           LAST_UPDATE=$(grep -oP '(?<=Last updated: )\d{4}-\d{2}-\d{2}' docs/README.md || echo "")
           echo "last_update=$LAST_UPDATE" >> $GITHUB_OUTPUT
 
           if [ -n "$LAST_UPDATE" ]; then
             echo "Documentation was last updated on: $LAST_UPDATE"
             # Get commits since the last documentation update
-            COMMITS=$(git log --oneline --since="$LAST_UPDATE" --no-merges -- 'apps/backend/**/*.py' 'apps/frontend/src/**/*.ts' 'apps/frontend/src/**/*.tsx')
-            CHANGED_FILES=$(git diff --name-only $(git rev-list -1 --before="$LAST_UPDATE" HEAD) HEAD -- 'apps/backend/**/*.py' 'apps/frontend/src/**/*.ts' 'apps/frontend/src/**/*.tsx' 2>/dev/null || echo "")
+            COMMITS=$(git log --oneline --since="$LAST_UPDATE" --no-merges -- 'apps/backend/**/*.py' 'apps/frontend/src/**/*.ts' 'apps/frontend/src/**/*.tsx' || echo "No commits found")
+            BASE_REF=$(git rev-list -1 --before="$LAST_UPDATE" HEAD 2>/dev/null || echo "HEAD~5")
+            CHANGED_FILES=$(git diff --name-only "$BASE_REF" HEAD -- 'apps/backend/**/*.py' 'apps/frontend/src/**/*.ts' 'apps/frontend/src/**/*.tsx' 2>/dev/null || echo "")
           else
             echo "No last update date found, using recent commits"
             COMMITS=$(git log --oneline -10 --no-merges)
             CHANGED_FILES=$(git diff --name-only HEAD~5 HEAD 2>/dev/null || git diff --name-only HEAD)
           fi
 
-          echo "commits<<EOF" >> $GITHUB_OUTPUT
-          echo "$COMMITS" >> $GITHUB_OUTPUT
-          echo "EOF" >> $GITHUB_OUTPUT
+          {
+            echo "commits<<EOF"
+            echo "$COMMITS"
+            echo "EOF"
+            echo "changed_files<<EOF"
+            echo "$CHANGED_FILES"
+            echo "EOF"
+            echo "today=$(date +%Y-%m-%d)"
+          } >> "$GITHUB_OUTPUT"
-
-          echo "changed_files<<EOF" >> $GITHUB_OUTPUT
-          echo "$CHANGED_FILES" >> $GITHUB_OUTPUT
-          echo "EOF" >> $GITHUB_OUTPUT
-
-          # Store today's date for updating README
-          echo "today=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT

Key improvements:

  1. Quote the command substitution on line 37 to prevent word splitting
  2. Use grouped redirects (lines 44-50) for cleaner output handling
  3. Quote $GITHUB_OUTPUT variable to prevent globbing
  4. Add fallback message for empty commits
  5. Store base ref in variable to avoid nested command substitution
🧰 Tools
🪛 actionlint (1.7.9)

28-28: shellcheck reported issue in this script: SC2046:warning:9:40: Quote this to prevent word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:16:24: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:17:20: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:18:15: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:20:30: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:21:26: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:22:15: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:25:35: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2086:info:3:36: Double quote to prevent globbing and word splitting

(shellcheck)


28-28: shellcheck reported issue in this script: SC2129:style:16:1: Consider using { cmd1; cmd2; } >> file instead of individual redirects

(shellcheck)

🤖 Prompt for AI Agents
.github/workflows/update-docs.yml lines 28-54: the shell steps are vulnerable to
word-splitting, globbing, and brittle git calls; fix by quoting command
substitutions and variables (e.g., "$LAST_UPDATE", "$GITHUB_OUTPUT"), capture
the base ref in a variable instead of nested substitution before using it, use
grouped/heredoc redirects (>> "$GITHUB_OUTPUT" with a single <<'EOF' block) to
avoid multiple echo calls, add checks/fallback messages when COMMITS or
CHANGED_FILES are empty (e.g., set a default string like "no commits found"),
and handle git errors by redirecting stderr and checking exit status to provide
a clear fallback path.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Use GitHub Copilot to update docs
uses: github/copilot-action@v1
with:
prompt: |
You are a technical documentation writer for the Auto-Claude project. Your task is to analyze recent code changes and update the documentation ONLY if changes are relevant to the technical overview.

## IMPORTANT: Documentation Purpose

This documentation is a **technical overview** of how the Auto-Claude system works. It explains architecture, component relationships, data flows, and system design.

**This is NOT:**
- A changelog or commit log
- API reference documentation
- A place to document every code change

**Only update documentation when changes affect the fundamental understanding of how the system works.** Most code changes (bug fixes, refactors, minor features) do NOT require documentation updates.

## Documentation Last Updated
The documentation home page (`docs/README.md`) contains a "Last updated" date at the top.
Last update: ${{ steps.commits.outputs.last_update }}

## Commits Since Last Documentation Update
These are the source code commits since the documentation was last updated:
${{ steps.commits.outputs.commits }}

## Changed Files Since Last Update
${{ steps.commits.outputs.changed_files }}

## Instructions

1. **Analyze the changes**: Review the recent commits and changed files to understand what was modified.

2. **Determine relevance**: Only update documentation if changes affect:
- Architecture or system design patterns
- New major components, modules, or services
- Significant workflow or process changes
- New integration points between systems
- Changes to how agents, IPC, or core systems work

3. **Skip documentation updates for**:
- Bug fixes
- Code refactoring without architectural changes
- Minor feature additions
- Performance improvements
- Dependency updates
- Test changes

4. **Read existing documentation**: Before making changes, read these example documentation pages to understand the style and format:
- `docs/README.md` - Overview and structure
- `docs/architecture/overview.md` - Architecture documentation style
- `docs/components/backend/agents.md` - Component documentation style
- `docs/diagrams/sequences.md` - How to use Mermaid diagrams

5. **Documentation style guidelines**:
- Use Mermaid diagrams for visualizing:
- Flowcharts for processes and workflows
- Sequence diagrams for component interactions
- Class diagrams for type structures
- Keep explanations concise and technical
- Use tables for listing properties, methods, or configurations
- Follow the existing heading hierarchy (h2 for main sections, h3 for subsections)

6. **Update the appropriate documentation file(s)**:
- Architecture changes → `docs/architecture/`
- Backend component changes → `docs/components/backend/`
- Frontend component changes → `docs/components/frontend/`
- New diagrams → `docs/diagrams/`
- Update `docs/_sidebar.md` if adding new pages

7. **If no documentation updates are needed**: Simply respond with "No documentation updates required" and briefly explain why.

8. **Double-check Mermaid diagrams for syntax errors**:
- Decision nodes (diamond shapes) use `{Label}` syntax - do NOT include `<br/>` inside curly braces
- Rectangular nodes use `[Label]` or `[Label<br/>Subtitle]` - `<br/>` is allowed here
- Keep decision node labels short (e.g., `{Valid?}` not `{Is the value<br/>valid?}`)
- Verify all node connections are valid (source and target nodes exist)
- Test complex diagrams by removing subgraphs if they cause rendering issues

## Mermaid Diagram Examples

```mermaid
flowchart TB
A[Component] --> B[Process]
B --> C{Decision}
C -->|Yes| D[Action]
C -->|No| E[Alternative]
```

```mermaid
sequenceDiagram
participant A as Component A
participant B as Component B
A->>B: Request
B-->>A: Response
```

Please analyze the changes and provide any necessary documentation updates.

- name: Update documentation date and commit
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"

# Always update the "Last updated" date in README.md
TODAY="${{ steps.commits.outputs.today }}"
sed -i "s/> Last updated: [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/> Last updated: $TODAY/" docs/README.md

git add docs/
if git diff --staged --quiet; then
echo "No documentation changes to commit"
else
git commit -m "docs: Auto-update technical documentation

Based on commits since ${{ steps.commits.outputs.last_update }}.

🤖 Generated with GitHub Copilot"
git push
fi
Comment on lines +158 to +177
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Direct push to develop without PR review.

The workflow commits documentation changes directly to the develop branch without creating a pull request. This means AI-generated documentation updates bypass code review.

Consider whether this workflow should:

  • Option 1 (current): Continue direct commits for documentation updates, accepting that AI-generated content is pushed without human review
  • Option 2: Create a pull request instead for reviewable AI-generated changes:
    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v5
      with:
        branch: docs/auto-update-${{ github.run_number }}
        title: "docs: Auto-update technical documentation"
        body: |
          Based on commits since ${{ steps.commits.outputs.last_update }}.
          🤖 Generated with GitHub Copilot

The current approach is acceptable for low-risk documentation but may introduce inaccuracies without human oversight.

🤖 Prompt for AI Agents
.github/workflows/update-docs.yml lines 158-177: the workflow currently commits
and pushes documentation updates directly to develop, bypassing PR review;
replace the direct git commit+push step with a pull-request creation step using
peter-evans/create-pull-request (or make this conditional) so AI-generated
changes are reviewable: stop doing git commit && git push, create a new branch
name (e.g. docs/auto-update-${{ github.run_number }}), call the action with a
clear title and body including the last_update info, and ensure the workflow
exits cleanly when there are no changes (or keep the no-changes echo), so
documentation updates open a PR for human review instead of being pushed
directly to develop.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ dev/
_bmad/
_bmad-output/
.claude/
/docs
# NOTE: /docs was previously ignored but is now tracked for project documentation
OPUS_ANALYSIS_AND_IDEAS.md
133 changes: 133 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Auto-Claude Technical Documentation

**Comprehensive technical documentation for developers working with the Auto-Claude codebase.**

> Last updated: 2025-12-30

---

## Overview

Auto-Claude is an autonomous multi-agent coding framework that plans, builds, and validates software. This documentation provides technical onboarding materials for developers who want to understand, contribute to, or extend the project.

### What is Auto-Claude?

Auto-Claude combines a **Python backend** (agent system, project analysis, context management) with a **TypeScript/React frontend** (Electron desktop application) to provide:

- **Autonomous task execution** - Describe your goal; agents handle planning, implementation, and validation
- **Parallel agent management** - Run multiple builds simultaneously with up to 12 agent terminals
- **Isolated workspaces** - All changes happen in git worktrees, keeping your main branch safe
- **Self-validating QA** - Built-in quality assurance loop catches issues before you review
- **Cross-session memory** - Agents retain insights across sessions for smarter builds

---

## Documentation Structure

This documentation is organized in progressive complexity, from high-level overviews to detailed component specifications.

### Getting Started

- **[Getting Started](getting-started.md)** - Quick start guide for new developers

### Architecture

- **[Architecture Overview](architecture/overview.md)** - High-level system architecture
- **[Backend Architecture](architecture/backend.md)** - Python agent system architecture
- **[Frontend Architecture](architecture/frontend.md)** - Electron/React application architecture
- **[Integration](architecture/integration.md)** - Frontend-backend communication

### Component Documentation

- **[Backend Components](components/backend/)** - Python module documentation
- **[Frontend Components](components/frontend/)** - TypeScript/React component documentation

### Diagrams

- **[Use Cases](diagrams/use-cases.md)** - Use case diagrams
- **[Sequence Diagrams](diagrams/sequences.md)** - Interaction flow diagrams
- **[Class Diagrams](diagrams/classes.md)** - Type and class structure diagrams

---

## Tech Stack

| Layer | Technology | Purpose |
|-------|------------|---------|
| **Desktop App** | Electron 39.x | Cross-platform desktop container |
| **UI Framework** | React 19.x | Component-based user interface |
| **Build Tool** | Vite + electron-vite | Fast development and bundling |
| **Styling** | Tailwind CSS 4.x | Utility-first styling |
| **State Management** | Zustand 5.x | Lightweight state management |
| **Backend Runtime** | Python 3.12+ | Agent system runtime |
| **Agent Framework** | Claude Agent SDK | AI agent capabilities |
| **Memory System** | Graphiti | Cross-session context retention |

---

## Project Structure

```
Auto-Claude/
├── apps/
│ ├── backend/ # Python agent system
│ │ ├── agents/ # Agent implementations
│ │ ├── analysis/ # Project analyzers
│ │ ├── cli/ # Command-line interface
│ │ ├── context/ # Context management
│ │ ├── core/ # Core services
│ │ ├── ideation/ # Feature ideation
│ │ ├── implementation_plan/ # Plan structures
│ │ └── integrations/ # External integrations
│ └── frontend/ # Electron application
│ └── src/
│ ├── main/ # Electron main process
│ └── renderer/ # React renderer process
├── docs/ # This documentation
├── guides/ # User guides
├── scripts/ # Build utilities
└── tests/ # Test suite
```

---

## Quick Reference

### Running the Application

```bash
# Development mode
npm run dev

# Build and run
npm start
```

### Backend CLI

```bash
cd apps/backend

# Create a spec interactively
python spec_runner.py --interactive

# Run autonomous build
python run.py --spec 001
```

### Useful Links

- **Repository**: [github.com/AndyMik90/Auto-Claude](https://github.com/AndyMik90/Auto-Claude)
- **Discord Community**: [Join](https://discord.gg/KCXaPBr4Dj)
- **Contributing Guide**: [CONTRIBUTING.md](https://github.com/AndyMik90/Auto-Claude/blob/main/CONTRIBUTING.md)

---

## How to Use This Documentation

1. **New to the project?** Start with [Getting Started](getting-started.md)
2. **Understanding the architecture?** Read [Architecture Overview](architecture/overview.md)
3. **Working on a specific area?** Navigate to the relevant component documentation
4. **Looking for diagrams?** Check the [Diagrams](diagrams/use-cases.md) section

Use the sidebar navigation to explore topics, or use the search feature to find specific content.
34 changes: 34 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!-- docs/_sidebar.md - Auto-Claude Documentation Navigation -->

- [Home](/)
- [Getting Started](/getting-started)

---

- **Architecture**
- [Overview](/architecture/overview)
- [Backend Architecture](/architecture/backend)
- [Frontend Architecture](/architecture/frontend)
- [Integration](/architecture/integration)

---

- **Components**
- **Backend**
- [Agents System](/components/backend/agents)
- [Analysis Module](/components/backend/analysis)
- [CLI Commands](/components/backend/cli)
- [Core Services](/components/backend/core)
- [Planning & Integrations](/components/backend/planning)
- **Frontend**
- [Main Process](/components/frontend/main-process)
- [IPC Handlers](/components/frontend/ipc-handlers)
- [Renderer Components](/components/frontend/renderer)
- [State Management](/components/frontend/state)

---

- **Diagrams**
- [Use Cases](/diagrams/use-cases)
- [Sequence Diagrams](/diagrams/sequences)
- [Class Diagrams](/diagrams/classes)
Loading
Loading