The reference agent's subject, cloud solution architecture, as an agent in the operating model agent's pattern: the Execution engine (from orchestration_engine) and one Workflow in app/solution_architecture, built for the settings and provider bundle by assembly.workflow_for. Copied from gcp_solution_architecture_agent at 8b397cd without its own engine: its role files, Skills, provider bundle, ADRs, vocabulary, scripts and evaluation datasets. The image takes the engine from a named build context and installs Terraform. It is called through the Orchestration engine, and its files are what the operating model agent digests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
72 lines
2.4 KiB
Bash
Executable File
72 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Re-vendor upstream Agent Skills from github.com/google/skills at a pinned commit.
|
|
#
|
|
# Usage: scripts/sync-vendored-skills.sh [<40-char commit sha>]
|
|
#
|
|
# Replaces skills/vendor/google/ wholesale, then rewrites SHA256SUMS and VENDOR.md.
|
|
# Never edit vendored files by hand: review the upstream diff, then re-run this script.
|
|
set -euo pipefail
|
|
|
|
REPO="google/skills"
|
|
DEFAULT_COMMIT="81a31a6e4300425598a69fd96c8e843c947ae308"
|
|
COMMIT="${1:-$DEFAULT_COMMIT}"
|
|
SKILLS=(
|
|
google-cloud-solution-architecture
|
|
google-cloud-waf-security
|
|
google-cloud-waf-reliability
|
|
google-cloud-waf-cost-optimization
|
|
google-cloud-waf-operational-excellence
|
|
google-cloud-waf-performance-optimization
|
|
google-cloud-waf-sustainability
|
|
)
|
|
|
|
if [[ ! "$COMMIT" =~ ^[0-9a-f]{40}$ ]]; then
|
|
echo "error: commit must be a full 40-character sha, got '$COMMIT'" >&2
|
|
exit 1
|
|
fi
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
DEST="$ROOT/skills/vendor/google"
|
|
TMP="$(mktemp -d)"
|
|
trap 'rm -rf "$TMP"' EXIT
|
|
|
|
echo "Fetching $REPO@$COMMIT"
|
|
curl -fsSL "https://codeload.github.com/$REPO/tar.gz/$COMMIT" | tar -xz -C "$TMP"
|
|
SRC="$TMP/skills-$COMMIT"
|
|
[[ -d "$SRC" ]] || { echo "error: unexpected archive layout in $TMP" >&2; exit 1; }
|
|
|
|
rm -rf "$DEST"
|
|
mkdir -p "$DEST"
|
|
for skill in "${SKILLS[@]}"; do
|
|
[[ -f "$SRC/skills/cloud/$skill/SKILL.md" ]] || { echo "error: $skill not found upstream" >&2; exit 1; }
|
|
cp -R "$SRC/skills/cloud/$skill" "$DEST/$skill"
|
|
done
|
|
cp "$SRC/LICENSE" "$DEST/LICENSE"
|
|
|
|
(
|
|
cd "$DEST"
|
|
find . -type f ! -name SHA256SUMS ! -name VENDOR.md | sed 's#^\./##' | LC_ALL=C sort \
|
|
| while IFS= read -r file; do sha256sum "$file"; done > SHA256SUMS
|
|
)
|
|
|
|
{
|
|
echo "# Vendored Agent Skills: google/skills"
|
|
echo
|
|
echo "Unmodified copies of upstream Agent Skills. Do not edit these files; re-run"
|
|
echo "\`scripts/sync-vendored-skills.sh <commit>\` and review the diff instead (ADR-0002)."
|
|
echo
|
|
echo "- Source: https://github.com/$REPO"
|
|
echo "- Commit: \`$COMMIT\`"
|
|
echo "- Synced: $(date -u +%Y-%m-%d)"
|
|
echo "- Licence: Apache License 2.0, see \`LICENSE\`"
|
|
echo "- Integrity: \`SHA256SUMS\` lists every vendored file; \`tests/test_vendored_skills.py\` verifies it."
|
|
echo
|
|
echo "## Skills"
|
|
echo
|
|
for skill in "${SKILLS[@]}"; do
|
|
echo "- \`$skill\` (upstream \`skills/cloud/$skill\`)"
|
|
done
|
|
} > "$DEST/VENDOR.md"
|
|
|
|
echo "Vendored ${#SKILLS[@]} skills into ${DEST#"$ROOT"/}"
|