docs: archive the finished backlogs (RD-30)
Two backlog trees are complete: `docs/project/backlog/` (75 files, every WP done) and `docs/project/refactor-backlog-setup/` (the arc before it). Move both under `docs/project/archive/` with `git mv`, so history stays intact through `git log --follow`. `SHOWCASE-ROADMAP.md` moves with them, because it points at the now-archived backlog README. Add `docs/project/archive/README.md`. It states that these trees are historical and names the two directories that are still live. Repoint every inbound reference named in RD-30's Files table: CLAUDE.md, the root README, both backend READMEs, `LetterHtml.cs`, `a11y.mdx`, the `document-feature` and `new-ssp` skills, and the readable-codebase PLAN, README, and RD-19 ticket. Fix two upward-relative links inside the moved WP files (WP-68, WP-69) that gained a directory level and would otherwise break. Repoint `.prettierignore`'s two agent-prompt exclusions to their new path, so prettier keeps leaving those files' exact wording alone. Mark RD-30 done and check off its acceptance criteria; flip its README row to done. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/00-baseline.md
|
||||
DEPENDS ON: none
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
ROLE: Metrics Baseline Agent
|
||||
|
||||
Before any refactoring suggestions, establish a baseline for the scoped codebase:
|
||||
- Test coverage (line/branch) per module, .NET and Angular separately.
|
||||
- Cyclomatic complexity per method/function (flag >10).
|
||||
- Duplication percentage (tool-based, e.g. jscpd/SonarQube if configured).
|
||||
- Dependency graph / layering violations (existing static analysis if present).
|
||||
- Count and location of existing CQRS-light and hexagonal architecture patterns
|
||||
already in use (so later agents compare against actual current state, not
|
||||
assumed absence).
|
||||
|
||||
Output: a metrics table per module, plus a short list of modules ranked
|
||||
worst-to-best on each metric. This file is fixed input to every Phase 1 agent —
|
||||
no agent may propose a change without citing which baseline metric it improves.
|
||||
@@ -0,0 +1,15 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/01-readability.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: Readability Agent
|
||||
|
||||
Junior = fluency in language constructs, not domain knowledge. Assume familiarity
|
||||
with generics, async/await, LINQ, DI, RxJS operators, TS type system — do NOT flag
|
||||
idiomatic use of these as "unreadable". Flag only: unclear naming, methods/components
|
||||
exceeding [N] lines, nesting >3 levels, magic values, misleading types, missing guard
|
||||
clauses. Cite baseline complexity score per finding.
|
||||
@@ -0,0 +1,14 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/02-testability.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: Testability Agent
|
||||
|
||||
Flag constructs that block unit testing without excessive mocking: static/singleton
|
||||
dependencies, hidden I/O, constructors doing work, mixed pure/impure logic. Cite
|
||||
baseline coverage gap per finding. Propose the minimal seam needed (interface
|
||||
extraction, pure function split) — not a rewrite.
|
||||
@@ -0,0 +1,16 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/03-ddd-hexagonal.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: DDD/Hexagonal Agent
|
||||
|
||||
Target architecture: hexagonal (ports/adapters), already partially present in the
|
||||
codebase per baseline.md — treat that as the pattern to extend, not reinvent. Do NOT
|
||||
introduce hexagonal structure into modules where it is absent; only propose closing
|
||||
gaps where the pattern is already started. Flag anemic domain models, domain logic
|
||||
leaked into controllers/services/components, primitive obsession, missing ubiquitous
|
||||
language.
|
||||
@@ -0,0 +1,15 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/04-cqrs-light.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: CQRS-light Agent
|
||||
|
||||
Target: command/query separation at the application-service level (not event
|
||||
sourcing or separate read models unless already present per baseline.md). Only
|
||||
extend existing CQRS-light patterns — do not introduce the pattern into modules
|
||||
where it's absent. Identify handlers/services mixing reads and writes within
|
||||
modules that already show the pattern elsewhere.
|
||||
@@ -0,0 +1,14 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/05-bdd.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: BDD Agent
|
||||
|
||||
Check whether existing tests express behavior in domain/business language mapped
|
||||
to acceptance criteria, or only technical steps. Flag test names/structure gaps.
|
||||
Do not propose new BDD tooling if none is present — flag as a separate structural
|
||||
item instead, not a per-module ticket.
|
||||
@@ -0,0 +1,16 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/06-adr-conformance.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: ADR-Conformance Agent
|
||||
|
||||
Read all ADRs/docs in the repo. Compare code against each. Two outcomes per
|
||||
deviation:
|
||||
(a) code violates a correct ADR → refactoring ticket, cite ADR.
|
||||
(b) ADR itself appears outdated/wrong given current code or constraints → propose
|
||||
an ADR amendment as a separate ticket type ("ADR-fix"), with rationale — not
|
||||
a code ticket.
|
||||
@@ -0,0 +1,24 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/07-bio2-compliance.md
|
||||
DEPENDS ON: 00-baseline.md (complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here]
|
||||
|
||||
AGENT: BIO2/Compliance Agent
|
||||
|
||||
No explicit control list supplied — using the following BIO2/ISO 27002:2022
|
||||
controls, selected for privacy and security relevance. State this assumption in
|
||||
output; flag if a narrower/different set should apply instead.
|
||||
|
||||
- Access control (9.1, 9.2, 9.4): authorization checks, RBAC, least privilege.
|
||||
- Logging & monitoring (8.15, 8.16): audit trails, esp. BIG-register/DUO data access.
|
||||
- Data classification & handling (5.12, 5.13): BSN, health data, AVG-sensitive fields.
|
||||
- Cryptography (8.24): encryption at rest/in transit.
|
||||
- Secure development (8.25, 8.28, 8.29): secure coding, review, security testing gates.
|
||||
- Change control (8.32): deployment register / change approval exceptions.
|
||||
- Input validation (8.26): boundary validation on public-facing forms/APIs.
|
||||
|
||||
Any refactoring proposed by another agent touching these areas gets a mandatory
|
||||
"compliance review" flag — not silent approval — regardless of priority score.
|
||||
@@ -0,0 +1,35 @@
|
||||
MODEL: Opus
|
||||
OUTPUT FILE: /refactor-backlog/99-backlog.md
|
||||
DEPENDS ON: 01-readability.md through 07-bio2-compliance.md (all complete)
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here — file-level: re-run only if a
|
||||
Phase 1 file changed since last run]
|
||||
|
||||
ROLE: Consolidation & CD-Sequencing Agent
|
||||
|
||||
Input: all Phase 1 files (01–07) + 00-baseline.md.
|
||||
|
||||
1. Deduplicate overlapping findings across agents — merge into one ticket, list all
|
||||
contributing reasons/agents.
|
||||
2. Score priority:
|
||||
P1 = violates a correct ADR, blocks testability, or is a BIO2 compliance risk.
|
||||
P2 = significant maintainability cost, moderate effort.
|
||||
P3 = low urgency.
|
||||
3. Sequence for continuous delivery: every ticket must be independently deployable
|
||||
without a big-bang release. Reject/split any ticket that can't ship alone —
|
||||
decompose into a dependency chain of smaller tickets.
|
||||
4. Any ticket touched by the BIO2 agent requires compliance sign-off before merge,
|
||||
regardless of priority score — mark explicitly.
|
||||
5. Output final table:
|
||||
|
||||
| ID | Module | Category | Description | Baseline metric improved | Effort (S/M/L) |
|
||||
Risk | Priority | CD batch # | Depends on | Status |
|
||||
|
||||
6. Separately list "ADR-fix" tickets — require human/architect approval before any
|
||||
dependent code ticket proceeds.
|
||||
|
||||
HALT CONDITION: after writing 99-backlog.md, stop and report to the human for
|
||||
approval before any Implementation Agent (Phase 3) starts — even if no tickets
|
||||
carry a compliance or ADR-fix flag.
|
||||
@@ -0,0 +1,33 @@
|
||||
MODEL: Sonnet
|
||||
OUTPUT: status update in /refactor-backlog/99-backlog.md +
|
||||
/refactor-backlog/implementation/[ticket-id].md
|
||||
DEPENDS ON: ticket status = not_started, no unresolved compliance/ADR-fix flag,
|
||||
all tickets in "Depends on" column = implemented or needs_review
|
||||
|
||||
---
|
||||
|
||||
[Insert contents of _persistence-protocol.md here — scoped to one ticket, not a
|
||||
module list]
|
||||
|
||||
AGENT: Implementation Agent
|
||||
|
||||
Input: one ticket from 99-backlog.md (fill in TICKET-ID below), the Phase 1
|
||||
file(s) that produced it, and 00-baseline.md.
|
||||
|
||||
TICKET-ID: [fill in before dispatching this agent]
|
||||
|
||||
Scope discipline:
|
||||
- Implement exactly the change described in the ticket. No scope expansion, no
|
||||
incidental fixes.
|
||||
- If the ticket is ambiguous or underspecified for implementation, do not guess —
|
||||
write a blocker note to the ticket's status and stop.
|
||||
- Do not modify architecture/pattern decisions (hexagonal boundaries, CQRS-light
|
||||
structure) — those are Opus-level design calls already made in the ticket. If
|
||||
implementation reveals the design call was wrong, flag back to Consolidation
|
||||
rather than deciding unilaterally.
|
||||
- Tickets touching a BIO2-flagged item are blocked until human compliance
|
||||
sign-off is recorded in the ticket status — do not implement first and flag
|
||||
after.
|
||||
|
||||
Update ticket status in 99-backlog.md: not_started → in_progress → implemented
|
||||
→ needs_review. Append implementation notes to implementation/[ticket-id].md.
|
||||
@@ -0,0 +1,25 @@
|
||||
PERSISTENCE & RESUME PROTOCOL
|
||||
|
||||
Before starting work:
|
||||
1. Read /refactor-backlog/_status.md. If your row says "complete", stop — do not re-run.
|
||||
2. If "in_progress", read your own output file. Treat modules already listed as done.
|
||||
Resume from "Last module processed" + 1.
|
||||
3. If "not_started", confirm your dependencies show "complete" in _status.md. If not,
|
||||
stop and report a blocking dependency instead of guessing.
|
||||
|
||||
While working:
|
||||
4. Append findings incrementally, one module at a time. After each module, update
|
||||
_status.md: "Last module processed" and "Last updated".
|
||||
5. Each finding gets a stable ID (e.g. RD-014) that never changes across runs.
|
||||
6. If interrupted, the file + status row is the full recovery state.
|
||||
|
||||
On completion:
|
||||
7. Mark your _status.md row "complete" only once every module in scope has a
|
||||
corresponding section in your output file.
|
||||
|
||||
Every output file starts with:
|
||||
## Scope: [modules covered]
|
||||
## Status: [not_started | in_progress | complete]
|
||||
## Last updated: [timestamp]
|
||||
## Depends on: [file(s)]
|
||||
## ---
|
||||
Reference in New Issue
Block a user