Skip to content

feat(tooling): add Claude harness for protocol code review and development#2277

Open
nimrod-teich wants to merge 1 commit intomainfrom
feat/claude-harness-protocol-review
Open

feat(tooling): add Claude harness for protocol code review and development#2277
nimrod-teich wants to merge 1 commit intomainfrom
feat/claude-harness-protocol-review

Conversation

@nimrod-teich
Copy link
Copy Markdown
Contributor

Summary

Adds a structured Claude Code harness under .claude/ for multi-angle review and design-first development of the Lava off-chain protocol layer. Review output is a single prioritized report merged from 4 parallel specialists (architecture, security, performance, style). Development runs as an architect → implementer → tester pipeline with optional auto-triggered post-implementation review.

Scope boundary: protocol/** only. On-chain x/ Cosmos modules, app/, and consensus code are explicitly excluded by every agent's role definition and by the orchestrator scope rules.

What's included

2 orchestrator skills:

  • protocol-review — parallel fan-out (4 reviewers) → synthesis-reporter fan-in → REVIEW_REPORT.md
  • protocol-develop — pipeline (design → implement → test), with optional post-review for changes touching signing paths, lavasession, rewardserver, or >3 packages

8 agents (role definitions + methodology skills):

  • architecture-reviewer / security-reviewer / performance-reviewer / style-reviewer / synthesis-reporter
  • protocol-architect / protocol-implementer / protocol-tester

Shared references:

  • protocol-map.md — package topography for all reviewers (in scope / out of scope / hot path)
  • review-taxonomy.md — severity scale, category vocabularies, stable finding IDs (ARCH-NNN, SEC-NNN, PERF-NNN, STYLE-NNN), machine-readable JSON schema
  • report-template.md — synthesis output template with prioritized top findings + clusters + disagreements appendix

CLAUDE.md registers the harness for new sessions: agent table, skill table, execution rules, directory map, workspace layout, change log.

Notable changes

  • .gitignore — removes .claude/ (so the shared harness lives in the repo) and adds:
    • local per-developer overrides (.claude/settings.local.json, .claude/*.local.*) stay ignored
    • harness runtime artifact dirs (_workspace/, _workspace_*/, REVIEW_REPORT.md) are ignored
  • CLAUDE.md — was previously untracked; now committed with harness registration section appended to the existing project overview. Existing content (build, testing, architecture, dependencies) is preserved.

How it gets used

  • Ask "review the last 5 commits in protocol/rpcprovider/" → triggers protocol-review → spawns the 4 reviewers in parallel via Agent tool with model: opus → synthesis-reporter produces REVIEW_REPORT.md with severity counts, top findings, clusters, and fix order.
  • Ask "add per-provider circuit breaker in rpcconsumer" → triggers protocol-develop → architect produces design doc → implementer writes Go → tester adds race-clean tests → optional post-review since it touches hot-path and lavasession.
  • Follow-ups (re-review, update design, expand tests, address a finding) are first-class; finding IDs are stable across runs.

Test plan

  • git grep -l ".claude/agents" .claude/skills/ resolves cleanly (cross-refs valid)
  • head -5 .claude/agents/*.md .claude/skills/*/SKILL.md shows valid YAML frontmatter (name + description) on every file
  • find .claude -name SKILL.md -exec wc -l {} + shows all SKILL.md bodies under the 500-line progressive-disclosure budget
  • Run a review against a real small scope (e.g., protocol/rpcsmartrouter/ last 3 commits) and verify:
    • 4 reviewer files land at _workspace/01_*_findings.md
    • synthesis-reporter produces _workspace/02_synthesis_report.md + REVIEW_REPORT.md
    • Severity counts, disagreement appendix, and clusters sections render
  • Run a tiny dev flow (e.g., "rename one exported helper") and verify:
    • architect produces _workspace/01_design.md
    • implementer produces _workspace/02_implementation.md + make lint clean
    • tester produces _workspace/03_testing.md + -race clean

Follow-ups (out of scope for this PR)

  • Trigger validation (should-trigger / near-miss queries per harness testing guide)
  • Optional QA / integration-correctness agent (cross-boundary consumer↔provider contract checks)
  • Benchmarking harness entry point for perf-focused changes

🤖 Generated with Claude Code

…pment

Adds a self-contained agent team harness under .claude/ that structures
multi-angle review and design-first development for the Lava off-chain
protocol layer (rpcconsumer / rpcprovider / rpcsmartrouter / chainlib /
lavasession / relaycore / statetracker / chaintracker / provideroptimizer /
lavaprotocol / qos / metrics). Scope explicitly excludes on-chain x/
Cosmos modules.

Two orchestrator skills:
- protocol-review: 4 parallel reviewers (architecture, security,
  performance, style) fan out, then synthesis-reporter merges findings
  into a single prioritized report with deduplication, severity
  reconciliation, clustering, and effort estimates.
- protocol-develop: architect -> implementer -> tester pipeline, with
  optional auto-triggered post-implementation review for changes
  touching signing paths, lavasession, rewardserver, or >3 packages.

8 agent definitions + 8 agent-level methodology skills + 3 shared
references (protocol-map, review-taxonomy, report-template) ensure
stable finding IDs across runs, consistent severity scale, and
predictable merge output.

CLAUDE.md registers the harness (agent table, skill table, execution
rules, directory map, change log) so new sessions activate it
automatically.

Notes:
- Removes .claude/ from .gitignore so the shared harness lives in the
  repo; local per-developer overrides (.claude/settings.local.json,
  .claude/*.local.*) remain ignored.
- Adds _workspace/ (runtime artifact dir) and REVIEW_REPORT.md to
  .gitignore.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
consensus 8.96% <ø> (ø)
protocol 35.31% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
7 files   ±0   0 ❌ ±0 

Results for commit 34ca262. ± Comparison against base commit 5921aa2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant