Commit Graph

346 Commits

Author SHA1 Message Date
leex279
a03ce1e4fd fix: Respect llms.txt priority over robots.txt sitemap declarations
Remove the special case that gave robots.txt sitemap declarations highest
priority, which incorrectly overrode the global priority order. Now properly
respects the intended priority: llms-full.txt > llms.txt > llms.md > llms.mdx >
sitemap.xml > robots.txt.

This fixes the issue where supabase.com/docs would return sitemap.xml instead
of llms.txt even though both files exist at /docs/ and llms.txt should have
higher priority.

Changes:
- Removed robots.txt early return that bypassed priority order
- Updated test to verify llms files take precedence over robots.txt sitemaps
- All discovery now follows consistent DISCOVERY_PRIORITY order

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 19:37:14 +02:00
leex279
8777e9456c feat: Prioritize same-directory discovery for llms.txt and sitemaps
Improve discovery logic to check the same directory as the base URL first before
falling back to root-level and subdirectories. This ensures files like
https://supabase.com/docs/llms.txt are found when crawling
https://supabase.com/docs.

Changes:
- Check same directory as base_url first (e.g., /docs/llms.txt for /docs URL)
- Fall back to root-level urljoin behavior
- Include base directory name in subdirectory checks (e.g., /docs subdirectory)
- Maintain priority order: same-dir > root > subdirectories
- Log discovery location for better debugging

This addresses cases where documentation directories contain their own llms.txt
or sitemap files that should take precedence over root-level files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 19:26:24 +02:00
leex279
e5160dde5c fix: Address CodeRabbit feedback for discovery service
- Preserve URL case in robots.txt parsing by only lowercasing the sitemap: prefix check
- Add support for relative sitemap paths in robots.txt using urljoin()
- Fix HTML meta tag parsing to use case-insensitive regex instead of lowercasing content
- Add URL scheme validation for discovered sitemaps (http/https only)
- Fix discovery target domain filtering to use discovered URL's domain instead of input URL
- Clean up whitespace and improve dict comprehension usage

These changes improve discovery reliability and prevent URL corruption while maintaining
backward compatibility with existing discovery behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 19:03:25 +02:00
Claude Code
a98f778b9c Update quick test URL to use llms.txt instead of llms-full.txt
Changed the example URL in the Quick Test section from https://ai.pydantic.dev/llms-full.txt to https://ai.pydantic.dev/llms.txt for a more concise test example.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-17 16:39:24 +00:00
Rasmus Widing
8f3e8bc220 fix: add trailing slashes to agent work orders endpoints
- add trailing slashes to prevent FastAPI mount() 307 redirects
- add defensive null check for repository_url in detail view
- fixes ERR_NAME_NOT_RESOLVED when browser follows redirect to archon-server
2025-10-17 09:53:53 +03:00
Rasmus Widing
edf3a51fa5 fix: resolve agent work orders api routing and defensive coding
- add trailing slashes to agent-work-orders endpoints to prevent FastAPI mount() redirects
- add defensive null check for repository_url in detail view
- fix backend routes to use relative paths with app.mount()
- resolves ERR_NAME_NOT_RESOLVED when accessing agent work orders
2025-10-17 09:52:58 +03:00
Rasmus Widing
6fe9c110e2 test: update agent work order tests for new workflow architecture 2025-10-16 19:33:45 +03:00
Rasmus Widing
fd81505908 refactor: simplify workflow to user-selectable 6-command architecture
Simplifies the workflow orchestrator from hardcoded 11-step atomic operations
to user-selectable 6-command workflow with context passing.

Core changes:
- WorkflowStep enum: 11 steps → 6 commands (create-branch, planning, execute, commit, create-pr, prp-review)
- workflow_orchestrator.py: 367 lines → 200 lines with command stitching loop
- Remove workflow_type field, add selected_commands parameter
- Simplify agent names from 11 → 6 constants
- Remove test/review phase config flags (now optional commands)

Deletions:
- Remove test_workflow.py, review_workflow.py, workflow_phase_tracker.py
- Remove 32 old command files from .claude/commands
- Remove PRPs/specs and PRD files from version control
- Update .gitignore to exclude specs, features, and validation markdown files

Breaking changes:
- AgentWorkOrder no longer has workflow_type field
- CreateAgentWorkOrderRequest now uses selected_commands instead of workflow_type
- WorkflowStep enum values incompatible with old step history

