From e7fb700c1a94c016be7192219a97b6fc3393fcc3 Mon Sep 17 00:00:00 2001 From: Daniel Gee Date: Wed, 27 May 2026 23:00:21 +0100 Subject: [PATCH] Remove Copilot Squad infrastructure Delete the .squad/ directory containing Squad runtime data: agent histories, decisions, sessions, skills, and logs. Retains all reusable Copilot assets: .github/skills/, .github/prompts/, .github/workflows/, .github/aw/, and AGENTS.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .squad/agents/basher/history.md | 30 ----------- .squad/agents/yen/history.md | 25 --------- .squad/decisions.md | 55 -------------------- .squad/decisions/inbox/basher-issue-977.md | 6 --- .squad/skills/set-like-write-dedupe/SKILL.md | 32 ------------ 5 files changed, 148 deletions(-) delete mode 100644 .squad/agents/basher/history.md delete mode 100644 .squad/agents/yen/history.md delete mode 100644 .squad/decisions.md delete mode 100644 .squad/decisions/inbox/basher-issue-977.md delete mode 100644 .squad/skills/set-like-write-dedupe/SKILL.md diff --git a/.squad/agents/basher/history.md b/.squad/agents/basher/history.md deleted file mode 100644 index 422365c1..00000000 --- a/.squad/agents/basher/history.md +++ /dev/null @@ -1,30 +0,0 @@ -# Project Context - -- **Owner:** Daniel Gee -- **Project:** Menu -- **Stack:** Vue 3, Quasar, TypeScript, C#/.NET, EF Core, Aspire -- **Description:** Recipe management app for customers to save and access recipes easily. -- **Created:** 2026-05-03T21:34:28.467+01:00 - -## Team Assignments (2026-05-03) - -### Active Work - -**Issues:** #977, #978, #979, #980 (duplicate prevention epic) - -- **#977** (Prevent duplicate inserts — set-like) — In Progress -- **#978** (Prevent duplicate inserts — canonical) — Ready when #977 complete -- **#979** (Add uniqueness constraints) — Depends on #977/#978 -- **#980** (Expose explicit duplicate conflicts) — Final step - -**Label:** `squad:basher` - -## Learnings - -- Backend stack is C#/.NET with Aspire orchestration. -- Backend code lives under `backend/`. -- Recipe persistence and API behavior are core product responsibilities. -- Duplicate handling work is sequenced: service/repo logic → schema constraints → API contract. -- Exact duplicate handling for set-like writes now normalizes request payloads in `backend/MenuApi/Services/IngredientService.cs` and `backend/MenuApi/Services/RecipeService.cs` before repository calls. -- Repository write paths also stay defensive: `backend/MenuApi/Repositories/IngredientRepository.cs` deduplicates `UnitIds`, and `backend/MenuApi/Repositories/RecipeRepository.cs` deduplicates exact `RecipeIngredient` records before upsert. -- Regression coverage for duplicate-equivalent write requests lives in `backend/MenuApi.Tests/Services/IngredientServiceTests.cs`, `backend/MenuApi.Tests/Repositories/RecipeRepositoryTests.cs`, `backend/MenuApi.Tests/Services/RecipeServiceTests.cs`, `backend/MenuApi.Integration.Tests/IngredientIntegrationTests.cs`, and `backend/MenuApi.Integration.Tests/RecipeWithIngredientsIntegrationTests.cs`. diff --git a/.squad/agents/yen/history.md b/.squad/agents/yen/history.md deleted file mode 100644 index 0bde3817..00000000 --- a/.squad/agents/yen/history.md +++ /dev/null @@ -1,25 +0,0 @@ -# Project Context - -- **Owner:** Daniel Gee -- **Project:** Menu -- **Stack:** Vue 3, Quasar, TypeScript, C#/.NET, EF Core, Aspire -- **Description:** Recipe management app for customers to save and access recipes easily. -- **Created:** 2026-05-03T21:34:28.467+01:00 - -## Team Assignments (2026-05-03) - -### Active Work - -**Issues:** #884, #885 (testing infrastructure) - -- **#884** (Review AutoData usage) — In Progress -- **#885** (Review integration tests) — Can work in parallel - -**Label:** `squad:yen` - -## Learnings - -- The product spans frontend and backend, so testing will likely cross both layers. -- Focus on recipe save and retrieval flows, plus regressions around data integrity. -- Use the existing repo test patterns instead of inventing new frameworks. -- Testing infrastructure cleanup (#884, #885) improves fixture maintainability and AppHost collection validation. diff --git a/.squad/decisions.md b/.squad/decisions.md deleted file mode 100644 index 84c0e147..00000000 --- a/.squad/decisions.md +++ /dev/null @@ -1,55 +0,0 @@ -# Squad Decisions - -## Active Decisions - -### Backlog Triage — 2026-05-03 - -**Decision Owner:** Danny (Lead) -**Date:** 2026-05-03T21:56:25.759+01:00 -**Status:** ✅ Implemented - -#### Summary - -Triaged 8 open GitHub issues in dgee2/Menu. Routed 7 issues into Squad workflow with explicit member assignments. Kept 1 epic untagged pending sub-issue completion. - -#### Routing Decisions - -| Issue | Title | Assigned To | Rationale | -|-------|-------|-------------|-----------| -| #1012 | Dependency Updates | squad:copilot | Good fit — well-scoped boilerplate task with clear acceptance criteria | -| #977 | Prevent duplicate inserts (set-like) | squad:basher | Backend service/repository work; high-priority in epic sequence | -| #978 | Prevent duplicate inserts (canonical) | squad:basher | Backend lookup-before-insert logic; clear scope with existing patterns | -| #979 | Add uniqueness constraints | squad:basher | EF Core migrations and schema hardening; depends on #977/#978 | -| #980 | Expose explicit duplicate conflicts | squad:basher | API contract work with endpoint-specific validation logic | -| #884 | Review AutoData usage | squad:yen | Testing infrastructure cleanup; improves fixture maintainability | -| #885 | Review integration tests | squad:yen | Testing infrastructure validation; checks AppHost collection usage | - -#### Epic Held in Backlog - -| Issue | Title | Reason | -|-------|-------|--------| -| #887 | Review update/insert API operations | Epic coordination work. Sub-issues assigned individually (977–980). Untagged until sub-issues complete. | - -#### Ordering (Basher Sequence) - -1. **#977** (set-like dedupe) — Required before #978 and #979 -2. **#978** (canonical dedupe) — Builds on #977 patterns -3. **#979** (schema constraints) — Depends on #977/#978 completing -4. **#980** (explicit conflicts) — Final step; API contracts - -Yen can work on #884 and #885 in parallel. - -#### Labels Created - -- `squad` — Issue is in Squad backlog -- `squad:copilot` — Assigned to Copilot (coding agent) -- `squad:basher` — Assigned to Basher (Backend Dev) -- `squad:yen` — Assigned to Yen (Tester) - ---- - -## Governance - -- All meaningful changes require team consensus -- Document architectural decisions here -- Keep history focused on work, decisions focused on direction diff --git a/.squad/decisions/inbox/basher-issue-977.md b/.squad/decisions/inbox/basher-issue-977.md deleted file mode 100644 index 1f6677fc..00000000 --- a/.squad/decisions/inbox/basher-issue-977.md +++ /dev/null @@ -1,6 +0,0 @@ -# Basher decision — issue #977 - -- Date: 2026-05-03T21:56:25.759+01:00 -- Decision: Treat exact duplicate entries on set-like backend writes as idempotent in both service and repository layers. -- Scope: `POST /api/ingredient`, `POST /api/recipe`, and `PUT /api/recipe/{recipeId}`. -- Rationale: Normalizing duplicate-equivalent payload items before persistence keeps existing success responses unchanged and prevents duplicate insert attempts against composite-key child/link tables. Conflicting duplicates remain out of scope here and stay available for explicit validation work in issue #980. diff --git a/.squad/skills/set-like-write-dedupe/SKILL.md b/.squad/skills/set-like-write-dedupe/SKILL.md deleted file mode 100644 index 152e5e27..00000000 --- a/.squad/skills/set-like-write-dedupe/SKILL.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: "set-like-write-dedupe" -description: "Normalize exact duplicates for set-like backend writes before child or junction table persistence" -domain: "backend" -confidence: "high" -source: "earned" ---- - -## Context -Use this pattern when a Menu backend request carries a set-like collection whose duplicates add no business meaning, but the persistence layer writes child rows or junction-table links that would otherwise attempt duplicate inserts. - -## Patterns -- Normalize duplicate-equivalent request items in the service layer before calling repositories so the request becomes idempotent without changing the API contract. -- Repeat the dedupe defensively in repository write paths before creating child/link entities; repository methods should stay safe even if a future caller skips the service. -- For `RecipeIngredient` inputs, only collapse **exact** duplicates (`IngredientName`, `UnitName`, and `Amount` all match). Leave conflicting duplicates to explicit validation behavior. -- For junction-table ID collections like `UnitIds`, deduplicate by the identifier value before materializing `IngredientUnitEntity` rows. - -## Examples -```csharp -var normalizedIngredient = new NewIngredient -{ - Name = newIngredient.Name, - UnitIds = [.. newIngredient.UnitIds.Distinct()], -}; - -var ingredients = [.. ViewModelMapper.Map(newRecipe.Ingredients).Distinct()]; -``` - -## Anti-Patterns -- Deduplicating only at the database boundary and leaving service calls free to send unstable duplicate payloads downstream. -- Collapsing conflicting duplicates that should stay available for a later validation or conflict response. -- Assuming composite primary keys are enough; they block persisted duplicates but do not stop duplicate insert attempts from request payloads.