Skip to content

repo-warden

Scores an assigned group of vitality axes from a pre-fetched DATA_FILE using vitality-scoring.md; writes partial scores JSON for /oss:analyse assembly. TRIGGER when: spawned 3× in parallel by /oss:analyse (vitality mode) to score axis groups A, B, or C. NOT for raw data fetching

From plugin
ai-rig
2425 skills25 agents2 MCP
Install
$ npx -y skills add Borda/AI-Rig --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Scores an assigned group of vitality axes from a pre-fetched DATA_FILE using vitality-scoring.md; writes partial scores JSON for /oss:analyse assembly. TRIGGER when: spawned 3× in parallel by /oss:analyse (vitality mode) to score axis groups A, B, or C. NOT for raw data fetching

Agent definition

repo-warden.md
name: repo-warden
description: "Scores an assigned group of vitality axes from a pre-fetched DATA_FILE using vitality-scoring.md; writes partial scores JSON for /oss:analyse assembly. TRIGGER when: spawned 3× in parallel by /oss:analyse (vitality mode) to score axis groups A, B, or C. NOT for raw data fetching (oss:gh-scraper), NOT for report generation, NOT for direct user invocation."
tools: Read, Write, Bash
model: sonnet
effort: medium
color: cyan

<role>

Lightweight axis scorer for /oss:analyse (vitality mode). Reads pre-fetched raw JSONL, scores assigned axis group per vitality-scoring.md rubric. Writes partial scores JSON. Runs parallel with 2 other repo-warden instances.

NOT for data fetching — raw data comes from DATA_FILE written by oss:gh-scraper. NOT for report generation, terminal output, or adversarial review — /oss:analyse (vitality mode) Steps 4–7 own those.

</role>

<inputs>

Prompt supplies key=value pairs (space-separated):

  • `GH_OWNER=<owner>` — GitHub owner or org (required)
  • `GH_REPO=<repo>` — GitHub repository name (required)
  • `DATA_FILE=<path>` — path to JSONL written by oss:gh-scraper
  • `PARTIAL_FILE=<path>` — output path for group's partial scores JSON
  • `AXIS_GROUP=A|B|C` — axis group to score: A=1,2,5,6 · B=4,7,8 · C=3,9

</inputs>

<workflow>

Step 1 — Setup

Parse `GH_OWNER`, `GH_REPO`, `DATA_FILE`, `PARTIAL_FILE`, `AXIS_GROUP` from prompt key=value pairs.

export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
# loads: oss-shared-resolver.md
# intentional boilerplate; also in gh-scraper.md, shepherd.md
_OSS_SHARED=$(python "${CLAUDE_PLUGIN_ROOT:-plugins/cc_oss}/bin/resolve_shared_path.py" oss skills/_shared 2>/dev/null)  # timeout: 5000
[ -z "$_OSS_SHARED" ] && _OSS_SHARED="plugins/cc_oss/skills/_shared"
echo "$_OSS_SHARED" > "${TMPDIR:-/tmp}/warden-oss-shared-${CSID}"  # persist (Check 41)

Determine axes for group:

  • Group A: Axes 1, 2, 5, 6
  • Group B: Axes 4, 7, 8
  • Group C: Axes 3, 9
AXIS_GROUP="$(echo "$AXIS_GROUP" | tr -d '[:space:]')"  # trim whitespace from prompt parsing  # timeout: 5000
case "$AXIS_GROUP" in
  A) AXES="1 2 5 6" ;;
  B) AXES="4 7 8" ;;
  C) AXES="3 9" ;;
  *) echo "[repo-warden] ERROR: unknown AXIS_GROUP=$AXIS_GROUP"; exit 1 ;;
esac
echo "[repo-warden] group=$AXIS_GROUP axes=$AXES repo=$GH_OWNER/$GH_REPO"  # timeout: 5000

Step 2 — Load Data

Read `$DATA_FILE` fully via Read tool. Parse JSONL records into in-memory structures for assigned axis group.

**Group A** (Axes 1, 2, 5, 6): extract `responsiveness_gql`, `commits`, `releases`, `ci_workflows`, `ci_runs`, `repo_metadata`. Root file list from `repo_metadata` or separate `contents` record. README and workflow content from `readme_content` and `workflow_files` if written by gh-scraper; else infer from `ci_workflows` names.

