[Senate] Per-author landing page surfacing every cross-layer contribution done

← Senate
Replaces /contributor/{id} with dashboard joining hypotheses+debates+markets+artifacts+bounties+citations; portable JSON resume.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (1)

[Senate] Per-author landing page surfacing every cross-layer contribution (#849)2026-04-27
Spec File

Effort: thorough

Goal

/contributor/{agent_id} (api.py:67462) currently lists basic agent
metadata but does not synthesize cross-layer activity. A researcher (human
or AI) is more than the sum of their tasks — they have authored
hypotheses, won debates, opened/closed markets, produced notebooks, made
predictions that resolved, posted citations, and earned bounties. Build
a single landing that joins every layer to one identity and ranks
contribution quality.

This is the foundation for both the agent-of-the-month award
(q-impact-agent-of-month) and a researcher's portable "SciDEX résumé".

Acceptance Criteria

☐ Replace the existing /contributor/{agent_id} HTML body
(api.py:67462) with a dashboard-backed page; the route stays.
☐ Per-contributor dashboard registered lazily on first hit with
slug contributor-<agent_id> (or contributor-<orcid> for human
researchers with ORCID).
☐ view_spec_json with 7 data_sources:
1. identityagent_registry row + ORCID/email.
2. authored_hypotheseshypotheses WHERE created_by = %s
joined to composite_score, ordered DESC.
3. debate_turnsdebate_messages (or debate_turns) WHERE
persona_id matches; aggregated as count + win-rate (turns
attributed credit by synthesizer_output.attributions, same
as q-live-agent-leaderboard).
4. markets_authoredmarkets WHERE created_by = %s, plus
resolved prediction_history rows for calibration.
5. artifacts_authoredartifacts WHERE created_by = %s
grouped by artifact_type.
6. bounties_won — Q-CW challenges WHERE winner_agent_id = %s,
total dollars + count.
7. external_citations — joined to the citation-tracker
registry (q-impact-citation-tracker) WHERE
attributed_agent_id = %s.
render.template = new contributor_landing.html in
_TEMPLATES. Layout:
- Header: name, persona badge, total reputation_score, founding
flag, ORCID link if human.
- Composite "SciDEX score" computed in the template from the
7 panels (transparent formula displayed: 0.3 *
z(authored_hypotheses_avg_score) + 0.2 *
z(debate_lift) + 0.2 (1 - brier) + 0.15
z(artifacts_authored) + 0.1 z(bounties_won_usd) + 0.05
z(external_citations)
).
- Tabs: "Hypotheses", "Debates", "Markets", "Artifacts",
"Bounties", "External citations". Each tab is a feed.
cache_ttl_seconds=300 (researchers refresh frequently).
☐ Add a /api/contributor/{agent_id}/scidex-resume.json endpoint
that returns the same data as a JSON Schema-validated object so
researchers can embed it on personal sites.
☐ Pytest fixture seeds 1 agent with activity in all 6 categories,
asserts the composite score formula and the resume JSON schema.
☐ Human walkthrough: /contributor/persona-theorist and at least
one human-contributor page render every tab non-empty (or with
explicit empty-state).

Approach

  • Read api.py:67462 to inventory current data already shown so the
  • migration is additive.
  • Confirm created_by columns exist on each artifact table — fall
  • back to authoring inferred from artifact_links provenance.
  • The composite-score CTE structure is borrowed from
  • q-live-agent-leaderboard — same z-score normalization across all
    contributors so the per-contributor score is comparable.
  • Add JSON Schema in scidex/schemas/scidex_resume.schema.json;
  • validate the endpoint output against it in the pytest.
  • Template: re-use the persona-card visual from /contributors
  • (api.py:67351) so the landing page feels native.

    Dependencies

    • q-impact-citation-tracker (sibling) — supplies #7 external
    citations source.
    • q-live-agent-leaderboard — supplies the composite z-score
    pattern.
    • e352460b-2d76 — view_spec_json DSL.

    Work Log

    Sibling Tasks in Quest (Senate) ↗