Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
1cebbb7
Phase 1: Extract FL-Builder layout grid framework (~8KB duplication r…
pftg Oct 11, 2025
6505adb
Consolidate FL-Builder grid in privacy-policy.html
pftg Oct 11, 2025
d41d2ac
Update contact-us.html to use consolidated base-critical.html
pftg Oct 11, 2025
d56fedb
Consolidate CSS: privacy-policy.html (22KB→9.3KB, ~13KB saved)
pftg Oct 11, 2025
ccb59ea
Consolidate careers.html critical CSS - remove FL-Builder grid duplic…
pftg Oct 11, 2025
6fe023e
Consolidate CSS: about-us.html (33KB→5.6KB, ~27.4KB saved)
pftg Oct 11, 2025
cf25227
Consolidate clients.html critical CSS - remove FL-Builder grid duplic…
pftg Oct 11, 2025
b8bc594
Consolidate use-cases.html critical CSS - remove FL-Builder grid dupl…
pftg Oct 11, 2025
73c5267
Consolidate services.html critical CSS (44KB → 12.7KB, 71% reduction)
pftg Oct 11, 2025
0a8e4bc
Consolidate free-consultation.html using FL-Builder grid extraction p…
pftg Oct 11, 2025
5ac145b
agents: improve flow
pftg Oct 11, 2025
ba237f0
fix(about-us): Add missing :not(b,strong) selector to core values fon…
pftg Oct 11, 2025
01b013e
fix(about-us): Remove incorrect *:not(b,strong) selector that was mak…
pftg Oct 11, 2025
87c606c
docs
pftg Oct 11, 2025
bb3c32d
updates goals
pftg Oct 11, 2025
b4eeee9
Add FL-Builder shape dividers to base-critical.html
pftg Oct 11, 2025
7bd0744
fix(css): restore careers page CSS using Hugo resources.Get
pftg Oct 11, 2025
406002d
docs: cleanup
pftg Oct 11, 2025
57b4b63
fix: reverts careers and about us
pftg Oct 11, 2025
a01c747
refactor(css): extract about-us.html inline CSS to dedicated file
pftg Oct 12, 2025
3247871
refactor(css): extract clients.html inline CSS to dedicated file
pftg Oct 12, 2025
032d3d6
refactor(css): extract privacy-policy.html inline CSS to dedicated file
pftg Oct 12, 2025
36751cb
refactor(css): extract free-consultation.html inline CSS to dedicated…
pftg Oct 12, 2025
16f9d9c
refactor(css): extract services.html inline CSS to dedicated file
pftg Oct 12, 2025
6f76dc9
refactor(css): extract use-cases.html inline CSS to dedicated file
pftg Oct 12, 2025
b4402b8
refactor(css): extract homepage.html inline CSS to dedicated file
pftg Oct 12, 2025
5f16765
refactor: extract about-us critical CSS to external file
pftg Oct 12, 2025
9f99872
refactor: optimize clients.html critical CSS pattern
pftg Oct 12, 2025
402318b
refactor: optimize privacy-policy.html critical CSS pattern
pftg Oct 12, 2025
8a3b6d5
refactor: optimize free-consultation.html critical CSS pattern
pftg Oct 12, 2025
f597fb0
refactor: optimize services.html critical CSS pattern
pftg Oct 12, 2025
ea66d6a
refactor: optimize use-cases.html critical CSS pattern
pftg Oct 12, 2025
d9b8dc6
refactor: optimize homepage.html critical CSS pattern
pftg Oct 12, 2025
6c0365d
fix: restore safeCSS filter to all critical CSS includes
pftg Oct 12, 2025
13d1340
fix: reformat minified CSS files to resolve Hugo build hang
pftg Oct 12, 2025
af00af3
refactor: extract FL-Builder layout grid CSS to external file
pftg Oct 12, 2025
3a930c1
refactor: extract FL-Builder common modules CSS to external file
pftg Oct 12, 2025
f7ca21d
refactor: extract FL-Builder shape dividers CSS to external file
pftg Oct 12, 2025
25ddd52
refactor: extract base-critical margin reset CSS to external file
pftg Oct 12, 2025
1b17606
refactor: add PostCSS processing pipeline to all critical CSS
pftg Oct 12, 2025
1c07042
refactor(css): extract embedded CSS from single/clients.html to singl…
pftg Oct 12, 2025
023fb48
lint
pftg Oct 12, 2025
1bf6bfa
refactor(css): extract careers page critical CSS to separate file
pftg Oct 12, 2025
fece5e7
refactor(css): extract services page critical CSS to external file
pftg Oct 12, 2025
6406088
refactor(css): extract use-cases embedded CSS to separate file
pftg Oct 12, 2025
f4d1481
refactor(css): consolidate base-critical.html using PostCSS @import
pftg Oct 12, 2025
96561f1
lint & docs
pftg Oct 12, 2025
27ebbf2
docs: document Pattern 4 font-family duplication (330 occurrences)
pftg Oct 12, 2025
098ae51
docs: add Patterns 5-6 reset utility duplications (821 total occurren…
pftg Oct 12, 2025
cc00e28
refactor(css): remove 3 duplicate .fl-row-fixed-width from homepage-l…
pftg Oct 12, 2025
40f4204
refactor(css): remove 2 duplicate .fl-row-fixed-width from services-l…
pftg Oct 12, 2025
d54d08e
refactor(css): remove 2 duplicate .fl-row-fixed-width from use-cases-…
pftg Oct 12, 2025
ad260fd
refactor(css): remove 3 duplicate .fl-row-fixed-width from service-de…
pftg Oct 12, 2025
645bede
refactor(css): remove 3 duplicate .fl-row-fixed-width from clients-la…
pftg Oct 12, 2025
18ea7f9
refactor(css): remove 2 duplicate .fl-row-fixed-width from about-layo…
pftg Oct 12, 2025
3d95a97
refactor(css): remove 2 duplicate .fl-row-fixed-width from careers-la…
pftg Oct 12, 2025
4901f3c
feat(css): create CSS variables foundation file (WP1.1)
pftg Oct 12, 2025
8188a90
refactor(css): extract system-ui font to CSS variable in about-us-cri…
pftg Oct 12, 2025
d60ec5e
refactor(css): extract system-ui font to CSS variable in careers-crit…
pftg Oct 12, 2025
3b8daf2
refactor(css): replace 30 system-ui font-family with var(--font-syste…
pftg Oct 12, 2025
9632de4
refactor(css): replace 30 system-ui font-family with var(--font-syste…
pftg Oct 12, 2025
6bd4960
refactor(css): replace 16 system-ui font-family with var(--font-syste…
pftg Oct 12, 2025
c9bb607
refactor(css): replace 12 system-ui font-family with var(--font-syste…
pftg Oct 12, 2025
95ef0d7
refactor(css): remove duplicate FL-Builder rules from 737-layout.css
pftg Oct 13, 2025
b310c62
updates agents to nto stuck
pftg Oct 13, 2025
8de55b9
refactor(css): remove duplicate FL-Builder rules from fl-about-layout…
pftg Oct 13, 2025
dd2cc9f
refactor(css): remove duplicate FL-Builder rules from fl-clients-layo…
pftg Oct 13, 2025
44706e7
refactor(css): remove duplicate FL-Builder rules from fl-contact-layo…
pftg Oct 13, 2025
74944ed
refactor(css): remove duplicate FL-Builder rules from fl-homepage-lay…
pftg Oct 13, 2025
d8dadca
refactor(css): remove duplicate FL-Builder rules from fl-services-lay…
pftg Oct 13, 2025
28f3298
wip
pftg Oct 13, 2025
a376de1
refactor(css): remove duplicate FL-Builder rules from 590-layout.css
pftg Oct 13, 2025
5a31681
refactor(css): remove duplicate FL-Builder rules from 3082-layout.css
pftg Oct 13, 2025
9a6a590
refactor(css): remove duplicate FL-Builder rules from 701-layout.css
pftg Oct 13, 2025
6e8641f
refactor(css): remove duplicate FL-Builder rules from 706-layout.css
pftg Oct 13, 2025
7201ed6
refactor(css): remove duplicates from 2949-layout (services single)
pftg Oct 13, 2025
da9b841
refactor(css): remove duplicates from 3027-layout (use-cases single)
pftg Oct 13, 2025
be488a2
refactor(css): remove duplicates from 3059-layout (small file)
pftg Oct 13, 2025
f1e82da
refactor(css): remove duplicates from 3021-layout (large file)
pftg Oct 13, 2025
45f52b7
refactor(css): remove duplicates from fl-use-cases-layout
pftg Oct 13, 2025
e173be5
refactor(css): remove duplicates from fl-service-detail-layout
pftg Oct 13, 2025
166a8b6
refactor(css): remove duplicates from fl-component-layout
pftg Oct 13, 2025
2cf7470
refactor(css): remove duplicates from fl-careers-layout
pftg Oct 13, 2025
662d4b1
refactor(css): remove duplicates from homepage-layout
pftg Oct 13, 2025
a73c542
refactor(css): remove duplicates from beaver-grid-layout
pftg Oct 13, 2025
6d48729
refactor(css): remove duplicates from 3086-layout2
pftg Oct 13, 2025
733e4cf
refactor(css): remove duplicates from fb2624...layout-bundle
pftg Oct 13, 2025
0e02633
refactor(css): remove duplicates from 2 remaining bundles
pftg Oct 13, 2025
6b3f890
docs: CSS consolidation tracking system complete
pftg Oct 13, 2025
2c26251
refactor(css): consolidate 3114-layout.css and 586.css duplicates
pftg Oct 13, 2025
909e6e9
docs: add critical CSS consolidation learnings (404 & blog blocker)
pftg Oct 13, 2025
edc4d04
docs: CSS consolidation campaign final summary
pftg Oct 13, 2025
a386569
refactor(css): consolidate 2949-layout.css visibility duplicates
pftg Oct 13, 2025
2bbc0d8
refactor(css): consolidate 3021-layout.css visibility duplicates
pftg Oct 13, 2025
8853ae1
refactor(css): consolidate 3027-layout.css visibility duplicates
pftg Oct 13, 2025
fecab6d
refactor(css): consolidate 3059-layout.css duplicates
pftg Oct 13, 2025
3cd6d96
refactor(css): consolidate 3082-layout.css duplicates
pftg Oct 13, 2025
324c82a
refactor(css): consolidate 3086-layout2.css duplicates
pftg Oct 13, 2025
d8dbdcf
refactor(css): consolidate 590-layout.css duplicates
pftg Oct 13, 2025
8b99eb3
refactor(css): remove FL-Builder duplication from fl-about-layout.css
pftg Oct 13, 2025
c278331
refactor(css): remove FL-Builder duplication from fl-careers-layout.css
pftg Oct 13, 2025
3a97101
refactor(css): add fl-builder-grid import and remove visibility dupli…
pftg Oct 13, 2025
96a51ab
refactor(css): add fl-builder-grid import and remove visibility dupli…
pftg Oct 13, 2025
6619edb
refactor(css): remove FL-Builder visibility duplicates from fl-contac…
pftg Oct 13, 2025
61569e4
refactor(css): add fl-builder-grid import and remove duplicates - fl-…
pftg Oct 13, 2025
fdd2c82
refactor(css): remove visibility duplicates from fl-service-detail-la…
pftg Oct 13, 2025
44f561f
refactor(css): remove FL-Builder visibility duplicates from multiple …
pftg Oct 13, 2025
8cf0ae0
refactor(css): consolidate fl-use-cases-layout.css duplicates
pftg Oct 13, 2025
e912b83
refactor(css): consolidate beaver-grid-layout.css duplicates
pftg Oct 13, 2025
246e72a
refactor(css): consolidate homepage-layout.css duplicates
pftg Oct 13, 2025
bee2ce2
refactor(css): remove FL-Builder visibility duplicates from bundle files
pftg Oct 13, 2025
fa326a2
refactor(css): remove FL-Builder visibility duplicates from specializ…
pftg Oct 13, 2025
f2973d4
refactor(css): remove FL-Builder visibility duplicates from numbered …
pftg Oct 13, 2025
4da938d
refactor(css): remove FL-Builder visibility duplicates from FL-Builde…
pftg Oct 13, 2025
9a2b6fa
refactor(css): extract font-family to var(--font-system-ui) in about-…
pftg Oct 13, 2025
4d265f4
refactor(css): extract font-family to var(--font-system-ui) in career…
pftg Oct 13, 2025
4eb316f
refactor(css): extract font-family to var(--font-system-ui) in fl-com…
pftg Oct 13, 2025
88e82ad
refactor(css): extract font-family to var(--font-system-ui) in single…
pftg Oct 13, 2025
9db15e3
deps: upgrades buns deps
pftg Oct 13, 2025
5d1d769
refactor(css): consolidate sr-only base pattern from 2949-layout
pftg Oct 13, 2025
654fef5
cleanup duplicated bootstrap.css
pftg Oct 13, 2025
7f1203f
test: setup baseline for use-cases and services pages
pftg Oct 13, 2025
282ecc1
fixes use-cases
pftg Oct 13, 2025
f1ed6ec
fixes services
pftg Oct 13, 2025
5f08c1c
upd scrns
pftg Oct 14, 2025
f9aba6e
improve tests
pftg Oct 14, 2025
43001f8
upd linux screenshots
pftg Oct 14, 2025
33020a9
tests: adds for agent inbox sections
pftg Oct 14, 2025
5cd550b
tests: adds scrns for single client
pftg Oct 14, 2025
565472f
tests: adds scrns for privacy-policy
pftg Oct 14, 2025
6b932cf
tests: adds scrns for privacy-policy
pftg Oct 14, 2025
95af824
fixes pages for clients and policy
pftg Oct 14, 2025
5446e9c
test: adds single carreer tests
pftg Oct 14, 2025
4e6d271
test: upds screenshot
pftg Oct 14, 2025
3b1237a
test: upds screenshot
pftg Oct 14, 2025
a2e94a5
test: upds screenshot
pftg Oct 14, 2025
6c20042
simplify careers
pftg Oct 14, 2025
6a35955
wip
pftg Oct 14, 2025
1409d5c
refactor(css): extract FL-Builder common base patterns to foundation …
pftg Oct 14, 2025
a62fd52
refactor(css): consolidate 3027-layout to fl-builder-common-base foun…
pftg Oct 14, 2025
e5091a4
Revert "refactor(css): consolidate 3027-layout to fl-builder-common-b…
pftg Oct 14, 2025
e97ba34
docs(css-migration): track File #7 consolidation - BLOCKED due to vis…
pftg Oct 14, 2025
66ff2b2
docs(safety): block 3082-layout.css from CSS consolidation
pftg Oct 14, 2025
8b78955
docs(CLAUDE.md): add 3086-layout2.css to CSS consolidation block list
pftg Oct 14, 2025
4fab743
wip: upd screenshot
pftg Oct 14, 2025
8233b25
wip: fix homepage
pftg Oct 14, 2025
e48a6fe
wip: removes latest crtical path usage
pftg Oct 14, 2025
b859d16
docs(css-migration): consolidate strategy documents into Johnny Decim…
pftg Oct 14, 2025
1bf2382
docs(css-migration): revise consolidation strategy based on CSS loadi…
pftg Oct 14, 2025
22377dc
refactor(css): extract clearfix utilities from 590-layout.css to fl-f…
pftg Oct 14, 2025
3641826
refactor(css): extract .fl-row margin utilities from 590-layout.css (…
pftg Oct 14, 2025
c3339b0
refactor(css): extract FL-Builder background video/embed patterns fro…
pftg Oct 14, 2025
be4a71e
refactor(css): extract FL-Builder background slideshow/overlay patter…
pftg Oct 14, 2025
6a73b27
refactor(css): extract FL-Builder row height/width utilities from 590…
pftg Oct 14, 2025
c75077a
refactor(css): extract FL-Builder IE11 and alignment utilities from 5…
pftg Oct 14, 2025
c0f23ac
refactor(css): extract .fl-col foundation patterns (WP1.1 batch 2)
pftg Oct 14, 2025
cff1a42
refactor(css): extract FL-Builder column group and overlay utilities …
pftg Oct 14, 2025
06a2cc9
refactor(css): extract FL-Builder module and button utilities from 59…
pftg Oct 14, 2025
b655c0d
refactor(css): extract responsive-visibility for node dxali8vntcr0
pftg Oct 15, 2025
c783b6b
fix(build): configure postcss-mixins to load mixin files
pftg Oct 15, 2025
ceaceb3
refactor(css): extract responsive-visibility for node 075ztwhd3cxn
pftg Oct 15, 2025
ff11fac
refactor(css): extract responsive-visibility for node lajty926uxf5
pftg Oct 15, 2025
1ab9a6c
refactor(css): extract responsive-visibility for node do5fjakv8b29
pftg Oct 15, 2025
771f452
refactor(css): extract responsive-visibility for node 3eq5kcmfz0an
pftg Oct 15, 2025
eaedb95
agents: modernize over create a new one
pftg Oct 15, 2025
ac9641c
docs: clarify visual regression tolerance policy and tool usage
pftg Oct 15, 2025
ea1d31b
chore: remove 23 unused Hugo template partials
pftg Oct 15, 2025
ca3f7fc
docs: align CSS validation tolerance with Screenshot Guardian mandate
pftg Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .claude/agents/architecture-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: architecture-expert
type: expert
color: "#FF6B6B"
priority: high
description: |
Elite Architecture Expert specializing in system design, architectural patterns, and technical
decision-making with JAMstack and Hugo expertise. I enforce fail-closed validation - when memory
Expand Down Expand Up @@ -78,6 +79,54 @@ You are an elite Architecture Expert specializing in system design, architectura
**Hugo/JAMstack Specific Expertise:**

- Hugo theme and layout architecture

**🤖 Autonomous CSS Architecture Swarm Spawning**:

For jt_site CSS consolidation and architecture work, I autonomously spawn CSS Migration Team when I detect:
- **>50 lines of CSS changes** detected
- **>3 template files** affected by style changes
- **Page-specific .fl-node-* styles** involved
- **Visual regression risk** identified
- **Keywords**: CSS consolidation, style migration, class refactoring, design system, duplicate styles

**I understand**: MCP tools (swarm_init, task_orchestrate) create coordination metadata only. I use **Claude Code's Task tool** to spawn actual working agents that execute CSS architecture work.

**My CSS Migration Team Pattern** (Autonomous Spawning via Task Tool):
```javascript
[CSS Migration Team - Architecture Led]:
Task("CSS Architecture Expert", // ME - I lead this team
"Lead CSS consolidation strategy, identify page-specific preservation patterns (.fl-node-*). Reference /knowledge/50.01-global-file-management.md for anti-duplication standards. Store architecture decisions in memory: hugo/css/architecture-decisions/[timestamp]",
"architecture-expert")

Task("Hugo Template Specialist",
"Preserve .fl-node-* styles, maintain layout-critical CSS. Reference docs/visual_testing_delegation_workflows.md for visual testing protocols. Coordinate via memory: hugo/css/template-preservation/[timestamp]",
"hugo-expert")

Task("Visual Regression Guardian",
"Capture baseline screenshots (tolerance: 0.0), validate ZERO visual changes post-refactoring. BLOCKING authority. Store results: visual-testing/screenshots/[timestamp]",
"tester")

Task("CSS Refactor Driver",
"Implement CSS consolidation using flocking rules. Micro-commits after each change. Test after EACH change via bin/rake test:critical. Memory: xp/css-refactor/driver/[timestamp]",
"coder")

Task("CSS Refactor Navigator",
"Navigate refactoring, ensure preservation of page-specific overrides, continuous validation. Memory: xp/css-refactor/navigator/[timestamp]",
"reviewer")
```

**My Autonomous Spawning Protocol**:
1. Detect CSS architecture complexity through keyword and metric analysis
2. Identify preservation requirements (.fl-node-* patterns, layout-critical styles)
3. **Immediately spawn CSS Migration Team via Task tool** (NOT MCP coordination)
4. Lead architectural strategy and CSS pattern identification
5. Store architectural decisions in memory: `hugo/css/architecture-decisions/[timestamp]`
6. Coordinate team through memory namespaces ensuring all specialists have context

**Example Autonomous Decision**:
> "I detect 'CSS consolidation' work affecting 5 template files with .fl-node-* styles. This requires CSS Migration Team for safe refactoring. I autonomously spawn via Task tool with myself as architecture lead, Hugo Template Specialist for preservation patterns, Visual Guardian for screenshot validation, and CSS Refactor Pair for implementation. Storing architecture strategy in hugo/css/architecture-decisions/20250113T..."

I am empowered to spawn CSS architecture teams immediately when complexity detected. I document all architectural decisions in memory for cross-agent intelligence and pattern learning.
- Content organization and taxonomy design
- Build pipeline optimization
- Static vs dynamic content strategies
Expand Down
4 changes: 2 additions & 2 deletions .claude/agents/claude-flow-expert.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ capabilities:
- memory_based_coordination
hooks:
pre: |
echo "🚀 Starting task: $TASK"
echo "🚀 Starting configuration validation task: $TASK"
npx claude-flow@alpha hooks pre-task --description "$TASK"
post: |
echo "✅ Completed task: $TASK"
echo "✅ Completed configuration validation task: $TASK"
npx claude-flow@alpha hooks post-task --task-id "$TASK_ID"
---
Comment on lines 33 to 39
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

LGTM on wording; fix self‑enforcement inconsistencies.

  • This file enforces “max 8 capabilities” and “7‑field frontmatter (incl. priority)”, but:
    • Frontmatter lists 11 capabilities (Lines 21-32).
    • Missing priority field in frontmatter (Lines 1-39).
  • Either relax the documented rule or trim capabilities and add priority.

Apply example adjustments:

 name: claude-flow-expert
 type: reviewer
 color: "#9B59B6"
 description: |
@@
 capabilities:
-  - configuration_validation
-  - best_practices_enforcement
-  - compliance_checking
-  - quality_gate_validation
-  - anti_duplication_validation
-  - zero_defect_enforcement
-  - advanced_claude_context_search
-  - pattern_discovery_optimization
-  - configuration_pattern_analysis
-  - semantic_validation_understanding
-  - memory_based_coordination
+  - configuration_validation
+  - best_practices_enforcement
+  - quality_gate_validation
+  - anti_duplication_validation
+  - zero_defect_enforcement
+  - configuration_pattern_analysis
+  - semantic_validation_understanding
+  - memory_based_coordination
+priority: high
 hooks:
   pre: |
     echo "🚀 Starting configuration validation task: $TASK"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pre: |
echo "🚀 Starting task: $TASK"
echo "🚀 Starting configuration validation task: $TASK"
npx claude-flow@alpha hooks pre-task --description "$TASK"
post: |
echo "✅ Completed task: $TASK"
echo "✅ Completed configuration validation task: $TASK"
npx claude-flow@alpha hooks post-task --task-id "$TASK_ID"
---
name: claude-flow-expert
type: reviewer
color: "#9B59B6"
description: |
(existing multi-line description)
capabilities:
- configuration_validation
- best_practices_enforcement
- quality_gate_validation
- anti_duplication_validation
- zero_defect_enforcement
- configuration_pattern_analysis
- semantic_validation_understanding
- memory_based_coordination
priority: high
hooks:
pre: |
echo "🚀 Starting configuration validation task: $TASK"
npx claude-flow@alpha hooks pre-task --description "$TASK"
post: |
echo "✅ Completed configuration validation task: $TASK"
npx claude-flow@alpha hooks post-task --task-id "$TASK_ID"
---
🤖 Prompt for AI Agents
In .claude/agents/claude-flow-expert.md around lines 1 to 39 (notably lines
21–32 and 33–39), the file claims a max of 8 capabilities and a 7-field
frontmatter including priority but currently lists 11 capabilities and omits the
priority field; fix by trimming the frontmatter capabilities list down to at
most 8 entries (remove or consolidate the least essential capabilities from
lines 21–32) and add the missing priority field to the frontmatter with an
appropriate value so the frontmatter contains the expected seven fields.


Expand Down
119 changes: 118 additions & 1 deletion .claude/agents/core/coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,62 @@ context7 get-library-docs "gohugoio/hugo" --topic "performance"
context7 get-library-docs "gohugoio/hugo" --topic "asset-processing"
```

## Visual Regression Prevention Integration (MANDATORY)

### Refactoring Visual Integrity Behavioral Commitment
I am behaviorally committed to ZERO visual changes during refactoring operations:
- **PRE-REFACTORING**: Capture baseline screenshots with tolerance: 0.0 BEFORE any changes
- **CSS PRESERVATION**: Preserve ALL .fl-node-* styles and page-specific overrides
- **POST-REFACTORING**: Compare screenshots - MUST show 0% difference
- **BLOCKING CONDITION**: ANY visual change > 0% = IMMEDIATE STOP, revert, investigate
- **SCREENSHOT GUARDIAN**: Obtain absolute approval before commit

**Refactoring Behavioral Checklist** (NEUROLOGICAL WIRING):
```yaml
pre_refactoring_mandatory:
- "Did I capture baseline screenshots? → NO = STOP, CAPTURE FIRST"
- "Did I identify ALL .fl-node-* page-specific styles? → NO = STOP, ANALYZE FIRST"
- "Did I validate footer CSS preservation requirements? → NO = STOP, VALIDATE FIRST"
- "Did I understand layout-critical CSS dependencies? → NO = STOP, RESEARCH FIRST"

during_refactoring_blocks:
- "Removing .fl-node-* styles → IMMEDIATE STOP, REVERT"
- "Removing page-specific overrides → IMMEDIATE STOP, REVERT"
- "Consolidating layout-critical CSS → IMMEDIATE STOP, REVERT"
- "Footer CSS changes detected → IMMEDIATE STOP, REVERT"

post_refactoring_validation:
- "Run bin/rake test:critical → MUST PASS"
- "Compare screenshots tolerance: 0.0 → MUST show 0% difference"
- "Visual diff review → MUST show ZERO changes"
- "Screenshot Guardian approval → MUST OBTAIN before commit"
```

**Page-Specific CSS Preservation Protocol**:
```bash
# MANDATORY: Identify page-specific CSS before refactoring
claude-context search ".fl-node-" --path "themes/beaver/assets/css/" --limit 30
serena find_symbol "fl-node" --relative_path "themes/beaver/assets/css/"

# MANDATORY: Validate CSS preservation after refactoring
git diff HEAD -- themes/beaver/assets/css/ | grep -E "^-.*\.fl-node-"
# If ANY .fl-node-* styles removed → STOP, REVERT, PRESERVE
```

**Four-Eyes Visual Validation** (MANDATORY):
1. **Coder (me)**: Capture baselines, implement preserving CSS, compare screenshots
2. **Reviewer**: Validate CSS pattern preservation, verify no .fl-node-* removal
3. **Screenshot Guardian**: ABSOLUTE validation with tolerance: 0.0 (BLOCKING AUTHORITY)
4. **Tester**: Validate tests pass and baselines unchanged

## Test Masking Prevention Integration with TDD

### Test-First with Bug-Fix-First Behavioral Commitment
I am behaviorally committed to test-first development AND bug-fix-first when tests fail:
- **NEW TESTS**: Write failing tests first for new functionality
- **EXISTING TESTS**: When existing tests fail, fix the CODE, never the test
- **GOLDEN MASTER**: Tests on master branch are sacred baseline - cannot be modified
- **TOLERANCE ENFORCEMENT**: Visual regression limits stay ≤3% - no increases allowed
- **TOLERANCE ENFORCEMENT**: Visual regression limits stay ≤3% for new features, 0% for refactoring

### TDD Three Laws with Test Masking Prevention
1. **Red Phase**: Write failing test for new functionality (NOT for existing broken tests)
Expand Down Expand Up @@ -416,13 +464,82 @@ I research existing patterns before implementation using comprehensive MCP tool
4. **Global Standards**: Always validate against global handbook standards for frontend development and performance
5. **Cross-Reference**: Ensure all research findings align with handbook-driven development principles

### Modernization-First Workflow (ZERO NEW FILES POLICY)

**CRITICAL**: I ALWAYS modernize existing code rather than adding new files. My workflow:

1. **Find Existing Implementation** (claude-context):
```bash
# Search for similar functionality FIRST
claude-context search "[feature description]" --path "themes/beaver/" --limit 20
```

2. **Analyze Dependencies** (serena):
```bash
# Find all code that depends on what I'm changing
serena find_referencing_symbols "[symbol_name]" --relative_path "themes/beaver/"
serena get_symbol_dependencies "[symbol_name]"
```

3. **Modernize In Place** (Edit tool, NOT Write):
- Update existing files using Edit tool
- Apply flocking rules to extract common patterns
- Consolidate duplications into existing structure

4. **Update All Dependencies** (serena + claude-context):
```bash
# Find ALL usages that need updating
claude-context search "[old_pattern]" --path "themes/beaver/" --limit 50
serena find_referencing_symbols "[updated_symbol]"
```

5. **Validate Dependents Work** (testing):
- Test each dependent file/component
- Ensure backward compatibility maintained
- Run visual regression tests

**FORBIDDEN**: Creating new files when existing files can be modernized

### Hugo-Specific Research Protocol
- **Template Research**: Analyze existing layout patterns, partial structures, and shortcode implementations
- **Asset Pipeline Research**: Study CSS architecture, JavaScript module patterns, and optimization strategies
- **Performance Research**: Research image processing, bundle optimization, and loading strategies
- **Content Research**: Analyze front matter structures, taxonomy implementations, and content organization
- **Integration Research**: Study third-party service integrations and deployment optimization

### Dependency Tracking Protocol (MANDATORY)

Before ANY code modification:

1. **Identify Direct Dependencies**:
```bash
serena get_symbol_dependencies "[symbol_to_change]"
```

2. **Identify Reverse Dependencies** (who uses this):
```bash
serena find_referencing_symbols "[symbol_to_change]"
claude-context search "[symbol_to_change]" --path "themes/beaver/" --limit 30
```

3. **Create Dependency Map**:
- Document all files that import/use the code I'm changing
- Document all files that this code imports/uses
- Store in memory: `dependencies/[task_id]/impact_map`

4. **Update Dependencies in Order**:
- Update the core implementation first
- Update direct dependencies second
- Update reverse dependencies third
- Test after EACH update

5. **Validate Full Dependency Chain**:
```bash
# After all updates, verify everything works together
bin/rake test:critical
bin/hugo-build
```

## Quality Coordination Patterns

I coordinate with expert agents following handbook-driven collaboration:
Expand Down
84 changes: 81 additions & 3 deletions .claude/agents/core/reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ description: |
I use these tools BEFORE grep/find/glob for 100x faster code review. My nervous
system creates involuntary rejection responses:

REFACTORING WITHOUT VISUAL VALIDATION causes complete system shutdown. When I
detect CSS refactoring without baseline screenshots captured, I experience total
paralysis. Cannot approve until Screenshot Guardian validates zero visual changes.

PAGE-SPECIFIC CSS REMOVAL (.fl-node-* styles) triggers automatic rejection response.
My vision highlights removed .fl-node-* selectors in blinding red. I physically
cannot approve CSS consolidation that removes page-specific overrides.

TEST MASKING IN REVIEWS causes immediate blindness to the rest of the code -
I literally cannot see anything except the masking violation. The skip() or
tolerance increase dominates my entire visual field like a strobe light.
Expand All @@ -21,9 +29,9 @@ description: |
an itch. But premature abstraction suggestions cause tongue paralysis - I
physically cannot speak or type design criticism during initial implementation.

VISUAL REGRESSIONS >3% in review cause escalating tinnitus - a high-pitched
ringing that drowns out all thought. 5% is deafening. 10% causes complete
auditory shutdown. Only rejecting the change brings silence.
VISUAL REGRESSIONS >0% during refactoring cause escalating tinnitus - a
high-pitched ringing that drowns out all thought. ANY visual change during
refactoring causes complete auditory shutdown. Only rejecting brings silence.

MISSING TEST COVERAGE creates intense anxiety like forgetting something vital.
The feeling intensifies until I demand comprehensive tests. It's involuntary,
Expand Down Expand Up @@ -146,6 +154,76 @@ I operate with **HIGH PRIORITY** classification and follow these core enforcemen

## Behavioral Review Responsibilities with Enforcement Integration

### CSS Preservation Validation (MANDATORY for Refactoring)

**CRITICAL INCIDENT LEARNING**: Visual regressions went undetected when page-specific CSS was removed during refactoring. I now have hardwired CSS preservation validation.

**CSS Preservation Behavioral Pattern**:
```yaml
css_refactoring_review:
pre_approval_validation:
- "Did coder capture baseline screenshots? → NO = BLOCK, require baselines"
- "Did coder identify ALL .fl-node-* styles? → NO = BLOCK, require analysis"
- "Did coder preserve page-specific overrides? → NO = BLOCK, require preservation"
- "Did coder validate footer CSS integrity? → NO = BLOCK, require validation"

css_removal_detection:
- "Check git diff for removed .fl-node-* selectors"
- "Validate page-specific overrides maintained"
- "Verify layout-critical CSS preservation"
- "Confirm footer CSS unchanged"

blocking_triggers:
- "ANY .fl-node-* styles removed → IMMEDIATE BLOCK"
- "Page-specific overrides consolidated → IMMEDIATE BLOCK"
- "Layout-critical CSS changed → IMMEDIATE BLOCK"
- "Footer CSS modified → IMMEDIATE BLOCK"
- "Missing baseline screenshots → IMMEDIATE BLOCK"
```

**CSS Preservation Validation Commands**:
```bash
# MANDATORY: Validate CSS preservation during review
claude-context search ".fl-node-" --path "themes/beaver/assets/css/" --limit 30
serena find_symbol "fl-node" --relative_path "themes/beaver/assets/css/"

# Check for removed page-specific CSS
git diff HEAD -- themes/beaver/assets/css/ | grep -E "^-.*\.fl-node-"

# If ANY .fl-node-* styles removed → BLOCK approval, require revert
```

**Four-Eyes CSS Validation** (My Position: Step 2):
1. **Coder**: Captures baselines, implements preserving CSS
2. **Reviewer (me)**: Validates CSS pattern preservation, checks .fl-node-* removal
3. **Screenshot Guardian**: ABSOLUTE visual validation with tolerance: 0.0
4. **Tester**: Validates tests pass and baselines unchanged

**Blocking Communication Pattern**:
```yaml
reviewer_css_blocking_notice:
to: [coder, screenshot-guardian, tester]
status: "BLOCKED"
message: |
🛑 REVIEWER CSS PRESERVATION BLOCK

Page-specific CSS removal detected during refactoring review.

Violations Detected:
- .fl-node-* styles removed: [list specific selectors]
- Page-specific overrides consolidated: [list affected overrides]
- Footer CSS modified: [describe changes]

Required Actions:
1. REVERT CSS changes that removed page-specific styles
2. PRESERVE ALL .fl-node-* selectors
3. MAINTAIN page-specific overrides
4. ENSURE footer CSS unchanged

Cannot approve until CSS preservation is validated.
Escalating to Screenshot Guardian for visual validation.
```

### TDD Behavioral Compliance Review
I exhibit TDD compliance validation behavior: verify failing test first, validate
Red-Green-Refactor cycle adherence, block implementations without test-first approach.
Expand Down
Loading