Content Quality Auditing
Find all pages missing :description:
# Pages without :description: in the first 5 lines — SEO and build quality issue
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages -name "*.adoc" -type f \
-exec sh -c '
for f; do
if ! head -5 "$f" | grep -q ":description:"; then
echo "MISSING :description: — $f"
fi
done
' _ {} +
Find empty partial directories — scaffolded but unpopulated
# Directories created for future content but still empty
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/partials -type d -empty -print
# Also check for directories with only comment-only files
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/partials -name "*.adoc" -type f \
-exec sh -c '
for f; do
content=$(grep -v "^//" "$f" | grep -v "^$" | head -1)
if [[ -z "$content" ]]; then
echo "EMPTY CONTENT: $f"
fi
done
' _ {} +
Find pages not referenced in nav
# List all pages, then check which ones appear in nav.adoc
NAV=~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/nav.adoc
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages -name "*.adoc" -type f \
-printf '%P\n' | sort | while IFS= read -r page; do
if ! grep -qF "$page" "$NAV"; then
echo "NOT IN NAV: $page"
fi
done | head -30
Find orphaned partials — exist but not included anywhere
# Partials that no page includes
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/partials -name "*.adoc" -type f \
-printf '%f\n' | sort | while IFS= read -r partial; do
if ! grep -rl "partial\$.*${partial}" \
~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages/ >/dev/null 2>&1; then
echo "ORPHANED: $partial"
fi
done | head -30
Count pages per codex category
# How many pages in each codex sub-directory
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages/codex -mindepth 1 -maxdepth 1 -type d | \
while IFS= read -r dir; do
count=$(find "$dir" -name "*.adoc" -type f | wc -l)
printf "%4d %s\n" "$count" "$(basename "$dir")"
done | sort -rn
Find duplicate page titles — find + awk
# Extract = Title lines and flag duplicates
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages -name "*.adoc" -type f \
-exec sh -c '
for f; do
title=$(head -1 "$f")
if [[ "$title" == "= "* ]]; then
echo "${title#= }|$f"
fi
done
' _ {} + | awk -F'|' '
{ titles[$1] = titles[$1] ? titles[$1] "\n " $2 : $2; count[$1]++ }
END {
for (t in count) {
if (count[t] > 1) printf "DUPLICATE (%d): %s\n %s\n", count[t], t, titles[t]
}
}
'
Find pages larger than 200 lines — potential split candidates
# Pages exceeding 200 lines may violate one-concern-per-file (STD-001)
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages -name "*.adoc" -type f \
-exec sh -c '
for f; do
lines=$(wc -l < "$f")
if [ "$lines" -gt 200 ]; then
printf "%5d %s\n" "$lines" "$f"
fi
done
' _ {} + | sort -rn
Find recently modified pages — what changed since last commit
# Pages modified since last git commit (uncommitted work)
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages -name "*.adoc" -type f \
-newer ~/atelier/_bibliotheca/domus-captures/.git/index \
-printf '%T+ %p\n' | sort -r
# Pages modified today
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages -name "*.adoc" -type f \
-daystart -mtime 0 -printf '%T+ %p\n' | sort -r