docs: initialize project wiki from production hardening session
12 pages covering architecture, findings, and metrics from the rotatingMachine + machineGroupControl hardening work: - Overview: node inventory, what works/doesn't, current scale - Architecture: 3D pump curves, group optimization algorithm - Findings: BEP-Gravitation proof (0.1% of optimum), NCog behavior, curve non-convexity, pump switching stability - Metrics: test counts, power comparison table, performance numbers - Knowledge graph: structured YAML with all data points and provenance - Session log: 2026-04-07 production hardening - Tools: query.py, search.sh, lint.sh Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
46
wiki/tools/lint.sh
Normal file
46
wiki/tools/lint.sh
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
# Wiki health check — find issues
|
||||
# Usage: ./wiki/tools/lint.sh
|
||||
|
||||
WIKI_DIR="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
||||
|
||||
echo "=== Wiki Health Check ==="
|
||||
echo ""
|
||||
|
||||
echo "-- Page count --"
|
||||
find "$WIKI_DIR" -name "*.md" -not -path "*/tools/*" | wc -l
|
||||
echo " total pages"
|
||||
echo ""
|
||||
|
||||
echo "-- Orphans (not linked from other pages) --"
|
||||
for f in $(find "$WIKI_DIR" -name "*.md" -not -name "index.md" -not -name "log.md" -not -name "SCHEMA.md" -not -path "*/tools/*"); do
|
||||
basename=$(basename "$f" .md)
|
||||
refs=$(grep -rl --include="*.md" "$basename" "$WIKI_DIR" 2>/dev/null | grep -v "$f" | wc -l)
|
||||
if [ "$refs" -eq 0 ]; then
|
||||
echo " ORPHAN: $f"
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
|
||||
echo "-- Status distribution --"
|
||||
for status in proven disproven evolving speculative; do
|
||||
count=$(grep -rl "status: $status" "$WIKI_DIR" --include="*.md" 2>/dev/null | wc -l)
|
||||
echo " $status: $count"
|
||||
done
|
||||
echo ""
|
||||
|
||||
echo "-- Pages missing frontmatter --"
|
||||
for f in $(find "$WIKI_DIR" -name "*.md" -not -name "SCHEMA.md" -not -path "*/tools/*"); do
|
||||
if ! head -1 "$f" | grep -q "^---"; then
|
||||
echo " NO FRONTMATTER: $f"
|
||||
fi
|
||||
done
|
||||
echo ""
|
||||
|
||||
echo "-- Index completeness --"
|
||||
indexed=$(grep -c '\[.*\](.*\.md)' "$WIKI_DIR/index.md" 2>/dev/null)
|
||||
total=$(find "$WIKI_DIR" -name "*.md" -not -name "index.md" -not -name "log.md" -not -name "SCHEMA.md" -not -path "*/tools/*" | wc -l)
|
||||
echo " Indexed: $indexed / Total: $total"
|
||||
echo ""
|
||||
|
||||
echo "=== Done ==="
|
||||
Reference in New Issue
Block a user