apollo-community-review
Run the periodic Apollo GitHub community review automation for apolloconfig/apollo, using the existing issue/pr review skills plus local helper scripts for discovery, policy, posting, and state.
Skill body
Apollo Community Review
Use this skill when running the recurring Apollo community review automation.
This skill orchestrates:
- discovery of new/newly active issue and PR threads
- structured review via $apollo-issue-review or $apollo-pr-review
- deterministic policy evaluation via
$SKILL_ROOT/scripts/community_review.py - optional auto-posting for high-confidence issue comments and PR top-level comments only
Discovery notes:
- Ignore bot-authored comments/reviews and automation-only update churn from accounts such as
stale[bot]andmergify[bot]. - Candidate scanning should only treat non-bot external activity after the lookback window as actionable.
Path notes:
- The commands below assume
SKILL_ROOTpoints to theapollo-community-reviewskill directory. - Example:
export SKILL_ROOT=/path/to/apollo-community-review
Defaults
- repo:
apolloconfig/apollo - actor: resolve in this order:
--actor→APOLLO_COMMUNITY_REVIEW_ACTOR→ currentgh authlogin - maintainers: prefer
--maintainers/repoMaintainers; otherwise fall back to the resolved actor - mirror dir:
~/.codex/tmp/apollo-review-mirror - state file: if not passed explicitly, default to
~/.codex/tmp/apollo-community-review/<actor>/state.json - default branch:
master - shared org policy:
$SKILL_ROOT/references/repo-policy.json - optional shared maintainer map:
--maintainers-file /path/to/repo-maintainers.json(see$SKILL_ROOT/references/repo-maintainers.example.json) - optional local operator override:
--operator-file /path/to/operator-config.json(see$SKILL_ROOT/references/operator-config.example.json)
Workflow
- Sync the isolated mirror:
python3 "$SKILL_ROOT/scripts/community_review.py" \ sync-mirror \ --repo apolloconfig/apollo \ --mirror-dir ~/.codex/tmp/apollo-review-mirror \ --default-branch master - Discover candidates:
- Single-repo scan (legacy / focused mode):
python3 "$SKILL_ROOT/scripts/community_review.py" \ scan \ --repo apolloconfig/apollo \ --actor <github-login> \ --maintainers <comma-separated-maintainers> \ --state-file ~/.codex/tmp/apollo-community-review/<github-login>/state.json \ --initial-lookback-hours 4If
--actoris omitted, the helper resolves it fromAPOLLO_COMMUNITY_REVIEW_ACTORor the currentgh authlogin. If--maintainersis omitted, it falls back to the resolved actor. - Org-level scan (preferred for scheduled Apollo maintenance):
python3 "$SKILL_ROOT/scripts/scan_org.py" \ --policy-file "$SKILL_ROOT/references/repo-policy.json" \ --maintainers-file /path/to/repo-maintainers.json \ --operator-file /path/to/operator-config.json \ --initial-lookback-hours 4This enumerates accessible
apolloconfigrepositories, skips archived / disabled repos, keeps the configured priority repo order first, and returns a flat candidate list plus per-repo scan results/errors. Userepo-maintainers.jsonfor the shared repo→maintainer map andoperator-config.jsononly for local actor overrides so the shared skill does not hardcode a specific maintainer identity.
- Single-repo scan (legacy / focused mode):
- For each candidate:
- Fetch thread context with
fetch-thread. - If it is a PR, also check out the PR head in the isolated mirror before reviewing:
python3 "$SKILL_ROOT/scripts/community_review.py" \ checkout-pr-head \ --repo apolloconfig/apollo \ --mirror-dir ~/.codex/tmp/apollo-review-mirror \ --number <pr_number> - Run the appropriate review skill in
output_mode=pipeline. - After the review output, append exactly one
COMMUNITY_REVIEW_DECISIONJSON block with:languagedecision_confidencerecommended_actionvalidation_completedmissing_info_fieldsblockingblocking_reasonsdraft_body
- Save the combined output to a temp file, then evaluate policy with:
python3 "$SKILL_ROOT/scripts/community_review.py" \ decide \ --candidate-file <candidate_json> \ --review-file <review_output_txt>
- Fetch thread context with
- Auto-post only when
auto_send_eligible=true.- Allowed auto-post actions:
- issue top-level comment
- PR top-level comment
- Never auto-post:
approverequest changesmerge-ready- security/admin threads
- draft PRs
- threads with a newer maintainer reply after the latest external activity
- Post via:
python3 "$SKILL_ROOT/scripts/community_review.py" \ post-comment \ --decision-file <decision_json>
- Allowed auto-post actions:
- After each handled thread, persist the processed activity signature:
python3 "$SKILL_ROOT/scripts/community_review.py" \ mark-processed \ --state-file ~/.codex/tmp/apollo-community-review/<github-login>/state.json \ --candidate-file <candidate_json> \ --decision-file <decision_json>If
--state-fileis omitted,mark-processedreuses the actor-scoped default derived from the candidate metadata. - At the end of the run, summarize all results:
python3 "$SKILL_ROOT/scripts/community_review.py" \ summarize \ --results-file <results_json>
Output Rules
- Always produce one inbox item with these sections:
Auto-sentNeeds reviewSkipped/Error
- If there is no actionable work, include
::archive-thread{}after the inbox item. - Keep the full draft body in the
Needs reviewsection. - Auto-sent comments must include the localized AI disclaimer; manual drafts must not add it automatically.
Hard Safety Rules
- Never use the current workspace remote configuration to decide which repository to query.
- Never post to GitHub outside the helper CLI flow above.
- Never auto-send a formal review state.
- If discovery, parsing, or GitHub API calls fail for a thread, route it to
Skipped/Error.