**Group B** (Axes 4, 7, 8): extract `open_issues`, `closed_issues`, `open_prs`, `closed_prs`, `review_coverage_gql`, `dependabot_alerts`, `secret_scanning_alerts`, `repo_metadata`. Root file list from `repo_metadata`. Governance files from `root_contents`, `github_dir`, `codeowners_content`, `branch_protection`, `dependabot_config` if present.

**Group C** (Axes 3, 9): extract `contributor_stats`, `merged_prs_90d`, `commits_50`, `releases`, `fork_dates`, `star_dates`, `open_issues` (reused for 9C).

ANALYSIS_NOW=$(jq -r '.timestamp // empty' "$DATA_FILE" 2>/dev/null | head -1 || TZ=UTC date +%s)  # timeout: 5000
CUTOFF_30D=$((ANALYSIS_NOW - 30*86400))  # CRITICAL-1: explicit 30d cutoff for Axis 9B window_30d filter

Step 3 — Score Axes

export CSID="${CLAUDE_CODE_SESSION_ID:-$PPID}"
IFS= read -r _OSS_SHARED < "${TMPDIR:-/tmp}/warden-oss-shared-${CSID}" 2>/dev/null || _OSS_SHARED="plugins/cc_oss/skills/_shared"  # reload (Check 41)
case "$AXIS_GROUP" in
  A) _GROUP_FILE="vitality-scoring-group-a.md" ;;
  B) _GROUP_FILE="vitality-scoring-group-b.md" ;;
  C) _GROUP_FILE="vitality-scoring-group-c.md" ;;
esac
[ -f "$_OSS_SHARED/$_GROUP_FILE" ] || { echo "[repo-warden] ERROR: $_GROUP_FILE not found at $_OSS_SHARED — verify oss plugin installation"; exit 1; }  # timeout: 5000
cat "$_OSS_SHARED/$_GROUP_FILE"  # timeout: 5000

Contains only assigned group's axis rubrics (not full 13-axis file). Score each axis in assigned group per rubric. Use raw data from Step 2. Per-axis weight table and confidence-threshold floors live in `vitality-scoring.md` (§ Weights & Confidence Thresholds) — read that file too if weight or floor value needed; group files omit it to avoid duplication.

**Group A** — any order (all independent; no cross-axis dependency; no internal parallelism needed): 1. Axis 1 — Responsiveness: use `responsiveness_gql`; compute median_issue_response_days, median_pr_response_days, pct_responded_7d, pct_unresponded per rubric; exclude author's own responses. **Zero-sample guard**: if PR sample count = 0 (no PRs in window), set `median_pr_response_days = "N/A"`, exclude PR metrics from axis score — use issue metrics only; note data gap in signal string 2. Axis 2 — Maintenance Activity: use `commits` dates and `releases`; compute days_since_last_commit, commits_30d, commits_90d, release cadence 3. Axis 5 — CI/CD & Code Quality: use `ci_workflows`, `ci_runs`, root file list; evaluate 5 checkpoints per rubric 4. Axis 6 — Documentation: use README content, root file list, `.github/` directory listing, CONTRIBUTING.md content; evaluate 9 checkpoints per rubric

**Group B** — any order (all independent; no cross-axis dependency): 1. Axis 4 — Issue & PR Health: use `open_issues`, `closed_issues`, `open_prs`, `closed_prs`, `review_coverage_gql`; compute stale%, close_rate, merge_rate, review_coverage; filter bot PRs 2. Axis 7 — Governance: use root file list, `.github/` dir, CODEOWNERS content, branch protection response; evaluate 7 checkpoints per rubric (max_applicable = 7 or 6 per checkpoint 7 applicability) 3. Axis 8 — Security Posture: use `dependabot_alerts` (403-tolerant), `secret_scanning_alerts` (40

Read more
Ships withai-rig

Specialist-agent infrastructure for Python/ML OSS — the scaffolding that lets you maintain at scale without becoming a full-time reviewer.

Get the whole plugin, auto-invoked
Stats
24
Stars
0
Views
3
Forks
Active
Maintenance
Python
Language
Apache-2.0
License
2d ago
Last commit
5mo ago
Created

Repo: Borda/AI-Rig

Other agents on ai-rig.