Implement VersioningService:
POST /prompts/:id/versions — push new version
- Compute SHA-256 hash of content (first 16 chars)
- Reject if identical hash already exists for this prompt
- Auto-increment version tag:
v1.0.0 → v1.0.1
- Store
parentId to build the version tree
GET /prompts/:id/versions — list all versions with author + eval count
GET /prompts/:id/versions/:tag — get specific version by tag
Acceptance criteria:
- Pushing identical content twice returns
409 Conflict with the existing version tag
- Version tree is traversable via
parentId
Implement
VersioningService:POST /prompts/:id/versions— push new versionv1.0.0 → v1.0.1parentIdto build the version treeGET /prompts/:id/versions— list all versions with author + eval countGET /prompts/:id/versions/:tag— get specific version by tagAcceptance criteria:
409 Conflictwith the existing version tagparentId