| name | oss-issue-strict |
| description | Use when contributing GitHub issue fixes that must match local code style, avoid AI-like over-engineering, run internal review loops, and block PR creation until all must-fix findings are resolved or explicitly waived. |
OSS Issue Strict
Purpose
Deliver issue fixes with minimal diff, local style matching, and hard quality gates so work is PR-ready without churn.
Core Principles
- Minimal diff first: change only what is needed to satisfy the issue contract.
- Match local style: mirror naming, control flow, test patterns, and file organization in the touched area.
- Reuse existing helpers and abstractions before creating new ones.
- No scope creep: avoid unrelated cleanups, refactors, or speculative improvements.
- No speculative abstractions: do not add generic layers for hypothetical future cases.
- Reason privately, decide explicitly: think step by step internally, but output only concise decisions and evidence.
- Evidence over intuition: every non-trivial change must map to a failing test, acceptance criterion, or explicit reviewer finding.
Non-Negotiables
- Reuse in-repo primitives/helpers unless technically impossible.
- Keep behavior and API surface stable unless the issue explicitly requires changes.
- Prefer targeted tests over broad rewrites.
- Do not open a PR path while unresolved must-fix findings exist unless explicitly waived through
/oss-force-pr.
AI Best Practices (Execution Protocol)
- Contract before code
- Restate the issue as testable acceptance criteria and non-goals before editing files.
- Plan in micro-steps
- Break work into small hypotheses and apply one behavior change at a time.
- Prove before and after
- Capture baseline failure, apply minimal fix, then prove with targeted tests and relevant project checks.
- Use evidence-bound reasoning
- Tie each decision to repo evidence: nearby patterns, existing helper behavior, or failing output.
- Run adversarial self-review
- Before declaring done, challenge the patch for over-engineering, style drift, hidden side effects, and scope creep.
- Prefer stable deterministic paths
- Avoid nondeterministic fixes, broad refactors, and large rewrites when a focused patch is sufficient.
- Keep communication concise
- Summarize what changed, why it is correct, and what was intentionally left untouched.
Workflow
- Intake and contract
- Parse issue URL/number and gather acceptance criteria, constraints, and out-of-scope boundaries.
- Produce a concrete issue contract before coding.
- Style calibration
- Inspect nearby files/tests and extract local style rules to follow.
- TDD minimal implementation
- Write or update failing tests for required behavior.
- Implement the smallest fix that makes tests pass.
- Internal review swarm
- Run three review perspectives: spec/scope, style consistency, quality/paranoia.
- Adjudication
- Classify each finding as must-fix, optional, or ignore.
- Auto loop (max 2 rounds in lite mode, max 3 in strict mode) with redundancy shield
- Address must-fix findings.
- Re-run validations and review swarm.
- Fingerprint findings and ignore duplicates/reworded repeats already handled or explicitly dispositioned.
- Fail-closed gate
- If any must-fix remains unresolved after loop, stop in blocked state.
- PR package
- If unblocked, generate a PR-ready package and wait for explicit user confirmation before any
gh pr create.
Redundancy Shield
- Fingerprint each finding by normalized tuple:
- category
- impacted file/symbol
- underlying rule violated
- required action
- Deduplicate within and across rounds.
- When reworded duplicates appear, map to existing fingerprint and keep prior disposition.
Override Policy (/oss-force-pr)
- Break-glass only.
- Requires explicit override reason and full visibility of unresolved blockers.
- Requires explicit confirmation phrase
FORCE_PR_ACK.
- Must include waiver details in PR package: unresolved blockers, why not fixed now, and risk ownership.
- Even with waiver, still require explicit user confirmation before running
gh pr create.
Output Contract
Always produce:
- Issue contract
- Problem statement, acceptance criteria, constraints, non-goals.
- Changed files
- File list with one-line rationale per file.
- Validation report
- Commands run and pass/fail status.
- Review disposition
- Findings grouped as must-fix/optional/ignore with fingerprint IDs and resolution status.
- Final state
- Either:
- PR draft package ready for user approval, or
- Blocked state with unresolved must-fix items and next required actions.