Skip to content

Claude draft#1

Merged
eshulman2 merged 10 commits into
mainfrom
claude_draft
Mar 30, 2026
Merged

Claude draft#1
eshulman2 merged 10 commits into
mainfrom
claude_draft

Conversation

@eshulman2

Copy link
Copy Markdown
Collaborator

No description provided.

eshulman2 and others added 10 commits March 30, 2026 14:24
Phase 1 (Setup):
- Project structure with src/forge layout
- pyproject.toml with Python 3.11+, LangGraph, FastAPI, Redis deps
- Dockerfile and docker-compose.yml for containerized deployment
- Environment configuration template

Phase 2 (Foundational):
- Configuration management with Pydantic settings
- Domain models (Feature, Epic, Task, WebhookEvent)
- Redis checkpointer for LangGraph state persistence
- Jira REST client with ADF support
- GitHub REST client for PR operations
- Redis Streams queue (producer/consumer with FIFO)
- FastAPI app skeleton with health endpoints
- Langfuse tracing integration
- LangGraph workflow state definitions
- Test fixtures for mocking external services

Includes spec.md, plan.md, tasks.md, and supporting design documents.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
User Story 1 (PRD Generation):
- PRD generation node with Claude integration
- PRD approval gate with human-in-the-loop pause
- Feedback-based PRD regeneration

User Story 2 (Spec Generation):
- Spec generation node with Given/When/Then prompts
- Spec approval gate
- Feedback-based spec regeneration

User Story 3 (Epic Decomposition):
- Epic decomposition node generating 2-5 Epics
- Plan approval gate for Tech Lead review
- Feature-level and Epic-level feedback handling

User Story 4 (Task Generation):
- Task generation node with repository assignment
- Task detail generation with acceptance criteria

User Story 5 (Webhook Processing):
- Jira webhook endpoint with signature validation
- GitHub webhook endpoint with event parsing
- Deduplication middleware using Redis
- Payload validation middleware
- FIFO ordering per ticket in queue consumer

Also includes:
- LangGraph workflow graph wiring all nodes
- Integration exports and module updates

57/105 tasks completed (54%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Workspace Management:
- WorkspaceManager for creating ephemeral temp directories
- GitOperations for clone, branch, commit, push
- GuardrailsLoader for reading constitution.md/agents.md

Execution Nodes:
- task_router: Groups Tasks by repository
- workspace_setup: Creates workspace and clones repo
- implementation: Invokes Claude for code generation
- pr_creation: Pushes branch and creates PR

Graph Integration:
- Wired execution flow: task_router -> setup -> implement -> PR
- Loop back for multiple tasks per repo
- Route to next repo or CI evaluation after completion

State Extensions:
- Added execution tracking fields (current_repo, implemented_tasks, etc.)
- PR tracking (current_pr_url, current_pr_number)

66/105 tasks completed (63%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- US7: CI/CD validation with autonomous fix loop
  - CI status evaluation from GitHub check runs
  - Autonomous fix attempts with retry limit
  - Escalation to Blocked status on exhaustion

- US8: AI code review before human review
  - Quality, security, and spec alignment checks
  - Constitution compliance checking
  - Review decision routing

- US9: Human review and merge handling
  - PR review feedback routing
  - Task/Epic/Feature status aggregation on merge

- US11: Specialized bug workflow
  - RCA generation with TDD approach
  - RCA approval gate with feedback loop
  - Test-first bug fix implementation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add parallel task routing with LangGraph Send API
  - route_tasks_parallel() for fan-out to multiple repos
  - aggregate_parallel_results() for fan-in PR collection
  - ParallelExecutionTracker for branch state management

- Extend workflow state for parallel execution
  - parallel_execution_enabled flag
  - parallel_branch_id/parallel_total_branches tracking
  - CI/CD, AI review, human review tracking fields

- Update graph for fan-out/fan-in pattern
  - Conditional routing based on repo count
  - MAX_CONCURRENT_REPOS limit (5)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive README.md with setup and usage instructions
- Implement rate limiting with token bucket algorithm
  - Per-service limits for Jira, GitHub, Anthropic
  - Burst support and configurable limits
- Add structured JSON logging for observability
  - ContextLogger for request-scoped context
  - Helpers for workflow, API, and LLM call logging
- Implement graceful shutdown handling
  - Signal handlers for SIGTERM/SIGINT
  - Task tracking and cleanup coordination
- Add retry logic with exponential backoff
  - Configurable retry policies
  - Pre-configured settings for each service
- Fix linting issues in graph.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add comprehensive API description with feature overview
- Configure OpenAPI tags for endpoint categorization
- Update route tags to match OpenAPI configuration
- Expose /docs, /redoc, and /openapi.json endpoints

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove unused get_workspace_manager import from pr_creation.py
- Simplify task_router edge to direct connection (Send API
  is called within the node, not as edge target)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use conditional edge with route_tasks_parallel directly
- Return string for sequential, list[Send] for parallel fan-out
- LangGraph handles Send objects from routing function

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add ANTHROPIC_VERTEX_PROJECT_ID and ANTHROPIC_VERTEX_REGION config
- Create get_anthropic_client() helper that returns either
  AsyncAnthropic (direct API) or AsyncAnthropicVertex (Vertex AI)
- Update all nodes to use the helper instead of direct instantiation
- Auto-detect mode based on which credentials are set

Usage:
- Direct API: Set ANTHROPIC_API_KEY
- Vertex AI: Set ANTHROPIC_VERTEX_PROJECT_ID (leave API key empty)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@eshulman2 eshulman2 merged commit 802f7bc into main Mar 30, 2026
@eshulman2 eshulman2 deleted the claude_draft branch March 30, 2026 12:53
eshulman2 added a commit that referenced this pull request Jun 7, 2026
The previous implementation used text.find("\n#") which matched any
\n# anywhere — including #1 in numbered lists or heading-like patterns
in agent narration. This could strip actual document content like the
Executive Summary.

Now only looks within the first 10 lines and requires proper heading
format (# or ## followed by a space).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eshulman2 added a commit that referenced this pull request Jun 8, 2026
The previous implementation used text.find("\n#") which matched any
\n# anywhere — including #1 in numbered lists or heading-like patterns
in agent narration. This could strip actual document content like the
Executive Summary.

Now only looks within the first 10 lines and requires proper heading
format (# or ## followed by a space).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eshulman2 added a commit that referenced this pull request Jun 8, 2026
The previous implementation used text.find("\n#") which matched any
\n# anywhere — including #1 in numbered lists or heading-like patterns
in agent narration. This could strip actual document content like the
Executive Summary.

Now only looks within the first 10 lines and requires proper heading
format (# or ## followed by a space).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant