Skip to content

feat: Dredd → PromptForge SOUL refinement pipeline#8

Merged
DarlingtonDeveloper merged 2 commits into
mainfrom
feat/refinement-consumer
Feb 17, 2026
Merged

feat: Dredd → PromptForge SOUL refinement pipeline#8
DarlingtonDeveloper merged 2 commits into
mainfrom
feat/refinement-consumer

Conversation

@DarlingtonDeveloper
Copy link
Copy Markdown
Collaborator

Implements the NATS-based refinement proposal system as specified in briefing d851c9d5.

What's included

1. NATS Refinement Consumer (prompt_forge/core/refinement/consumer.py)

  • Subscribes to pattern.refinement.proposed events from NATS
  • Creates refinement branches with format refinement/{section}/{timestamp}
  • Applies proposed changes to target sections
  • Handles errors gracefully with proper logging

2. Proposals Endpoint (prompt_forge/api/proposals.py)

  • GET /api/v1/prompts/{slug}/proposals endpoint
  • Lists pending refinement branches (active branches with refinement/ prefix)
  • Returns branch name, creation time, target section, and source patterns
  • Integrated into main API router

3. NATS Integration

  • Wired refinement consumer into main app startup/shutdown lifecycle
  • Uses existing NATS connection pattern (NATS_URL env var)
  • Gracefully degrades if NATS is unavailable

Testing

  • All existing 290 tests continue to pass
  • New functionality tested for correct import and instantiation
  • Section change application logic verified

Implementation Details

  • Follows existing codebase patterns and conventions
  • Error handling matches existing subscribers
  • Branch creation uses existing VCS methods
  • Optional metadata storage for source patterns (backwards compatible)

- Add NATS subscriber for pattern.refinement.proposed events
- Implement proposals endpoint to list pending refinement branches
- Wire refinement consumer into main app startup/shutdown
- Create refinement branches with proposed changes applied to target sections
- All existing tests continue to pass
@DarlingtonDeveloper DarlingtonDeveloper merged commit a6e73f0 into main Feb 17, 2026
1 of 2 checks passed
@DarlingtonDeveloper DarlingtonDeveloper deleted the feat/refinement-consumer branch February 17, 2026 00:28
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