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
76 changes: 76 additions & 0 deletions .github/prompts/update-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Weekly Docs Update

Review recently merged PRs and update documentation to reflect any new features, changed behavior, or removed functionality.

## Instructions

1. **Find PRs merged in the last 7 days**
- Use `gh pr list --state merged --search "merged:>=$(date -d '7 days ago' +%Y-%m-%d)" --json number,title,body,url,mergedAt,files --limit 50` to get all recently merged PRs
- For each PR, read the title, body, and changed files to understand what changed

2. **Read the current docs**
- Read `apps/docs/content/docs/meta.json` to understand the doc structure
- Read each existing doc page in `apps/docs/content/docs/` to understand current content

3. **Identify docs that need updating**

For each merged PR, determine if it affects documentation by checking:

| Change Type | Docs Action |
|-------------|-------------|
| New user-facing feature | Add section to relevant doc page, or create new page if it's a major feature area |
| Changed behavior/UI | Update the relevant doc page to reflect new behavior |
| New keyboard shortcut | Update `keyboard-shortcuts.mdx` |
| New terminal feature | Update `terminal-integration.mdx` or `terminal-presets.mdx` |
| New MCP capability | Update `mcp.mdx` |
| New agent feature | Update `agent-integration.mdx` |
| New workspace feature | Update `workspaces.mdx` |
| Changed port behavior | Update `ports.mdx` |
| New setup/teardown script feature | Update `setup-teardown-scripts.mdx` |
| Diff viewer changes | Update `diff-viewer.mdx` |
| IDE integration changes | Update `use-with-ide.mdx` |
| Monorepo changes | Update `using-monorepos.mdx` |
| Customization changes | Update `customization.mdx` |
| Removed feature | Remove or update the relevant section |
| Internal-only change (CI, refactor, dev tooling) | **Skip** - no docs update needed |

4. **Skip if nothing needs updating**
- If no merged PRs require documentation changes, make no edits and report that docs are up to date
- Do NOT make changes for the sake of making changes - only update docs when PRs genuinely introduced user-facing changes that aren't already documented

5. **Make targeted edits**
- Edit existing doc files rather than rewriting them
- Match the writing style and formatting of the existing content
- Keep changes minimal and focused - only add/update what the PRs changed
- Preserve all existing content that is still accurate

6. **Creating new doc pages** (rare - only for major new feature areas)
- Create at `apps/docs/content/docs/slug-name.mdx`
- Use this frontmatter format:
```mdx
---
title: Page Title
description: Brief description of what this page covers
---
```
- Add the new page slug to `apps/docs/content/docs/meta.json` in the appropriate section
- Follow the style of existing pages - concise, scannable, focused on what users can do

7. **Writing style**
- **Match existing tone** - The docs are concise and practical, not verbose
- **Lead with what the user can do** - Not implementation details
- **Use bullet points** for feature lists
- **Use headings** (##) to organize sections
- **Keep sentences short** - One idea per sentence
- **No fluff** - Skip filler words and marketing language

## Existing doc pages for reference

Read these to match the format and style:
- `apps/docs/content/docs/overview.mdx` - Product overview
- `apps/docs/content/docs/terminal-integration.mdx` - Feature doc example
- `apps/docs/content/docs/keyboard-shortcuts.mdx` - Reference doc example

## Output

Edit the relevant doc files. If no updates are needed, make no changes and report that documentation is already up to date.
5 changes: 3 additions & 2 deletions .github/workflows/generate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:

- name: Create branch
run: |
BRANCH_NAME="changelog/$(date +%Y-%m-%d)"
git checkout -b "$BRANCH_NAME"
BRANCH_NAME="changelog/$(date +%Y-%m-%d)-${GITHUB_RUN_ID}"
git checkout -B "$BRANCH_NAME"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV

- name: Generate changelog with Claude Code
Expand Down Expand Up @@ -79,6 +79,7 @@ jobs:
run: |
CURRENT_DATE=$(date +%Y-%m-%d)
gh pr create \
--reviewer kitenite --reviewer saddlepaddle --reviewer AviPeltz \
--title "docs: weekly changelog - $CURRENT_DATE" \
--body "## Summary
This PR was automatically generated by Claude Code to create the weekly changelog.
Expand Down
98 changes: 98 additions & 0 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Update Docs

on:
schedule:
# Run every Wednesday at 9:00 AM UTC
- cron: "0 9 * * 3"
workflow_dispatch: # Allow manual triggering

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

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.3

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}

- name: Install dependencies
run: bun install --frozen

- name: Install Claude Code
run: npm install -g @anthropic-ai/claude-code

- name: Create branch
run: |
BRANCH_NAME="docs/update-$(date +%Y-%m-%d)-${GITHUB_RUN_ID}"
git checkout -B "$BRANCH_NAME"
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- name: Update docs with Claude Code
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
claude -p "$(cat .github/prompts/update-docs.md)" --allowedTools "Bash(git*)" "Bash(gh*)" "Bash(date*)" "Bash(ls*)" "Read" "Write" "Edit" "Glob" "Grep"

- name: Check for changes
id: check-changes
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi

- name: Run lint fix
if: steps.check-changes.outputs.has_changes == 'true'
run: bun run lint:fix

- name: Commit and push changes
if: steps.check-changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "docs: weekly docs update $(date +%Y-%m-%d)"
git push origin "$BRANCH_NAME"

- name: Create Pull Request
if: steps.check-changes.outputs.has_changes == 'true'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
CURRENT_DATE=$(date +%Y-%m-%d)
gh pr create \
--reviewer kitenite --reviewer saddlepaddle --reviewer AviPeltz \
--title "docs: weekly docs update - $CURRENT_DATE" \
--body "## Summary
This PR was automatically generated by Claude Code to update documentation based on recent PRs.

## Details
- **Prompt file**: \`.github/prompts/update-docs.md\`
- **Generated on**: $CURRENT_DATE

## Review Checklist
- [ ] Review all doc changes for accuracy
- [ ] Verify new content matches actual product behavior
- [ ] Check that no existing correct content was accidentally removed

Please review the changes before merging." \
--base main \
--head "$BRANCH_NAME"