Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
9103b52
refactor: replace fetching message with tool event indicator for chat…
AshishKumar4 Oct 12, 2025
5ebb714
feat: add conversation reset functionality with confirmation dialog
AshishKumar4 Oct 12, 2025
866c881
feat: more prompt tweaks for react/frontend
AshishKumar4 Oct 13, 2025
5e1d76d
refactor: rename FastCodeFixer to PostPhaseCodeFixer and fix import path
AshishKumar4 Oct 13, 2025
db5c845
chore: adjust rate limits for agent and llm calls
AshishKumar4 Oct 13, 2025
871548f
feat: implement project name and blueprint update tools
AshishKumar4 Oct 16, 2025
dcf98a4
fix: use correct error field in deployment failure toast message
AshishKumar4 Oct 16, 2025
b76d000
fix: prevent null ruleId in ESLint diagnostic messages by providing e…
AshishKumar4 Oct 16, 2025
520c2f6
feat: initial implementation of deep debugging agent
AshishKumar4 Oct 16, 2025
9ae4640
feat: implement collapsible tool result viewer with JSON formatting s…
AshishKumar4 Oct 17, 2025
95ed92f
feat: add deep debugger transcript UI with collapsible tool results
AshishKumar4 Oct 17, 2025
4579da2
feat: add duration filter option for log retrieval in sandbox
AshishKumar4 Oct 17, 2025
41fab81
feat: add tool result field to websocket messages and update event ha…
AshishKumar4 Oct 17, 2025
8d00cd0
refactor: enhance code debugger with loop detection and improved prompts
AshishKumar4 Oct 17, 2025
52d86ba
refactor: move generation state management from flags to Promise trac…
AshishKumar4 Oct 17, 2025
92f4e0e
feat: add wait_for_generation tool and enhance tool call result handling
AshishKumar4 Oct 17, 2025
b144e2c
feat: enhance debugging tools with user interaction handling and runt…
AshishKumar4 Oct 17, 2025
b0afd15
fix: add missing await for async getFullState call in getAgentState f…
AshishKumar4 Oct 17, 2025
45ac910
feat: add previous debug session context and improve error handling i…
AshishKumar4 Oct 17, 2025
e60694f
feat: add deep debug session management with state persistence and wa…
AshishKumar4 Oct 17, 2025
0256634
feat: implement message deduplication to prevent duplicate assistant …
AshishKumar4 Oct 17, 2025
8375f5d
refactor: improve deep debugger conversation handling and remove loop…
AshishKumar4 Oct 17, 2025
185f189
refactor: pass tool renderer and stream callback directly to deep deb…
AshishKumar4 Oct 17, 2025
0c3a841
fix: prompt react fixes
AshishKumar4 Oct 17, 2025
06375ce
fix: code debugger prompt improvements
AshishKumar4 Oct 17, 2025
1bdb1e7
feat: add streaming support to deep debugger and enhance logs tool wi…
AshishKumar4 Oct 17, 2025
796e34d
feat: add force refresh mechanism for preview deployments
AshishKumar4 Oct 17, 2025
8f172ba
refactor: remove redundant tool call filtering
AshishKumar4 Oct 17, 2025
f3e545e
feat: add abort signal support to inference operations
AshishKumar4 Oct 17, 2025
6e752c2
feat: add inference cancellation support with AbortController
AshishKumar4 Oct 17, 2025
b98f862
fix: remove hardcoded models
timekone Oct 18, 2025
3cd7cab
feat: add stop generation button and handle cancelled state in phase …
AshishKumar4 Oct 18, 2025
52d917f
feat: add generate_files tool for creating new files and full rewrites
AshishKumar4 Oct 18, 2025
1365eeb
feat: display completion message when entering finalization phase
AshishKumar4 Oct 18, 2025
1259176
fix: handle missing sandbox instance by returning empty issues object
AshishKumar4 Oct 18, 2025
989aa1b
fix: fileRegeneration was using realtimeCodeFixer's model config
timekone Oct 18, 2025
9915dac
Merge pull request #160 from cloudflare/feat/enhance-code-fixing
AshishKumar4 Oct 18, 2025
9935219
Merge pull request #166 from cloudflare/feat/stop-generation
AshishKumar4 Oct 18, 2025
937d7f3
Merge pull request #169 from cloudflare/feat/deep-debuger-enhancements
AshishKumar4 Oct 18, 2025
426eb73
refactor: extract state migration logic and general refactors
AshishKumar4 Oct 18, 2025
b6844b6
refactor: deployment manager abstracted away, removed useless client …
AshishKumar4 Oct 19, 2025
2c4f626
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 19, 2025
564c8cc
refactor: consolidate sandbox client management into DeploymentManage…
AshishKumar4 Oct 19, 2025
3898da4
fix: build errors
AshishKumar4 Oct 19, 2025
d5092b0
fix: prevent reuse of aborted controllers and improve sandbox deploym…
AshishKumar4 Oct 19, 2025
a6ad975
Merge pull request #168 from Andromo-App-Maker/fix-hardcoded-models
AshishKumar4 Oct 19, 2025
fd63813
feat: sandboxsdk 0.4.3 port + in-memory template details zip extraction
AshishKumar4 Oct 20, 2025
5fbbd7a
Merge pull request #171 from cloudflare/feat/code-refactor
AshishKumar4 Oct 20, 2025
ed41939
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 20, 2025
262bf69
fix: handle parent dir creation in sandbox
AshishKumar4 Oct 20, 2025
fad85df
feat: alter template schema to return map instead of list of files
AshishKumar4 Oct 20, 2025
e28b001
chore: upgrade agents package from 0.1.6 to 0.2.14
AshishKumar4 Oct 20, 2025
e01f067
feat: in memory get template details
AshishKumar4 Oct 20, 2025
b73557e
fix: finish posting to files map
AshishKumar4 Oct 20, 2025
71d55d4
Merge branch 'feat/sandbox-sdk-upgrade-0.4.3' of github.com:cloudflar…
AshishKumar4 Oct 20, 2025
b91baaa
Merge branch 'feat/agents-sdk-upgrade' of github.com:cloudflare/orang…
AshishKumar4 Oct 20, 2025
fc9879f
Merge branch 'main' of github.com:cloudflare/orange-builds into nightly
AshishKumar4 Oct 20, 2025
287e9d4
Merge branch 'nightly' of github.com:cloudflare/orange-builds into ni…
AshishKumar4 Oct 20, 2025
872722c
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 20, 2025
7a3b2ef
Merge pull request #174 from cloudflare/feat/sandbox-sdk-upgrade-0.4.3
AshishKumar4 Oct 20, 2025
8d39dbc
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 20, 2025
4db56e3
Merge pull request #178 from cloudflare/feat/agents-sdk-upgrade
AshishKumar4 Oct 20, 2025
f9459de
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 20, 2025
af1ba31
fix: rendering and migration for template details change
AshishKumar4 Oct 20, 2025
1ac3a43
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 20, 2025
3cd14ed
feat: purely in-isolate template unzip + inmemory storage
AshishKumar4 Oct 21, 2025
2b761d0
fix: generation context template details passing
AshishKumar4 Oct 21, 2025
a6c67d0
perf: optimize binary file detection and base64 encoding in zip extra…
AshishKumar4 Oct 21, 2025
f76a0b6
refactor: file manager apis to use cached template details for all files
AshishKumar4 Oct 21, 2025
23f0261
feat: make deterministic code fixer completely sync
AshishKumar4 Oct 21, 2025
d9c7a30
fix: use templateName check instead of isInitialized() for agent star…
AshishKumar4 Oct 22, 2025
d3d4776
fix: Fixed filtering important files
AshishKumar4 Oct 22, 2025
6a48871
fix: fixed setup project broken
AshishKumar4 Oct 22, 2025
888e934
chore: update sandbox-sdk version to 0.4.7
AshishKumar4 Oct 23, 2025
ff604c6
feat: prompt refinements for zustand
AshishKumar4 Oct 23, 2025
bb0d97e
fix: log results object correctly and suppress init error propagation…
AshishKumar4 Oct 23, 2025
701fe81
fix: only generate AI proxy vars when JWT secret is configured
AshishKumar4 Oct 23, 2025
fcdc075
chore: increase LLM rate limits to 800/hr and 2000/day
AshishKumar4 Oct 23, 2025
693e742
chore: wrangler update to 4.45.0
AshishKumar4 Oct 23, 2025
625a287
Merge pull request #179 from cloudflare/feat/in-memory-template-unzip
AshishKumar4 Oct 23, 2025
f4f4f7b
perf: optimize file writing with batched shell script to reduce API r…
AshishKumar4 Oct 23, 2025
ee61d46
fix: concurrent deploy + use nanoid + stalestate
AshishKumar4 Oct 24, 2025
241ffd6
chore: remove request logging in worker fetch handler
AshishKumar4 Oct 24, 2025
596cc90
refactor: move preview deployment request inside files check condition
AshishKumar4 Oct 24, 2025
97a3c16
refactor: simplify state management in FileManager by removing redund…
AshishKumar4 Oct 24, 2025
68678ac
feat: enhance template file filtering with pattern matching and add n…
AshishKumar4 Oct 24, 2025
6bdd698
refactor: migrate sandbox proxy to internal service and revert sessio…
AshishKumar4 Oct 24, 2025
0b12d76
feat: add log file extractor tool and nanoid dependency
AshishKumar4 Oct 24, 2025
e380ee4
Merge pull request #183 from cloudflare/feat/general-patches
AshishKumar4 Oct 24, 2025
2156e89
feat: DO based git, fs storage, commit every saved file
AshishKumar4 Oct 24, 2025
3a108c6
chore: add isomorphic-git dependency to package.json
AshishKumar4 Oct 24, 2025
6005c4d
feat: add git clone protocol support with template rebasing
AshishKumar4 Oct 24, 2025
5bff523
fix: add ESM type declarations for isomorphic-git and update imports
AshishKumar4 Oct 24, 2025
9e1a98b
fix: standardize isomorphic-git imports and resolve ESM compatibility…
AshishKumar4 Oct 24, 2025
27640b8
feat: use custom isomorphic-git fork + fix fs adapter and integration
AshishKumar4 Oct 25, 2025
0dafe78
refactor: migrate git clone service from DO to worker for better memo…
AshishKumar4 Oct 25, 2025
ff9643a
fix: add ownership/access checks in git protocol handlers
AshishKumar4 Oct 25, 2025
d2e4594
feat: git repos finally working
AshishKumar4 Oct 25, 2025
14caff9
chore: bump @ashishkumar472/cf-git from 1.0.3 to 1.0.4
AshishKumar4 Oct 25, 2025
263ac37
feat: add in-memory caching for git clone operations with 5s TTL
AshishKumar4 Oct 25, 2025
7f33d02
feat: reworked github flow, pure DO based + cache token to avoid oauth
AshishKumar4 Oct 26, 2025
49fb02f
refactor: remove unused GitHub types from DeploymentManager interface
AshishKumar4 Oct 26, 2025
cd3e05d
Merge pull request #188 from cloudflare/fix/github-export
AshishKumar4 Oct 26, 2025
559d179
Merge pull request #172 from cloudflare/feat/code-version-control
AshishKumar4 Oct 26, 2025
eaf5bd5
feat: improve sandbox directory handling and error recovery
AshishKumar4 Oct 26, 2025
57ee53f
fix: Add template migration directly into onStart
AshishKumar4 Oct 26, 2025
5c471ff
fix: add setup commands execution after sandbox deployment
AshishKumar4 Oct 26, 2025
65c505b
refactor: simplify agent retrieval by removing jurisdiction search an…
AshishKumar4 Oct 26, 2025
7d02a43
feat: add persistent command execution in sandbox environment
AshishKumar4 Oct 26, 2025
7f83e19
feat: add read-only mode for agent initialization
AshishKumar4 Oct 26, 2025
a960bc2
feat: improve package.json synchronization with sandbox
AshishKumar4 Oct 26, 2025
d7532f2
feat: add Git clone functionality for repositories
AshishKumar4 Oct 26, 2025
8044881
feat: improve sandbox and git integration
AshishKumar4 Oct 26, 2025
a948e62
feat: add project name generation and config file updates
AshishKumar4 Oct 26, 2025
ce32631
Merge pull request #189 from cloudflare/feat/git-clone-ux
AshishKumar4 Oct 26, 2025
d3fbc38
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fi…
AshishKumar4 Oct 26, 2025
1fa893f
feat: add bootstrap script and template customization
AshishKumar4 Oct 26, 2025
42505d5
Merge pull request #190 from cloudflare/fix/general-patches
AshishKumar4 Oct 26, 2025
a8bb3fa
refactor: simplify template file customization logic
AshishKumar4 Oct 26, 2025
c1b8a02
feat: improve tab layout and git clone button placement
AshishKumar4 Oct 27, 2025
8b6f908
Merge pull request #192 from cloudflare/feat/git-ui-tweaks
AshishKumar4 Oct 27, 2025
427b9bf
refactor: remove git integration from sandbox service
AshishKumar4 Oct 27, 2025
650b967
perf: optimize file operations and reduce unnecessary commits
AshishKumar4 Oct 27, 2025
ed1c006
feat: enhance bootstrap command validation and safety
AshishKumar4 Oct 29, 2025
394a720
feat: code deep debugger prompt tweaks
AshishKumar4 Oct 29, 2025
d7c4261
fix: GitHub repository handling for exports to existing repo
AshishKumar4 Oct 30, 2025
c73b698
feat: optimize GitHub push with per-commit trees and blob deduplication
AshishKumar4 Oct 30, 2025
4785472
feat: add incremental GitHub sync with commit history preservation
AshishKumar4 Oct 30, 2025
f13fab7
fix: simply use git push from isomorphic git to sync with github
AshishKumar4 Oct 30, 2025
0bfb17f
Merge pull request #199 from cloudflare/fix/github-sync
AshishKumar4 Oct 30, 2025
52fdf38
fix: Only update dependencies during package.json sync + migrations
AshishKumar4 Oct 30, 2025
4904224
Merge pull request #200 from cloudflare/fix/package-json-on-git
AshishKumar4 Oct 30, 2025
89ace7f
fix: check repo exists before export
AshishKumar4 Oct 30, 2025
6ed0595
cleanup: remove stale code_review websocket handling
AshishKumar4 Oct 31, 2025
bafe0d9
feat: remove code-review system in favor of deep-debugger + user prompt
AshishKumar4 Oct 31, 2025
86d0758
Merge branch 'nightly' of github.com:cloudflare/orange-builds into fe…
AshishKumar4 Oct 31, 2025
d853266
feat: improve chat message handling and reconnection flow
AshishKumar4 Oct 31, 2025
79fb107
feat: enhance phase timeline with debugging status and issue tracking
AshishKumar4 Oct 31, 2025
6605ecd
feat: isolated deepdebug window
AshishKumar4 Oct 31, 2025
472688d
feat: improve error handling and message display for debugging
AshishKumar4 Nov 1, 2025
73af22b
feat: improve tool calling depth handling for debugging
AshishKumar4 Nov 1, 2025
2188c90
feat: enhance deep debug session management and UI
AshishKumar4 Nov 1, 2025
1b13c71
feat: limit deep_debug tool to one call per conversation turn
AshishKumar4 Nov 1, 2025
f6b6b00
feat: add git version control tools and enhance debugging system
AshishKumar4 Nov 1, 2025
0c0a777
feat: provide git tools to deep_debugger + reset functionality
AshishKumar4 Nov 1, 2025
ba741f9
Merge pull request #204 from cloudflare/fix/code-debugger-tooling
AshishKumar4 Nov 1, 2025
b7e1ae2
Merge pull request #203 from cloudflare/fix/common-ux-bugs
AshishKumar4 Nov 1, 2025
883f4be
Merge pull request #202 from cloudflare/feat/code-review-simplification
AshishKumar4 Nov 1, 2025
6df1d30
fix: filter websocket failed errors
AshishKumar4 Nov 1, 2025
4716f4e
perf: optimize git clone by only including reachable objects
AshishKumar4 Nov 1, 2025
6d361eb
fix: tune deep debug config
AshishKumar4 Nov 1, 2025
a1f9350
chore: remove unused CodeReview.ts
AshishKumar4 Nov 1, 2025
224d3b3
refactor: remove unused code fix functionality and add deployment opt…
AshishKumar4 Nov 1, 2025
3c9696f
feat: enhance git integration with safer command access
AshishKumar4 Nov 1, 2025
fd70b1c
feat: enhance git show command with diff support and optimize message…
AshishKumar4 Nov 1, 2025
72538be
feat: add WebSocket support for sandbox proxy
AshishKumar4 Nov 1, 2025
2c79cab
Merge pull request #205 from cloudflare/feat/websockets-in-sandbox
AshishKumar4 Nov 1, 2025
9d9d60b
feat: add WebSocket support for sandbox proxy
AshishKumar4 Nov 1, 2025
5f37cb3
Merge pull request #206 from cloudflare/feat/websockets-in-sandbox
AshishKumar4 Nov 1, 2025
fabfc97
refactor: simplify SandboxType definition for better type safety
AshishKumar4 Nov 1, 2025
df4e2bd
Merge pull request #207 from cloudflare/feat/websockets-in-sandbox
AshishKumar4 Nov 1, 2025
2657ba9
feat: add diff toggle option to git show command
AshishKumar4 Nov 1, 2025
406761c
fix: allow websockets now in prompts
AshishKumar4 Nov 2, 2025
27efc11
fix: better deduplication of commands for bootstrap file
AshishKumar4 Nov 2, 2025
ddd5639
fix: build errors
AshishKumar4 Nov 2, 2025
9ce7c55
feat: update to latest packages
AshishKumar4 Nov 2, 2025
f0bce24
feat: improve AI Gateway token validation and handling
AshishKumar4 Nov 2, 2025
b76b34a
Merge branch 'main' of github.com:cloudflare/orange-builds into nightly
AshishKumar4 Nov 2, 2025
d2543d5
feat: add timeout handling and force redeploy option
AshishKumar4 Nov 2, 2025
c3baadf
feat: improve code regen
AshishKumar4 Nov 2, 2025
5d6e74f
fix: fix all structured format failing tests
AshishKumar4 Nov 2, 2025
077a3a5
Merge pull request #210 from cloudflare/fix/fix-structured-format-tests
AshishKumar4 Nov 2, 2025
a1e90dd
feat: add llm.md and update claude.md using it
AshishKumar4 Nov 2, 2025
5ba22fc
feat: add automated PR workflows and commit validation
AshishKumar4 Nov 2, 2025
4a180b5
fix: remove experimental remote bindings from vite config
AshishKumar4 Nov 2, 2025
3c81d5d
feat: add automated PR description generation workflow
AshishKumar4 Nov 2, 2025
433c398
feat: enhance PR description workflow with review capabilities
AshishKumar4 Nov 2, 2025
16e18ba
feat: extend PR review trigger to include synchronize events
AshishKumar4 Nov 2, 2025
cdc68c5
fix: try use github_token instead of odic
AshishKumar4 Nov 2, 2025
04720aa
feat: enhance PR review automation with issue linking and feedback
AshishKumar4 Nov 2, 2025
b321376
feat: enhance PR review workflow with unified analysis
AshishKumar4 Nov 2, 2025
da2e1b9
refactor: streamline code review workflow and guidelines
AshishKumar4 Nov 2, 2025
d42f805
feat: add GitHub Actions for issue triage + improved code-review
AshishKumar4 Nov 3, 2025
ad7ef94
refactor: consolidate PR review workflows into single job
AshishKumar4 Nov 3, 2025
d7e534a
fix: escape single quotes in GitHub workflow commands
AshishKumar4 Nov 3, 2025
f8592b2
Merge pull request #211 from cloudflare/feat/smarter-workflows
AshishKumar4 Nov 3, 2025
e658167
Potential fix for code scanning alert no. 13: Code injection
AshishKumar4 Nov 3, 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
37 changes: 37 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Auto-label PRs based on changed files