56 files changed, 625 insertions(+), 15,007 deletions(-)
2025-10-16 19:18:32 +03:00
Rasmus Widing
1c0020946b feat: Implement phases 3-5 of compositional workflow architecture
Completes the implementation of test/review workflows with automatic resolution
and integrates them into the orchestrator.

**Phase 3: Test Workflow with Resolution**
- Created test_workflow.py with automatic test failure resolution
- Implements retry loop with max 4 attempts (configurable via MAX_TEST_RETRY_ATTEMPTS)
- Parses JSON test results and resolves failures one by one
- Uses existing test.md and resolve_failed_test.md commands
- Added run_tests() and resolve_test_failure() to workflow_operations.py

**Phase 4: Review Workflow with Resolution**
- Created review_workflow.py with automatic blocker issue resolution
- Implements retry loop with max 3 attempts (configurable via MAX_REVIEW_RETRY_ATTEMPTS)
- Categorizes issues by severity (blocker/tech_debt/skippable)
- Only blocks on blocker issues - tech_debt and skippable allowed to pass
- Created review_runner.md and resolve_failed_review.md commands
- Added run_review() and resolve_review_issue() to workflow_operations.py
- Supports screenshot capture for UI review (configurable via ENABLE_SCREENSHOT_CAPTURE)

**Phase 5: Compositional Integration**
- Updated workflow_orchestrator.py to integrate test and review phases
- Test phase runs between commit and PR creation (if ENABLE_TEST_PHASE=true)
- Review phase runs after tests (if ENABLE_REVIEW_PHASE=true)
- Both phases are optional and controlled by config flags
- Step history tracks test and review execution results
- Proper error handling and logging for all phases

**Supporting Changes**
- Updated agent_names.py to add REVIEWER constant
- Added configuration flags to config.py for test/review phases
- All new code follows structured logging patterns
- Maintains compatibility with existing workflow steps

**Files Changed**: 19 files, 3035+ lines
- New: test_workflow.py, review_workflow.py, review commands
- Modified: orchestrator, workflow_operations, agent_names, config
- Phases 1-2 files (worktree, state, port allocation) also staged

The implementation is complete and ready for testing. All phases now support
parallel execution via worktree isolation with deterministic port allocation.
2025-10-16 19:18:03 +03:00
Rasmus Widing
9a60d6ae89 sauce aow 2025-10-16 19:17:18 +03:00
leex279
968e5b73fe Add SSL verification and response size limits to discovery service
- Enable SSL certificate verification (verify=True) for all HTTP requests
- Implement streaming with size limits (10MB default) to prevent memory exhaustion
- Add _read_response_with_limit() helper for secure response reading
- Update all test mocks to support streaming API with iter_content()
- Fix test assertions to expect new security parameters
- Enforce deterministic rounding in progress mapper tests

