Skip to content

Walking skeleton: GitHub repo → metrics → schema-v0 report → HTML via CLI #2

Description

@gkanitz

Parent

#1

What to build

The tracer bullet: a Go CLI that produces a real (if minimal) CodeRepute report end-to-end against one GitHub repository using a plain token. It exercises every layer thinly: a Provider interface with a GitHub adapter fetching the subject's authored PRs, a pure metrics stage computing one metric (PRs authored/merged), a versioned schema-v0 report carrying subject identity (platform, username, immutable account ID), a coverage stamp (repo list, time window, token scope), and a mandatory verification block (value: unverified for local runs), plus a minimal self-contained HTML rendering.

Authorship must be resolved via the GitHub API bound to the account ID — not git author emails — from day one. The tool must use only API metadata; it never clones the repo or reads file contents.

This slice fixes the module seams (provider / metrics / report / render / CLI) that every later slice plugs into.

Acceptance criteria

  • coderepute CLI runs against a real GitHub repo with a token and produces report.json + report.html
  • Report JSON validates against a versioned schema; validation rejects reports missing the coverage stamp or verification block
  • Activity is attributed via GitHub account ID; commits/PRs with matching email but different account are excluded
  • No code paths clone the repository or read file contents
  • metrics has table-driven unit tests; the GitHub adapter has tests against recorded HTTP fixtures (httptest); report has marshal→validate→unmarshal round-trip tests
  • Apache-2.0 LICENSE and a README stub are in place
  • A CI workflow runs the full test suite on every PR
  • Parallel-work seams are established for the follow-up wave: the report schema declares optional, empty sub-structs (collaboration, cadence, coverage, verification); ActivitySet carries its full v1 type shape (fields may be unpopulated); metrics are implemented as one file per concern registering into a metrics registry; the renderer composes per-section templates. Follow-up issues extend by adding files, not editing shared ones.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentTriage complete; ready for an agent to pick up

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions