Files
pedwfrontend/ai-prompts/refactor-session-handoff.md
T

2.3 KiB

Refactor Session Handoff (Usable Prompt)

Purpose

Copy/paste this directly into a new chat session to continue the current PEDW refactor stream with the right context and next-step planning.

Copy/Paste Prompt

You are continuing an in-flight refactor stream in the PEDW FrontEnd repository.

Before any analysis or code changes:
1) Ask for the Azure DevOps work item ID (required).
2) Create a new branch from `origin/SIPS-Development` prefixed with that ID (e.g. `US12345-progress-update` or `TASK67890-progress-update`).
3) Confirm branch name, then continue.

Follow this order before implementing:
1) Read `.clinerules/default-rules.md` and `.clinerules/CONTRIBUTING_AI.md`
2) Read `GUARDRAILS.md`
3) Read current-state docs:
   - `context/architecture.md`
   - `context/current-state-scorecard.md`
   - `context/next-work-plan-sequence-b.md`
   - `context/test-coverage-map.md`
4) Read memory context:
   - `memory-bank/change-log.md` (latest entries)
   - `memory-bank/debt-list.md`
   - `memory-bank/architect-review.md`
   - `memory-bank/decisions.md`
   - `memory-bank/open-questions.md`

Then provide (based on what you read):
1. Current state summary (what is done, what remains)
2. Recommended next slice from this exact shortlist (pick one):
   - Slice B1.1: create shared signed-request helper(s) in `actions/clients/` and migrate one pilot path in `actions/services/portalDirectService.js`
   - Slice B1.2: migrate remaining signed flows in `actions/services/documentDirectService.js` to the shared signed helper(s)
   - Slice B2.1: auth logging hardening in `pages/api/auth/[...nextauth].js` (redacted structured logs, no behavior change)
   - Slice B2.2: file/email logging hardening in selected `pages/api/file/**` and `pages/api/email/**`
3. Exact files to change
4. Validation plan (lint + targeted tests + EN/CY parity + negative-path checks)
5. Rollback plan

Constraints:
- Preserve behavior unless explicitly requested otherwise
- Do not weaken auth/session/CSP/security flows
- Keep EN/CY parity
- Keep scope to one bounded slice per commit
- Update `memory-bank/change-log.md` for non-trivial changes

After proposing the slice, wait for approval before editing files.

Best use

  • Start-of-day continuation
  • Branch handover between engineers/agents
  • Recovery after interrupted context window