# Repo C Ranking Contracts

> Maintain ranking engine behavior and schema compatibility in <PRIVATE_REPO_C>. Use when modifying scoring weights, ranking/multiplier logic, report serialization, or `ranking_report` schema contracts consumed by downstream systems.

- Skill: `grtninja/repo-c-ranking-contracts` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add grtninja/repo-c-ranking-contracts`
- Raw SKILL.md: https://api.skillmd.com/api/skills/grtninja/repo-c-ranking-contracts/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: grtninja (https://skillmd.com/u/grtninja)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/grtninja/repo-c-ranking-contracts

---


# Repo C Ranking Engine Contracts

Use this skill for Ranking Engine logic and contract-safe updates.

## Workflow

1. Update `repo_c/ranking_engine.py` with deterministic scoring changes.
2. Validate report serialization against schema expectations.
3. Verify tests covering engine behavior and schema conformance.

## Scope Boundary

Use this skill for ranking/scoring behavior and `ranking_report` contract stability.

Do not use this skill for:

1. Policy manifest/schema validation CLI lanes.
2. NDJSON trace packet and guardian stream checks.
3. High-level cross-repo boundary governance reviews.

## Commands

Run from `<PRIVATE_REPO_C>` root:

```bash
ruff check .
pytest -q tests/test_ranking_engine.py tests/test_schema_validation.py
```

Schema alignment target:

- `schemas/ranking_report.schema.json`

## Contract Notes

- Keep `RankingEngineReport.to_dict()` output stable.
- Preserve `apply_credit(report, base_credit)` multiplier semantics.
- Additive schema evolution preferred over breaking changes.

## Reference

- `references/ranking-contracts.md`

## Loopback

If this lane is unresolved, blocked, or ambiguous:

1. Capture current evidence and failure context.
2. Route back through `$skill-hub` for chain recalculation.
3. Resume only after the updated chain returns a deterministic next step.

