Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/hooks/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Auto-install pre-push hook on clone/checkout
# This ensures that new clones do not silently skip the pre-push guard.

set -e

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null)" || exit 0
if [[ -z "$REPO_ROOT" ]] || [[ ! -f "$REPO_ROOT/scripts/install-hooks.sh" ]]; then
exit 0
fi

bash "$REPO_ROOT/scripts/install-hooks.sh"
9 changes: 8 additions & 1 deletion .github/hooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; CYAN='\033[0;36m'; RE

echo -e "${CYAN}━━━ Pre-Push Gate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${RESET}"

# ── Gate 0: Block pushes directly to main or dev ───────────────────────────
# ── Gate 0: Enforce squad branch naming (squad/{issue}-{slug}) ─────────────
CURRENT_BRANCH="$(git symbolic-ref --short HEAD 2>/dev/null || echo "")"
if [[ "$CURRENT_BRANCH" == "main" || "$CURRENT_BRANCH" == "dev" ]]; then
echo -e "${RED}❌ Direct pushes to '${CURRENT_BRANCH}' are not allowed.${RESET}"
echo -e " Create a feature branch: ${YELLOW}squad/{issue}-{slug}${RESET}"
exit 1
fi

if ! [[ "$CURRENT_BRANCH" =~ ^squad/[0-9]+-[a-z0-9-]+$ ]]; then
echo -e "${RED}❌ Branch name '${CURRENT_BRANCH}' does not match squad naming convention.${RESET}"
echo -e " Expected format: ${YELLOW}squad/{issue}-{slug}${RESET}"
echo -e " Examples: ${YELLOW}squad/42-fix-login${RESET}, ${YELLOW}squad/123-add-api-docs${RESET}"
exit 1
fi

# ── Gate 1: Warn about untracked .razor/.cs source files ───────────────────
UNTRACKED_SRC=$(git ls-files --others --exclude-standard -- '*.razor' '*.cs' 2>/dev/null)
if [[ -n "$UNTRACKED_SRC" ]]; then
Expand Down
101 changes: 101 additions & 0 deletions .squad/agents/aragorn/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,104 @@ Successfully implemented standardized copyright headers across the entire MyBlog
**PR created:** https://github.com/mpaulosky/MyBlog/pull/7

**Decision record:** `.squad/decisions/inbox/aragorn-copyright-headers.md`

## 2026-04-19 — Skills & Playbooks Adoption Review

Reviewed 19 imported skills and 3 playbooks from architecture perspective. Findings: 9 directly useful, 5 needing adaptation, 5 low-value.

**Top 3 Adoptions:**
1. Pre-Push Test Gate + Build Repair — ready to enforce immediately
2. Testcontainers Shared Fixture — reduce integration test startup 46s → 2s
3. MongoDB DBA Patterns — formalize governance, indexing, query standards

**Key Decisions:**
- Audit pre-push hook (30min) — confirm 4 gates active
- Finalize release playbook binding with Boromir (3h) — MyBlog-specific variant
- Route MongoDB work to Gimli/Sam with filter-pattern injection

**Outcome:** Decision merged to decisions.md (section 6). Ready for Phase 1 implementation (immediate).


## 2026-04-19: Sprint 1.2 Completion — Route Process Skills Into Workflow

Completed Milestone 1b (Sprint 1.2) by embedding guardrails skills into normal squad routing.

**Decision 12: Route Process Skills Into Normal Squad Workflow**

Updated `.squad/routing.md` to make guardrails explicit at every handoff:

1. **Skills Injection Rules (refined):**
- Pre-push gate: "Any push-capable work"
- Build repair: "When build/test health is red"
- PR merge playbook: "When PR review starts"
- Merged-PR guard: "Before committing to old squad branches"

2. **Workflow Guardrails (5 numbered rules):**
- Before push-ready handoff → pre-push gate + playbook
- Build/test red → build repair first (not normal feature work)
- PR work → PR merge playbook as checklist
- Old squad branch → merged-PR guard before commit
- No quarantined imports (building-protection stays excluded)

