Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .agents/skills/rpce-contribution-check/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
---
name: rpce-contribution-check
description: Validate RepoPrompt CE contributions before committing or pushing. Use whenever an agent is about to create a commit, push the current branch, rewrite history, delete a branch or fork, or change GitHub-visible repository state. Enforces staged-index and outgoing-range secret scanning, repository guardrails, relevant coordinated validation lanes, clean push boundaries, and explicit approval for destructive Git or visible live-app operations.
description: Validate RepoPrompt CE contributions before committing or pushing, and guide a brief final cleanup before opening or updating a pull request. Use whenever an agent is about to create a commit, publish contribution work, push the current branch, rewrite history, delete a branch or fork, or change GitHub-visible repository state. Guides a final scope and test-value pass, then enforces staged-index and outgoing-range secret scanning, repository guardrails, relevant coordinated validation lanes, clean push boundaries, and explicit approval for destructive Git or visible live-app operations.
---

# RepoPrompt CE Contribution Check

Run the repository-local preflight before every commit and push. Read `AGENTS.md` first and use daemon-coordinated validation where available.

## Final cleanup pass

Once implementation is substantially complete, review the complete branch diff against its intended base plus any uncommitted changes. Treat this as a judgment pass, not a line-count target or an invitation to refactor unrelated code.

- Confirm every changed file supports the requested behavior, necessary validation, or durable documentation.
- Remove abandoned approaches, temporary diagnostics, redundant helpers, speculative abstractions, accidental public/configuration surface, and incidental formatting or refactors.
- If tests, diagnostics, or smoke coverage changed, read [`../rpce-test-quality/SKILL.md`](../rpce-test-quality/SKILL.md). Keep distinct coverage for meaningful current contracts; remove exploratory, duplicate, source-shape, no-crash, report-only, or otherwise low-signal checks.
- Defer unrelated cleanup to separate work. Keep support code and tests that are justified by the target change.

Aim to minimize maintenance surface and scope, not raw diff size. Perform this pass once near the end and repeat only if later changes materially alter the diff.

## Before committing

1. Review `git status --short` and inspect the intended diff.
Expand Down
4 changes: 2 additions & 2 deletions .agents/skills/rpce-contribution-check/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface:
display_name: "RepoPrompt CE Contribution Check"
short_description: "Validate RepoPrompt CE changes before commit or push"
default_prompt: "Use $rpce-contribution-check to validate this RepoPrompt CE contribution before committing or pushing."
short_description: "Clean up and validate focused RepoPrompt CE changes"
default_prompt: "Use $rpce-contribution-check to validate this RepoPrompt CE contribution and, before opening or updating its PR, briefly clean up the complete branch diff."
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ push_success() {
cat <<'EOF'
Scripted push checks passed.
Before opening or updating a PR, do one judgment-based cleanup pass over the complete branch diff: remove abandoned scaffolding, incidental scope, and tests that do not protect a meaningful current contract. Minimize maintenance surface, not line count; keep justified support code and valuable coverage.
Any validation-matrix evidence is still required before push; read `.agents/skills/rpce-contribution-check/references/validation-matrix.md`.
Push mode validated only the current branch against the computed range above. It does not validate tags, `--all`, `--mirror`, or arbitrary refspecs.
EOF
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Before every commit or push, read and run the repository-local `$rpce-contributi
.agents/skills/rpce-contribution-check/scripts/preflight.sh push
```

Stage only the intended changes, then use `commit` mode before creating a commit; rerun it after any staging change, including partial-staging updates. Use `push` mode after committing but before pushing the intended current branch. The skill enforces redacted staged-index and outgoing-range secret scanning, repository guardrails, clean push boundaries, and the applicable coordinated validation lanes. Obtain explicit user approval immediately before any force-push, history rewrite, branch deletion, fork deletion, credential rotation, other GitHub-visible destructive mutation, visible app launch/relaunch, or stopping a visible app.
Stage only the intended changes, then use `commit` mode before creating a commit; rerun it after any staging change, including partial-staging updates. Use `push` mode after committing but before pushing the intended current branch. Before the final commit or opening/updating a pull request, use the skill's non-blocking cleanup pass to review the complete branch diff for unnecessary surface, low-value tests, and scope drift; minimize maintenance burden rather than raw line count. The skill enforces redacted staged-index and outgoing-range secret scanning, repository guardrails, clean push boundaries, and the applicable coordinated validation lanes. Obtain explicit user approval immediately before any force-push, history rewrite, branch deletion, fork deletion, credential rotation, other GitHub-visible destructive mutation, visible app launch/relaunch, or stopping a visible app.

Local `docs/investigations/*.md` reports are intentionally left unignored so RepoPrompt tooling can read them. Do not stage or merge these local investigation artifacts unless intentionally requested.

Expand Down
Loading