Skip to content

feat: Add persona-based prompt versioning#7

Merged
DarlingtonDeveloper merged 4 commits into
mainfrom
feat/persona-versioning
Feb 16, 2026
Merged

feat: Add persona-based prompt versioning#7
DarlingtonDeveloper merged 4 commits into
mainfrom
feat/persona-versioning

Conversation

@DarlingtonDeveloper
Copy link
Copy Markdown
Collaborator

Overview

Implements persona-based prompt versioning system as requested in Phase 2.

Changes

  • Database Schema: Added table with migration
  • API Endpoints:
    • → returns latest version
    • → returns specific version
    • → creates new version (auto-increments), sets previous is_latest=false
    • → lists all versions
    • → seeds initial personas
  • Initial Personas: Seeded 5 personas (researcher, developer, reviewer, tester, architect) with templates containing required placeholders: {{objective}}, {{context}}, {{constraints}}, {{scope_paths}}, {{alexandria_context}}
  • Tests: 20 comprehensive tests covering store methods and API handlers

Testing

✅ All existing tests pass (290 total)
✅ New functionality fully tested
✅ Full test suite runs successfully

Ready for review and merge.

- Add persona_prompts table with migration (007_persona_prompts.sql)
- Implement PersonaPromptStore with CRUD operations
- Add database models (PersonaPromptRow, PersonaPromptCreate/Response)
- Create persona-prompts API endpoints:
  - GET /api/v1/persona-prompts/{persona} (latest version)
  - GET /api/v1/persona-prompts/{persona}/{version} (specific version)
  - POST /api/v1/persona-prompts/{persona} (create new version)
  - GET /api/v1/persona-prompts/{persona}/versions (list versions)
  - POST /api/v1/persona-prompts/seed (seed initial personas)
- Seed 5 initial personas (researcher, developer, reviewer, tester, architect)
- Add comprehensive unit tests for store and API endpoints (20 tests)
- All existing tests pass (290 total tests)
- Add scripts/seed_persona_prompts.py for manual seeding
- Make script executable
- Remove unused imports from persona_store.py and test files
- Apply ruff format to all modified files
- All 290 tests continue to pass
@DarlingtonDeveloper DarlingtonDeveloper merged commit d437fcb into main Feb 16, 2026
1 of 2 checks passed
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