amirbena / amirbena/code-review-skill

Define Review Target schema

Open
#72 0 comments 0 reactions 0 assignees View on GitHub
area:platform-contracts contributor-owned help wanted priority:P2 type:refactor
Dominant language
Python
Stars
7
Forks
2
Avg merge
27m
Merged PRs (30d)
188

Description

## Problem
GitHub PR-mode target normalization already exists and is tested: `skills/github-pr-review/policies/repository-checkout.md` defines `NormalizedPrSource` (repo_url/pr_number/base_ref/base_sha/head_ref/head_sha/pull_ref), implemented in `tests/reference/review/pr_checkout.py` and exercised by `tests/integration/github/test_pr_checkout.py`. The local-mode equivalent does not exist: `skills/local-code-review/policies/repository-state.md` only has prose categories (Committed/Staged/Unstaged/Tracked/Untracked) with no structured, validated schema object.

## Goal
A canonical structured representation of the local review target, compatible with the existing shared Review Target concept and the local semantics already defined in `repository-state.md`.

## Scope
- Structured target type covering committed/staged/unstaged/untracked local target state, matching the existing prose categories exactly (no new semantics).
- Compatible with the shared Review Target concept `NormalizedPrSource` already establishes for PR mode.
- Focused tests for valid and invalid local target representations.

## Non-goals
- Any redesign or re-implementation of GitHub PR target handling (`NormalizedPrSource` stays as-is).
- Context and evidence schemas (see #73, #74).

## Acceptance criteria
- [ ] A structured local target schema/type exists, mirroring `repository-state.md`'s categories.
- [ ] Example valid local targets validate; invalid ones are rejected.
- [ ] Tests cover both valid and invalid local target representations.

## Dependencies
Blocks #76 (cross-Skill contract tests need a structured local target to test against).

## Validation
- Focused unit tests for valid/invalid local target representations.

Contributor guide

Open the contributing guide

Research direction

Start with skills/local-code-review/policies/repository-state.md and compare its local categories with NormalizedPrSource in tests/reference/review/pr_checkout.py. Review tests/integration/github/test_pr_checkout.py for the existing validation and testing approach, then add focused coverage for valid and invalid local target representations. Done means the committed, staged, unstaged, and untracked categories have a structured schema and passing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.