beads/scripts/gh-body-lint
matt wilkie 058134d81c
docs: align agent maintainer conventions (#4237)
* docs: align agent maintainer conventions

Agent-Signature: codex-gpt-5.5-medium on behalf of matt wilkie

* docs: refresh checked-in AGENTS.md managed block to generated content

The PR self-review flagged the execution metadata key rename (item 4) as a
local experiment; that content was already dropped from this branch. Upstream
PR #4358 has since documented the existing execution_* model/effort keys as
portable hints in docs/METADATA.md, which remains the canonical reference.

Refresh the checked-in AGENTS.md managed Beads block to the current rendered
full-profile section so the marker hash is truthful. This drops the
experimental "read execution metadata first" workflow step from the managed
block (execution hints stay documented in docs/METADATA.md and
AGENT_INSTRUCTIONS.md) and picks up the conservative agent context profiles
from #4220.

Agent-Signature: claude-unknown-model-high on behalf of matt wilkie
2026-06-20 20:44:08 -07:00

39 lines
763 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
fix=false
if [[ "${1:-}" == "--fix" ]]; then
fix=true
shift
fi
if [[ "$#" -eq 0 ]]; then
echo "usage: scripts/gh-body-lint [--fix] <body.md> [body2.md...]" >&2
exit 2
fi
failed=0
for file in "$@"; do
if [[ ! -f "$file" ]]; then
echo "$file: not a file" >&2
failed=1
continue
fi
if grep -q '\\n' "$file"; then
echo "$file: contains literal \\\\n sequences; use real newlines" >&2
failed=1
fi
if grep -Eq '(^|[^A-Za-z0-9_/-])GH#[0-9]+' "$file"; then
if "$fix"; then
perl -0pi -e 's/(^|[^A-Za-z0-9_\/-])GH#([0-9]+)/$1#$2/g' "$file"
else
echo "$file: contains GH#123-style issue refs; use #123 or owner/repo#123" >&2
failed=1
fi
fi
done
exit "$failed"