'worker':
- changed-files:
- any-glob-to-any-file: 'worker/**/*'

'frontend':
- changed-files:
- any-glob-to-any-file: 'src/**/*'

'database':
- changed-files:
- any-glob-to-any-file:
- 'worker/database/**/*'
- 'migrations/**/*'

'agent':
- changed-files:
- any-glob-to-any-file: 'worker/agents/**/*'

'ci/cd':
- changed-files:
- any-glob-to-any-file:
- '.github/**/*'
- 'wrangler.jsonc'

'documentation':
- changed-files:
- any-glob-to-any-file:
- 'docs/**/*'
- '*.md'

'dependencies':
- changed-files:
- any-glob-to-any-file:
- 'package.json'
- 'bun.lock'
212 changes: 212 additions & 0 deletions .github/workflows/claude-docs-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
# name: Documentation Sync

# Disabled for now
# on:
# push:
# # branches:
# # - main
# # - nightly
# paths:
# - 'worker/**'
# - 'src/**'
# - 'shared/**'
# - '.github/workflows/**'
# - 'package.json'
# - 'wrangler.jsonc'

# jobs:
# docs-sync:
# name: Create PR to Update Documentation
# runs-on: ubuntu-latest
# permissions:
# contents: write
# pull-requests: write
# id-token: write

# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# ref: ${{ github.ref }}

# - name: Configure Git
# run: |
# git config user.name "github-actions[bot]"
# git config user.email "github-actions[bot]@users.noreply.github.com"

# - name: Create documentation update branch
# id: create_branch
# run: |
# BRANCH_NAME="docs/auto-sync-$(date +%Y%m%d-%H%M%S)"
# git checkout -b "$BRANCH_NAME"
# echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT

# - name: Update documentation with Claude
# uses: anthropics/claude-code-action@v1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# track_progress: true
# prompt: |
# 📚 Documentation Sync - Code merged to ${{ github.ref_name }}

# Recent commits that triggered this workflow:
# ```bash
# git log -5 --pretty=format:"%h - %s (%an, %ar)" ${{ github.event.before }}..${{ github.event.after }}
# ```

# ## Your Task

# Review recent changes and ensure ALL documentation is accurate and up-to-date:

# ### 1. Review Changes
# ```bash
# git diff ${{ github.event.before }}..${{ github.event.after }} --name-only
# git diff ${{ github.event.before }}..${{ github.event.after }} --stat
# ```

# ### 2. Documentation Files to Update

# **CLAUDE.md** - Project conventions and coding guidelines
# - Update if: New patterns, conventions, or rules added
# - Check: File structure, naming conventions, code style