3. **Quarantine Clarity:**
- Explicitly marked `building-protection` as do-NOT-inject
- Prevents accidental reuse of Minecraft skill pending M3 disposition

**Impact:** Future coordinators now have explicit routing rules for guardrails adoption. Push-capable work, build repair, PR gates, and branch safety all automatically injected at the right moments.

**Files Modified:**
- `.squad/routing.md` — Skills section extended; Workflow Guardrails section clarified

**Timeline:** Completed as part of coordinated M1.2 effort with Pippin.

**Constraints Satisfied:**
- ✅ Roadmap review decision logged (section 8, decisions.md)
- ✅ Boromir pre-push audit completed (Sprint 1.1)
- ✅ M1.2 routing PR does not modify agent charters or inbox

**Outcome:** ✅ Routing table now fully describes post-S1.1 workflow with explicit guardrails at every step.

## 2026-04-19: Milestone 3 Roadmap Completion (Final)

**Milestone:** 3 (Adapt-or-Delete Cleanup & Roadmap Completion)
**Outcome:** ✅ Complete

Finalized all remaining roadmap decisions for Milestone 3 to enable sprint 3 cleanup execution.

### Key Achievements

1. **Release Guidance Finalized (Decision #13)**
- Confirmed MyBlog-specific release routing (skills/release-process → playbooks/release-myblog)
- Approved deletion of generic release-process-base template (replaced by repo-specific guidance)
- Clarified branch model: `dev` → `main` (no back-sync); hotfixes backport to `dev` only
- Release ownership: Aragorn scope approval → Boromir operational execution

2. **Asset Disposition Approved (Decision #14)**
- Approved deletion of post-build-validation, static-config-pattern, building-protection, release-process-base
- Confirmed microsoft-code-reference retention (rewrite queued, Boromir backlog)
- Delegated manifest publication to Pippin (DELETED-ASSETS.md)

### Cross-Team Coordination

- **Coordinated with Boromir:** Merged-branch guard decision (Decision #12) — keep guidance-only, defer automation pending incident frequency
- **Coordinated with Pippin:** Published DELETED-ASSETS.md manifest as authoritative reference for future contributors
- **Routed with Scribe:** All three decisions consolidated to decisions.md; inbox merged; agent history cross-linked

### Modified Assets

- Decision merged: Decision #13 (Release guidance fit) → `.squad/decisions.md`
- Decision merged: Decision #14 (Delete non-fit assets) → `.squad/decisions.md`
- Orchestration logged: `2026-04-19T04-04-30-aragorn-sprint-3-roadmap.md`

### Roadmap Impact

- Milestone 3 "Adapt-or-Delete" pass now complete
- Release work scope & ownership crystal clear
- Sprint 3 cleanup can proceed with full decision context
- No misleading generic guidance remains in routing layer

**Constraints Satisfied:**
- ✅ Release guidance anchored to real `dev`/`main`/`hotfix` workflow
- ✅ All imports explicitly marked adapt/delete/retain
- ✅ Decisions logged with structured rationale
- ✅ Cross-team coordination documented
145 changes: 145 additions & 0 deletions .squad/agents/boromir/history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,68 @@
## Core Context

### MyBlog DevOps & Infrastructure Patterns

**CI/CD & Workflow:**
- Pre-push hook enforces `squad/{issue}-{slug}` branch naming locally; 5 sequential validation gates (build, tests, Docker integration)
- GitHub Actions: `ci.yml` on push (main validation), `squad-test.yml` on PR (parallel test runs)
- GitVersion integration for semantic versioning with nuGetVersion stamping (preserves prerelease labels)
- `global-json-file: global.json` in all dotnet setups (avoids preview SDK conflicts)

**Hook System:**
- `.github/hooks/pre-push` is committed source of truth; local copy at `.git/hooks/pre-push` via `install-hooks.sh`
- `.github/hooks/post-checkout` auto-bootstraps pre-push guard on clone (eliminates manual setup bypass)
- `git rev-parse --git-path hooks` ensures worktree-safe installation

**Testing Infrastructure:**
- Test projects: `Architecture.Tests` (6), `Unit.Tests` (59), `Integration.Tests` (9) via xUnit
- Integration tests use Testcontainers with Docker requirement (Gate 4)
- Squad pre-push gate auto-retries transient build errors (internal CLR abort)

**Key DevOps Decisions:**
- Decision 4: CI Workflow Conventions (global.json, nuGetVersion, continue-on-error surgical use)
- Decision 7.1: Pre-push gate references CONTRIBUTING.md (canonical guide, not duplicated)
- Sprint 1.1: Hook hardening + auto-bootstrap (mandatory squad naming, elimination of bypass paths)

**Known Gotchas:**
- Existing non-squad branches fail at push (intentional; part of adoption)
- Docker must be running for Gate 4 (integration tests)
- CI/CD automation using non-squad branches needs `--no-verify` escape hatch (documented)

---

## Learnings

### 2026-04-18 — Sprint 1.1: Hook Hardening (Completed)

**Work completed:**
- Implemented strict squad/{issue}-{slug} branch naming validation in Gate 0 of `.github/hooks/pre-push`
- Created `.github/hooks/post-checkout` hook to auto-bootstrap pre-push guard on clone and checkout
- Refactored `scripts/install-hooks.sh` to install both pre-push and post-checkout hooks with safe backups and diff detection
- Validated all 5 gates pass: branch validation, untracked files check, Release build (0 warnings), unit+architecture tests (65 passing), integration tests with Docker (9 passing)
- Branch naming enforced: `squad/1001-sprint-1-1` ✅, `feature/test` ❌ correctly rejected

**Key implementation details:**
- Gate 0 regex: `^squad/[0-9]+-[a-z0-9-]+$` enforces squad workflow locally before push
- Post-checkout hook auto-triggers after `git clone` and `git checkout`, preventing silent bypass
- install-hooks.sh uses `git rev-parse --git-path hooks` for worktree-safe installation
- Clear error messages guide contributors to fix branch names or use `--no-verify` escape hatch

**Testing & verification:**
- Smoke test baseline: all 5 gates pass (pre-implementation)
- Post-implementation: all 5 gates pass with new strict branch naming
- Non-squad branches correctly rejected at push time
- Worktree and CI/CD scenarios verified safe

**Known gotchas documented:**
- Existing branches failing at push will need renaming (intentional — part of adoption)
- CI/CD automation must use `squad/*` naming or `--no-verify` flag (documented)
- Migration should be announced to team with clear guidance

**Branch & Commit:**
- Branch: `squad/1001-sprint-1-1`
- Commit: `3e672e6` — feat(devops): Sprint 1.1 — Hook Hardening
- Status: ✅ Complete, ready for PR review

### 2026-04-18 — Pre-Push Gate Implementation

**Work completed:**
Expand Down Expand Up @@ -341,3 +404,85 @@ When a feature branch is merged via PR and GitHub auto-deletes the remote, local

**Key insight:**
The same ruleset that blocked PR #13 also blocks PR #14 — this is consistent behavior. Documentation is valuable for team reference; owner action required to unblock.

## 2026-04-19 — DevOps Skills & Playbooks Review

Reviewed squad skills/playbooks from DevOps perspective. Identified 5 high-priority gaps in automation, branch validation, and PR gating.

**Week 1 Actions (4.5h):**
1. Auto-install pre-push hook via post-checkout (1h)
2. Add Docker check to Gate 0.5 (1h)
3. Enforce squad branch regex in Gate 0 (1h)
4. Update CONTRIBUTING.md with pre-push section (1h)
5. Link build-repair prompt (30min)

**Week 2–3 Actions (8h):**
1. Create PR gate automation workflow (3h)
2. Add pre-commit merged-PR guard (1h)
3. Configure GitHub branch protection rules (1h)
4. Create lightweight MyBlog release playbook with Aragorn (2h)
5. Assign or automate Ralph (Work Monitor) role (1h)

**Key Gap Closed:** Broken code reaching CI — pre-push hooks catch 90% locally before CI.

**Outcome:** Decision merged to decisions.md (section 7). High-priority roadmap ready for queue.

## 2026-04-19: Roadmap Stress-Test (Sprint 0)

Operationally validated adoption roadmap against live repo. Key findings:
- Pre-push hook exists with 5 gates; hook installer exists; contributor docs complete
- 4 of 5 Milestone 1 items already partly implemented
- Narrowed M1 scope: 5 items / ~2h (vs. original 4–5h)
- Merged-branch guard deferred to M2; routing injection simpler as quarantine list
- Revised M1 items: tighten squad branch regex (30m) + post-checkout bootstrap (30m) + merged-branch docs (15m) + workflow verify (15m) + quarantine list (15m)
- Implementation prerequisite: decide hotfix/* branch exemption

Next: Pre-push audit (Gate 1–5 smoke test) before M1 implementation

## 2026-04-19: Milestone 3 Roadmap Completion (Final)

**Milestone:** 3 (Adapt-or-Delete Cleanup & Roadmap Completion)
**Outcome:** ✅ Complete

Finalized merged-branch guard decision and coordinated secondary skills assessment publication for Milestone 3 roadmap completion.

### Key Achievements

1. **Merged-Branch Guard Finalized (Decision #12)**
- Reviewed evidence: 15 PRs merged cleanly, zero orphaned incidents (Sprints 0–2)
- Confirmed existing safeguards sufficient: playbook (Step 8), docs (CONTRIBUTING.md), routing awareness
- Decision: Keep guidance-only, defer/do-not-implement pre-commit hook automation
- Rationale: Small team, manual awareness working, no incidents justify added complexity
- Skill retained (.squad/skills/merged-pr-guard/SKILL.md) for future reference if frequency data warrants

2. **Secondary Skills Assessment Published**
- Coordinated with Aragorn on release guidance fit review
- Confirmed deletion of post-build-validation & static-config-pattern (Sprint 3)
- Queued microsoft-code-reference rewrite (Sprint 2 backlog, item #10, DevOps scope)

### Cross-Team Coordination

- **Coordinated with Aragorn:** Release guidance finalization (Decision #13) — delete release-process-base, keep MyBlog-specific routing
- **Coordinated with Aragorn:** Delete decision approval (Decision #14) — building-protection, static-config-pattern, post-build-validation, release-process-base
- **Coordinated with Pippin:** DELETED-ASSETS.md manifest publication
- **Routed with Scribe:** All decisions consolidated to decisions.md

### Modified Assets

- Decision merged: Decision #12 (Merged-branch guard) → `.squad/decisions.md`
- Decision merged: Decision #13 (Release guidance fit) → `.squad/decisions.md`
- Decision merged: Decision #14 (Delete non-fit assets) → `.squad/decisions.md`
- Orchestration logged: `2026-04-19T04-04-30-boromir-sprint-3-merged-branch.md`

### Roadmap Impact

- Closes Milestone 2 Sprint 2 backlog item #11 with evidence-based "defer automation" resolution
- Milestone 3 disposition pass confirms lightweight approach justified for small-team profile
- Skill guidance retained for future escalation if data changes
- Sprint 3 cleanup ready for execution

**Constraints Satisfied:**
- ✅ Decision evidence-based (15 PR merges, zero incidents)
- ✅ Guidance path remains active (routing + docs)
- ✅ Automation deferred, not rejected (reversible)
- ✅ Decision logs cost/benefit tradeoff for future coordinator understanding
12 changes: 12 additions & 0 deletions .squad/agents/frodo/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@
- Frontend (Legolas) validated UI correctly displays admin role in Profile and NavMenu

**Status:** ✅ Completed — Decision merged to decisions.md

## 2026-04-19 — CONTRIBUTING.md Pre-Push & PR Sections (Skills Review)

As part of DevOps skills/playbooks review, Frodo assigned to update CONTRIBUTING.md with pre-push validation gates and PR review process.

**Action:** Add two new sections to CONTRIBUTING.md (1h):
1. Pre-Push Validation Gates — link to playbook, list 5 gates, quick checklist
2. PR Review Process — link to pr-merge-process playbook, explain rejection protocol

**Collaboration:** Frodo + Pippin (CONTRIBUTING.md co-owners).

**Timeline:** Week 1 (1h estimated).
12 changes: 12 additions & 0 deletions .squad/agents/gimli/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,15 @@ Remove ALL test code related to Weather and Counter from the test projects. Thes
- Pull latest changes to avoid duplication
- Review what's been done already (via `git log`, `git show`)
- Add complementary work if needed, or verify and open PR if complete

## 2026-04-19 — Testcontainers Adoption (Skills Review)

As part of squad skills/playbooks review, testcontainers-shared-fixture pattern identified as highest-ROI optimization for integration tests.

**Scope:** Reduce startup time from ~46s (per-class) to ~2s (shared containers) via MongoDB shared fixture + xunit collection parallelization.

**Next Steps:** Map to MyBlog collections (BlogPosts, Authors, Comments, Tags, Categories); configure `xunit.runner.json` with `parallelizeAssembly: false` (collection-level only).

**Timeline:** Sprint 7 (2h estimated).

**Owner:** Gimli (Testing) — routed with `testcontainers-shared-fixture` skill.
42 changes: 42 additions & 0 deletions .squad/agents/legolas/history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Legolas — Agent History

## Core Context

### Blazor Component Architecture & Frontend Patterns (MyBlog)

**UI Component Structure:**
- **VSA (Vertical Slice Architecture):** Pages under `src/Web/Features/{feature}/{action}` (e.g., BlogPosts/Create, UserManagement)
- **Layout:** `MainLayout.razor` + `NavMenu.razor` (role-gated with `<AuthorizeView Roles="...">`)
- **Components:** `ConfirmDeleteDialog.razor`, reusable form components
- **Styling:** Bootstrap 5 (temporary); queued for Tailwind migration (Skill in .squad/skills/)
- **Auth Awareness:** Role-based navigation links, Admin-only sections

**Blazor Validation & Form Patterns:**
- EditForm with DataAnnotations validation
- Validation CSS classes: `.valid.modified`, `.invalid`, `.validation-message` (preserved through any migration)
- DateTime assertions in tests use `FluentAssertions` with tolerance windows

**Tailwind Migration (Deferred — M3):**
- Current: Bootstrap 5 via NuGet + wwwroot/lib/bootstrap/
- Blocker: Skill gaps identified (v3 vs v4 conflict, content path mismatch, AuthorizeView not preserved)
- Planned: Legolas to lead migration with corrected skill; prioritize Hamburger nav state management and role-gated visibility

**Authentication & Role Claims:**
- Auth0 integration (Frodo owns security)
- Role claims support namespace variations (e.g., `https://myblog/roles`, `https://articlesite.com/roles`)
- RoleClaimsHelper infers role claim types by namespace tail (ends with `role` or `roles`)

**Key UI Decisions:**
- Decision 1: Consolidated @using directives in _Imports.razor (reduces duplication across 9 files)
- Decision 2: Removed Counter/Weather template pages (cleaned 113 lines, improved focus)
- Decision 5: Support Auth0 role claim namespace variations (profile card + NavMenu now robust to auth branding drift)

**Testing Coverage:**
- Component smoke tests: Counter, Weather removed; remaining pages tested via RazorSmokeTests.cs
- Integration tests: ConfirmDeleteDialog, Create/Edit pages; 9 tests passing

**Known Gotchas:**
- Blazor asset fingerprinting requires `@Assets["lib/..."]` syntax (not plain href)
- NavLink `.active` class applied automatically; Tailwind has no default styling (must be added)
- Bootstrap Icons embedded as inline SVG in NavMenu.razor.css (migrate carefully to Tailwind)

---

## 2025-07-19 — Tailwind Migration Skill Review

### What I Learned
Expand Down
Loading
Loading