Summary
Prompt Hash implements overlapping prompt, version, webhook, and marketplace behavior in both root api/ functions and server/src/ controllers/routes. Security and validation fixes can land in one path while deployments continue serving the other, creating behavior drift.
Repository evidence
api/prompts/version.ts and server/src/controllers/versioningControllers.ts independently implement prompt-version behavior.
api/webhooks/* and server/src/routes/webhooks.ts expose parallel webhook stacks.
- Root serverless handlers and the Express application use separate middleware, error mapping, and runtime configuration.
Scope
- Inventory duplicate production entrypoints and select one authoritative domain service per capability.
- Make each deployment adapter call shared validation, authorization, and business logic.
- Add parity tests or remove unsupported duplicate routes with an explicit compatibility plan.
Acceptance criteria
Tests
Non-goals
- Forcing a hosting-platform migration or rewriting unrelated frontend code.
Summary
Prompt Hash implements overlapping prompt, version, webhook, and marketplace behavior in both root
api/functions andserver/src/controllers/routes. Security and validation fixes can land in one path while deployments continue serving the other, creating behavior drift.Repository evidence
api/prompts/version.tsandserver/src/controllers/versioningControllers.tsindependently implement prompt-version behavior.api/webhooks/*andserver/src/routes/webhooks.tsexpose parallel webhook stacks.Scope
Acceptance criteria
Tests
Non-goals