# **docs/llm.md** - Comprehensive architecture and developer guide
# - Update if: Architecture changed, new features, new APIs, tools modified
# - Sections to check:
# - Quick Start (if setup changed)
# - Directory Structure (if new files/folders added)
# - API Documentation (if routes/controllers changed)
# - Deep Debugger (if tools changed in worker/agents/tools/)
# - Database Schema (if schema.ts changed)
# - WebSocket Messages (if new message types added)
# - Troubleshooting (if new common issues discovered)

# **README.md** - Main repository overview
# - Update if: Setup steps changed, new major features, deployment process changed
# - Keep: High-level, user-facing changes only

# **docs/setup.md** - Detailed setup instructions
# - Update if: Environment variables changed, prerequisites changed, setup steps changed

# **docs/architecture-diagrams.md** - Architecture documentation
# - Update if: Major architectural changes, new services, data flow changed

# ### 3. What to Look For

# **Code Changes → Doc Updates:**
# - New files in worker/agents/tools/ → Update llm.md tool registry
# - Changes to worker/api/routes/ → Update API documentation
# - Changes to worker/database/schema.ts → Update schema docs
# - New WebSocket message types → Update WebSocket docs
# - Changes to package.json dependencies → Update setup docs
# - Changes to .github/workflows/ → Update CI/CD docs if user-facing
# - New environment variables → Update setup.md and .dev.vars template

# **Don't Update If:**
# - Only minor bug fixes in existing features
# - Internal refactoring with no user-facing changes
# - Only test file changes
# - Only comment changes

# ### 4. Making Updates

# For each documentation file that needs updates:

# ```bash
# # Read current content
# cat CLAUDE.md
# cat docs/llm.md
# cat README.md
# cat docs/setup.md
# cat docs/architecture-diagrams.md
# ```

# Edit files using the Edit tool to:
# - Add new sections for new features
# - Update existing sections with changed information
# - Fix outdated examples or references
# - Update line numbers if code locations changed
# - Keep formatting consistent with existing style

# ### 5. Commit and Push

# ```bash
# # Stage all documentation changes
# git add CLAUDE.md docs/llm.md README.md docs/setup.md docs/architecture-diagrams.md

# # Commit with descriptive message
# git commit -m "docs: sync documentation with latest changes

# - Update [specific files] based on changes in [components]
# - Add documentation for [new features]
# - Fix outdated references to [what changed]

# Triggered by: ${{ github.event.head_commit.message }}"

# # Push to branch
# git push origin ${{ steps.create_branch.outputs.branch_name }}
# ```

# ### 6. Create Pull Request

# ```bash
# gh pr create \
# --repo ${{ github.repository }} \
# --base ${{ github.ref_name }} \
# --head ${{ steps.create_branch.outputs.branch_name }} \
# --title "📚 Documentation Sync - $(date +%Y-%m-%d)" \
# --body "## Documentation Updates

# This PR updates documentation to reflect recent changes merged to \`${{ github.ref_name }}\`.

# ### Changes Reviewed
# Commits: ${{ github.event.before }}...${{ github.event.after }}

# ### Documentation Updated
# - [ ] CLAUDE.md - Project conventions
# - [ ] docs/llm.md - Architecture and developer guide
# - [ ] README.md - Main overview
# - [ ] docs/setup.md - Setup instructions
# - [ ] docs/architecture-diagrams.md - Architecture docs

# ### Summary of Updates
# [List what was updated and why]

# ### Review Notes
# - Please review the changes to ensure accuracy
# - Check that examples and code snippets are correct
# - Verify line numbers and file paths are current

# ---

# 🤖 This PR was automatically generated by Claude based on code changes.
# Triggered by: ${{ github.event.head_commit.message }}"
# ```

# ## Guidelines

# - Be thorough but efficient - read diffs first, then update only what's needed
# - Maintain consistency with existing documentation style
# - Update examples and code snippets to match current implementation
# - Fix line numbers and file paths if they changed
# - Don't make stylistic changes unless fixing errors
# - If no documentation updates are needed, skip commit/PR creation and add a comment explaining why

# ## Decision Logic

# 1. If significant changes warrant documentation updates → Create PR
# 2. If only minor internal changes with no doc impact → Skip and comment
# 3. If unsure → Create PR for manual review (better safe than sorry)

# claude_args: |
# --allowed-tools "Read,Edit,Write,Bash(git:*),Bash(gh pr:*),Bash(cat:*)"
# --max-turns 40
# --model claude-sonnet-4-5-20250929

# - name: Cleanup on failure
# if: failure()
# run: |
# git checkout ${{ github.ref_name }}
# git branch -D ${{ steps.create_branch.outputs.branch_name }} || true
Loading