Security improvements:
- Prevents MITM attacks through SSL verification
- Guards against DoS via oversized responses
- Ensures proper resource cleanup with response.close()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 22:31:19 +02:00
Cole Medin
3f0815b686 Add YouTube setup tutorial and example workflow link to README
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 18:00:26 -05:00
Cole Medin
c8dda39eb7 adding number one repo of the day to readme
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 08:37:50 -05:00
Cole Medin
a9e2430c20 fix: Use direct_prompt instead of custom_instructions for agent mode 2025-10-11 07:56:25 -05:00
Cole Medin
7a4f49a20c fix: Set Claude Code action to agent mode for workflow_dispatch 2025-10-11 07:54:20 -05:00
Cole Medin
49f23a9b84 fix: Change release notes workflow to manual trigger only (workflow_dispatch) 2025-10-11 07:52:35 -05:00
Cole Medin
2a75b9902e fix: Switch release notes workflow to use github_token instead of OIDC 2025-10-11 07:50:42 -05:00
Cole Medin
dc03ec1904 Adjusting permissions in release note workflow 2025-10-11 07:41:43 -05:00
Cole Medin
cc38f87705 Adding GitHub token to release workflow. 2025-10-11 07:22:05 -05:00
DIY Smart Code
f83786f723 feat: AI-powered release notes generator with Claude (#773)
* feat: Add AI-powered release notes generator with Claude

Implements automated release notes generation using Claude AI for releases and branch comparisons.

## Features

- **GitHub Action Workflow**: Automatically generates release notes when tags are pushed or releases are created
- **Local Testing Script**: Test release note generation locally before pushing
- **Branch Comparison Support**: Compare stable vs main branches or any two refs (tags, branches, commits)
- **Smart Branch Resolution**: Automatically resolves local/remote branches (e.g., stable → origin/stable)
- **Comprehensive Release Notes**: Includes features, improvements, bug fixes, technical changes, statistics, and contributors

## Files Added

- `.github/workflows/release-notes.yml` - GitHub Action for automated release notes
- `.github/RELEASE_NOTES_SETUP.md` - Complete setup guide and usage documentation
- `.github/test-release-notes.sh` - Local testing script with branch comparison support
- `.gitignore` - Exclude local release notes test files

## Usage

### Local Testing
```bash
export ANTHROPIC_API_KEY="sk-ant-..."
./.github/test-release-notes.sh                    # Compare origin/stable..main
./.github/test-release-notes.sh stable main        # Explicit branches
./.github/test-release-notes.sh v1.0.0 v2.0.0      # Compare tags
```

### GitHub Action
1. Add `ANTHROPIC_API_KEY` to repository secrets
2. Push a tag: `git tag v1.0.0 && git push origin v1.0.0`
3. Release notes are automatically generated and added to the GitHub release

## Technical Details

- Uses Claude Sonnet 4 for intelligent content analysis
- Properly escapes JSON using jq for robust handling of special characters
- Supports multiple comparison formats: tags, branches, commit hashes
- Cost: ~$0.003 per release (~$0.036/year for monthly releases)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: Use Claude Code OAuth token for GitHub Action, keep API key for local testing

Changes the GitHub Actions workflow to use Claude Code OAuth authentication (consistent with claude-review workflow) while keeping direct API key authentication for local testing.

## Changes

### GitHub Actions Workflow
- **Before**: Direct API calls with `ANTHROPIC_API_KEY`
- **After**: Uses `anthropics/claude-code-action@beta` with `CLAUDE_CODE_OAUTH_TOKEN`

### Benefits
-  Consistent authentication with existing `claude-review` workflow
-  Better GitHub integration through Claude Code Action
-  No additional API costs (included in Claude Code subscription)
-  Same secret (`CLAUDE_CODE_OAUTH_TOKEN`) works for both workflows

### Local Testing
- **Unchanged**: Still uses `ANTHROPIC_API_KEY` for direct API calls
- Simple, fast iteration during development
- No dependency on Claude Code Action locally

## Implementation Details

The workflow now:
1. Prepares all release context in a `release-context.md` file
2. Uses Claude Code Action to read the context and generate release notes
3. Writes output to `release_notes.md`
4. Validates the generated file before creating/updating the release

## Documentation Updates
- Updated setup instructions to use `CLAUDE_CODE_OAUTH_TOKEN`
- Added section explaining authentication differences
- Clarified cost implications (OAuth has no additional costs)
- Notes that same token works for both `claude-review` and release notes workflows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-11 07:15:02 -05:00
leex279
d696918ff0 Merge main into feature/automatic-discovery-llms-sitemap-430
Resolved merge conflicts by integrating features from both branches:
- Added page_storage_ops service initialization from main
- Merged link text extraction with discovery mode features
- Preserved discovery single-file mode and domain filtering
- Maintained link text fallbacks for title extraction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 09:31:24 +02:00
sean-eskerium
4050c3540a Merge pull request #777 from coleam00/refactor/projects-ui
Refactor the UI and add Documents back.
2025-10-10 21:58:25 -04:00
Developer
ef4262681f Code rabbit issues fix again 2025-10-10 21:54:04 -04:00
Cole Medin
77e9342c27 Updating title exxtraction for llms.txt 2025-10-10 18:16:03 -05:00
Cole Medin
4a9ed51cff Adjusting table creation order in complete_setup.sql 2025-10-10 17:55:30 -05:00
Cole Medin
571e7c18c4 Correcting migrations in complete_setup.sql 2025-10-10 17:52:14 -05:00
Cole Medin
710909eecd Fixing up migration order 2025-10-10 17:50:41 -05:00
Developer
913f47ba62 code rabbit feedback 2025-10-10 18:40:25 -04:00
Developer
20c57acb00 Code rabbit feedback 2025-10-10 18:30:12 -04:00
DIY Smart Code
3168c8b69f fix: Set explicit PLAYWRIGHT_BROWSERS_PATH to fix browser installation (#765)
* fix: Set explicit PLAYWRIGHT_BROWSERS_PATH to fix browser installation

Fixes Playwright browser not found error during web crawling.

The issue was introduced in the uv migration (9f22659) where the
browser installation path was not explicitly set as a persistent
environment variable.

Changes:
- Add ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- Add --with-deps flag to playwright install command
- Add comprehensive root cause analysis document

Without this fix, Playwright installed browsers to a default location
at build time but couldn't find them at runtime, causing crawling
operations to fail with "Executable doesn't exist" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove --with-deps flag to prevent build conflicts

The --with-deps flag was causing build failures on some systems because:
- We already manually install all Playwright dependencies (lines 26-49)
- --with-deps attempts to reinstall these packages
- This causes package conflicts and build failures on Windows/WSL

The core fix (ENV PLAYWRIGHT_BROWSERS_PATH) remains the same.

* Delete PLAYWRIGHT_FIX_ANALYSIS.md

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cole Medin <cole@dynamous.ai>
2025-10-10 17:11:52 -05:00
sean-eskerium
7c3823e08f Fixes: crawl code storage issue with <think> tags for ollama models. (#775)
* Fixes: crawl code storage issue with <think> tags for ollama models.

* updates from code rabbit review
2025-10-10 17:09:53 -05:00
Developer
8ff39fa1d5 Merge branch 'main' into refactor/projects-ui
Merged in PR #776 (refactor/knowledge-ui) from main.
No conflicts - different features.
2025-10-10 17:08:05 -04:00
sean-eskerium
94e28f85fd Merge pull request #776 from coleam00/refactor/knowledge-ui
Refactoring the UI for consistent styling
2025-10-10 17:03:05 -04:00
sean-eskerium
e22c6c3836 fix code rabbit suggestions. 2025-10-10 14:42:01 -04:00
sean-eskerium
a860b27848 Refactor the UI and add Documents back. 2025-10-10 14:24:09 -04:00
sean-eskerium
691adccc12 Refactoring the UI for consistent styling 2025-10-10 03:36:35 -04:00
sean-eskerium
4ad1fb0808 Merge pull request #772 from coleam00/feature/ui-style-guide
Feature/UI style guide
2025-10-09 21:21:17 -04:00
sean-eskerium
88cb8d7f03 Update archon-ui-main/src/features/style-guide/layouts/ProjectsLayoutExample.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-09 21:17:00 -04:00
sean-eskerium
f0030699a8 Update archon-ui-main/src/features/style-guide/layouts/ProjectsLayoutExample.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-09 21:15:14 -04:00
sean-eskerium
59f4568fda another round of code rabbit feedback 2025-10-09 21:05:12 -04:00
sean-eskerium
0013336ee3 Merge branch 'main' of https://github.com/coleam00/Archon into feature/ui-style-guide 2025-10-09 20:42:08 -04:00
sean-eskerium
ad82f6e9f6 Another round of Coderabbit feedback. 2025-10-09 20:40:47 -04:00
Cole Medin
bfd0a84f64 RAG Enhancements (Page Level Retrieval) (#767)
* Initial commit for RAG by document

* Phase 2

* Adding migrations

* Fixing page IDs for chunk metadata

* Fixing unit tests, adding tool to list pages for source

* Fixing page storage upsert issues

* Max file length for retrieval

* Fixing title issue

* Fixing tests
2025-10-09 19:39:27 -05:00
sean-eskerium
c3f42504ea code rabbit updates 2025-10-09 20:19:51 -04:00
sean-eskerium
98946817b4 Merge remote-tracking branch 'origin/main' into feature/ui-style-guide 2025-10-09 17:43:43 -04:00
sean-eskerium
02533dc37c Fixing Code Rabbit suggestions. 2025-10-09 16:23:32 -04:00
DIY Smart Code
e6d538fdd8 Merge pull request #769 from coleam00/crawl4ai-update
chore: update crawl4ai from 0.6.2 to 0.7.4
2025-10-09 21:52:36 +02:00
sean-eskerium
daf915c083 Fixes from biome and consistency review. 2025-10-09 14:26:37 -04:00
sean-eskerium
4e6116fa2f Fix consistency and biome formatting issues 2025-10-09 13:49:12 -04:00
sean-eskerium
9e4c7eaf4e Updating documentation and the review command refinement. 2025-10-09 13:35:24 -04:00