POST /registrations passed its Documents list straight to Submit, which calls
DocumentStore.Link on every digital documentId in it — and linking a document
blocks its owner from ever deleting it (DeleteOwned returns 409 Linked). That
path had no ForeignIds ownership check, so any authenticated citizen could
post another citizen's document id and permanently block them from deleting
their own diploma scan. POST /applications/{id}/submit, the endpoint actually
in use, has had that guard since it was written.
Deleted rather than guarded: the endpoint is dead. No frontend caller, and
the whole registratie flow goes through /applications/{id}/submit.
RegistratieRequest went with it, and so did SubmissionRules.RejectRegistratie
— reachable only from here, and contradicted by the live path, which treats a
handmatig diploma as "does not auto-approve" rather than a 422 rejection. Its
own message said as much while being returned as a rejection. That last part
is a judgement call beyond the ticket's wording; reverting the two
SubmissionRules hunks restores it in isolation.
Coverage moved rather than vanished: the problem+json shape assertion is now
on /change-requests (the other endpoint on the same Submit helper), and the
linked-delete 409 test goes through the real submit path.
swagger.json, the generated client and the behaviour spec regenerated.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Refactoring backlog — automated setup
What's in this package
refactor-backlog-setup/
setup.sh ← run this once, from the root of the target repo
agents/ ← source prompts (edit these if you need to tweak
scope/wording before running setup.sh)
_persistence-protocol.md
00-baseline.prompt.md
01-readability.prompt.md
02-testability.prompt.md
03-ddd-hexagonal.prompt.md
04-cqrs-light.prompt.md
05-bdd.prompt.md
06-adr-conformance.prompt.md
07-bio2-compliance.prompt.md
08-consolidation.prompt.md
09-implementation.prompt.md (template — one TICKET-ID per Phase 3 dispatch)
Usage
- Copy this
refactor-backlog-setup/folder into the root of the target repo (or reference it via a relative path). - Edit anything in
agents/if scope/exclusions need repo-specific detail (e.g. exact module paths, ADR folder location) — the prompts currently use the defaults agreed in the design conversation. - Run:
This creates
bash refactor-backlog-setup/setup.sh./refactor-backlog/with:_status.mdinitialized, all agentsnot_started00-baseline.mdthrough07-bio2-compliance.mdinitialized with headers99-backlog.mdempty, ready for Consolidationimplementation/folder for Phase 3 notesfinal-prompts/— every agent prompt with the persistence protocol already merged in. These are the exact prompts to dispatch — no manual copy-paste needed.
Dispatch order
- Dispatch
final-prompts/00-baseline.prompt.md(Opus). Wait for_status.md→ baseline: complete. - Dispatch the 7 Phase 1 prompts in parallel (Opus):
01through07. Each checks its own dependency in_status.mdbefore starting. - Once all 7 show
complete, dispatchfinal-prompts/08-consolidation.prompt.md(Opus). It writes99-backlog.mdand halts for human approval — check the file for anyADR-fixor BIO2-flagged tickets before proceeding. - For each approved ticket, copy
final-prompts/09-implementation.prompt.md, fill inTICKET-ID:, dispatch (Sonnet). Run tickets in parallel within a CD batch, sequential across batches, per theDepends oncolumn in99-backlog.md.
Re-running / resuming
Safe to re-run setup.sh only on a fresh workspace — it does not check for an
existing ./refactor-backlog/ and will overwrite _status.md and the phase
output files. If a run is already in progress, don't re-run setup.sh; just
re-dispatch the relevant final-prompts/*.prompt.md — each agent reads
_status.md and its own output file first and resumes from where it left off.