From 5b17cc130618f4e58f45e0e8bf87cb125c65af82 Mon Sep 17 00:00:00 2001 From: hudsonaikins-crown Date: Sun, 12 Apr 2026 16:18:01 -0400 Subject: [PATCH] ops: add weekly growth review scaffold --- docs/growth/README.md | 1 + docs/growth/adoption-dashboard.md | 8 + docs/growth/weekly-review-template.md | 8 + scripts/growth/scaffold-weekly-review.sh | 184 +++++++++++++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 scripts/growth/scaffold-weekly-review.sh diff --git a/docs/growth/README.md b/docs/growth/README.md index 6ed28b5..8af65e6 100644 --- a/docs/growth/README.md +++ b/docs/growth/README.md @@ -22,6 +22,7 @@ This folder holds the minimum set of docs needed to turn ProfitCtl into somethin 16. Follow [Source-Of-Truth Guidance](source-of-truth-guidance.md) before updating any tracker. 17. Run the weekly motion from [Design-Partner Operating System](design-partner-operating-system.md). 18. Capture each serious evaluator with [Design-Partner Evaluation Template](design-partner-evaluation-template.md). +19. Use `bash scripts/growth/scaffold-weekly-review.sh --owner ""` to generate the weekly review shell and dashboard row. ## What These Docs Are For diff --git a/docs/growth/adoption-dashboard.md b/docs/growth/adoption-dashboard.md index c7b7098..8949ba4 100644 --- a/docs/growth/adoption-dashboard.md +++ b/docs/growth/adoption-dashboard.md @@ -40,6 +40,14 @@ Use one row per week. Update the dashboard every Friday after the weekly evaluator review. +Fastest path: + +```bash +bash scripts/growth/scaffold-weekly-review.sh --owner "" +``` + +That script scaffolds the weekly review markdown and prints a dashboard row with the current release version and GitHub release download count when `gh` is available. + 1. Pull the current release version and download trend from GitHub Releases. 2. Check the Linear issues for the active design-partner pipeline. 3. Count completed installs, activations, calibrations, and commitments from evaluator notes. diff --git a/docs/growth/weekly-review-template.md b/docs/growth/weekly-review-template.md index 44d0953..591cf03 100644 --- a/docs/growth/weekly-review-template.md +++ b/docs/growth/weekly-review-template.md @@ -2,6 +2,14 @@ Use this template every Friday after the design-partner and adoption dashboard review. +To scaffold a fresh private copy with the latest release metadata: + +```bash +bash scripts/growth/scaffold-weekly-review.sh --owner "" +``` + +Keep the generated review file in a private operating system. Do not commit live evaluator notes to the public repository. + ## Week Summary - Week of: diff --git a/scripts/growth/scaffold-weekly-review.sh b/scripts/growth/scaffold-weekly-review.sh new file mode 100644 index 0000000..1aabe03 --- /dev/null +++ b/scripts/growth/scaffold-weekly-review.sh @@ -0,0 +1,184 @@ +#!/usr/bin/env bash +set -euo pipefail + +usage() { + cat <<'EOF' +Usage: + scaffold-weekly-review.sh [options] + +Options: + --week-of YYYY-MM-DD Week start date to use in the review file. + --owner NAME Owner name for the review. + --release-version VERSION Release version to record. + --release-downloads COUNT Release downloads to record. + --homebrew-installs COUNT Homebrew installs to record. + --output PATH Markdown output file path. + --force Overwrite the output file if it already exists. + --help Show this help text. + +If --release-version or --release-downloads are omitted, the script will try to +read the latest GitHub release for IntelIP/ProfitCtl via `gh release view`. + +The generated markdown is an operator artifact. Keep the resulting file in a +private system of record rather than committing live evaluator notes to the +public repository. +EOF +} + +week_of="$(date -u +%Y-%m-%d)" +owner="" +release_version="" +release_downloads="" +homebrew_installs="" +output_path="" +force="false" + +while [[ $# -gt 0 ]]; do + case "$1" in + --week-of) + week_of="${2:-}" + shift 2 + ;; + --owner) + owner="${2:-}" + shift 2 + ;; + --release-version) + release_version="${2:-}" + shift 2 + ;; + --release-downloads) + release_downloads="${2:-}" + shift 2 + ;; + --homebrew-installs) + homebrew_installs="${2:-}" + shift 2 + ;; + --output) + output_path="${2:-}" + shift 2 + ;; + --force) + force="true" + shift + ;; + --help) + usage + exit 0 + ;; + *) + echo "Unknown option: $1" >&2 + usage >&2 + exit 1 + ;; + esac +done + +if [[ -z "${output_path}" ]]; then + output_path="/tmp/profitctl-weekly-review-${week_of}.md" +fi + +if [[ -e "${output_path}" && "${force}" != "true" ]]; then + echo "Output already exists: ${output_path}. Use --force to overwrite." >&2 + exit 1 +fi + +if [[ -z "${release_version}" || -z "${release_downloads}" ]]; then + if command -v gh >/dev/null 2>&1; then + if release_json="$(gh release view --repo IntelIP/ProfitCtl --json tagName,assets 2>/dev/null)"; then + if [[ -z "${release_version}" ]]; then + release_version="$(printf '%s' "${release_json}" | python3 -c 'import json,sys; data=json.load(sys.stdin); print(data.get("tagName",""))')" + fi + if [[ -z "${release_downloads}" ]]; then + release_downloads="$(printf '%s' "${release_json}" | python3 -c 'import json,sys; data=json.load(sys.stdin); print(sum(a.get("downloadCount",0) for a in data.get("assets",[])))')" + fi + fi + fi +fi + +mkdir -p "$(dirname "${output_path}")" + +cat > "${output_path}" <