diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..104fddd174 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,59 @@ +name: Deploy Docs + +on: + push: + branches: ["main"] + paths: + - "docs/**" + - ".github/workflows/docs.yml" + workflow_dispatch: # Allow manual triggering + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v2 + with: + mdbook-version: "0.4.52" + + - name: Install mdbook-mermaid + run: | + cargo install mdbook-mermaid --version 0.16.0 + mdbook-mermaid install docs + + - name: Install mdbook-linkcheck + run: cargo install mdbook-linkcheck --version 0.7.7 + + - name: Build docs + run: cd docs && mdbook build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./docs/book + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore index 94680a9f92..e9d46f791f 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,9 @@ release # Documentation docs/vercel/ +docs/book/ +docs/mermaid-init.js +docs/mermaid.min.js # Secrets .env diff --git a/AGENTS.md b/AGENTS.md index 681311eb9c..8f40feedc9 120000 --- a/AGENTS.md +++ b/AGENTS.md @@ -1 +1 @@ -CLAUDE.md \ No newline at end of file +docs/src/AGENTS.md \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index aeaca99d2b..0000000000 --- a/CLAUDE.md +++ /dev/null @@ -1,383 +0,0 @@ -# CLAUDE.md - Project Notes for AI Assistants - -## Project Context - -- Electron + React desktop application -- No existing users - migration code is not needed when changing data structures - -## AI-Generated Content Attribution - -When creating public operations (commits, PRs, issues), always include: - -- 🤖 emoji in the title -- "_Generated with `cmux`_" in the body (if applicable) - -This ensures transparency about AI-generated contributions. - -## PR Management - -After submitting or updating PRs, **always check merge status**: - -```bash -gh pr view --json mergeable,mergeStateStatus | jq '.' -``` - -This is especially important with rapid development where branches quickly fall behind. - -**Wait for PR checks to complete:** - -```bash -./scripts/wait_pr_checks.sh -``` - -This script polls every 5 seconds and fails immediately on CI failure or bad merge status. - -**Key status values:** - -- `mergeable: "MERGEABLE"` = No conflicts, can merge -- `mergeable: "CONFLICTING"` = Has conflicts, needs resolution -- `mergeStateStatus: "CLEAN"` = Ready to merge ✅ -- `mergeStateStatus: "BLOCKED"` = Waiting for CI checks -- `mergeStateStatus: "BEHIND"` = Branch is behind base, rebase needed -- `mergeStateStatus: "DIRTY"` = Has conflicts - -**If branch is behind:** - -```bash -git fetch origin -git rebase origin/main -git push --force-with-lease -``` - -## Project Structure - -- `src/main.ts` - Main Electron process -- `src/preload.ts` - Preload script for IPC -- `src/App.tsx` - Main React component -- `src/config.ts` - Configuration management -- `~/.cmux/config.json` - User configuration file -- `~/.cmux/src//` - Workspace directories for git worktrees -- `~/.cmux/sessions//chat.jsonl` - Session chat histories - -## Docs - -DO NOT visit https://sdk.vercel.ai/docs/ai-sdk-core. All of that content is already -in `./docs/vercel/**.mdx`. - -(Generate them with `./scripts/update_vercel_docs.sh` if they don't exist.) - -## Key Features - -- Projects sidebar (left panel) -- Workspaces using git worktrees -- Configuration persisted to `~/.cmux/config.json` - -## Package Manager - -- **Using bun** - All dependencies are managed with bun (not npm) -- Use bun over npm whenever possible, including to: - - Install dependencies: `bun install` - - Add packages: `bun add ` - - Run scripts: `bun run