validate-structure.ps1 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Validate agentMarketing directory structure (AC1 - Story 1.1)
  2. # Run from project root: .\scripts\validate-structure.ps1
  3. $requiredDirs = @(
  4. 'knowledge/livinweb',
  5. 'knowledge/livinia',
  6. 'knowledge/shared',
  7. 'knowledge/frameworks',
  8. 'knowledge/swipe-files',
  9. 'knowledge/benchmarks',
  10. 'workflows/1-weekly-brief',
  11. 'workflows/2-weekly-plan',
  12. 'workflows/3-asset-generation',
  13. 'workflows/4-performance-review',
  14. 'templates',
  15. 'outputs'
  16. )
  17. $missing = $requiredDirs | Where-Object { -not (Test-Path $_) }
  18. $kebabViolations = @()
  19. if ($missing) {
  20. Write-Error "Missing directories: $($missing -join ', ')"
  21. exit 1
  22. }
  23. # Verify kebab-case (no underscores, no PascalCase) - check directory names only
  24. $allDirs = Get-ChildItem -Path 'knowledge', 'workflows', 'templates', 'outputs' -Directory -Recurse -ErrorAction SilentlyContinue
  25. foreach ($d in $allDirs) {
  26. $name = $d.Name
  27. if ($name -match '_' -or $name -cmatch '[A-Z]') {
  28. $kebabViolations += $name
  29. }
  30. }
  31. if ($kebabViolations.Count -gt 0) {
  32. Write-Error "Kebab-case violations: $($kebabViolations -join ', ')"
  33. exit 1
  34. }
  35. Write-Host "All 12 directories exist and follow kebab-case convention."
  36. exit 0