Hive Hive
Sign in

feat(domains): evolve domains from project issue signals

GitHub issue · Closed

Metadata
Source
tuist/hive #71
Updated
Jun 24, 2026
Domains
Hive
Details

What changed

GitHub issue syncing now polls repositories connected to projects instead of only repositories reachable through existing domains. This lets a manually created project with repositories start collecting issue signals before any domains have been created.

Domain evolution now receives current projects, project links on existing domains, and project context from GitHub issues, Grafana alerts, and specs. When the evolution agent proposes a new domain, it can return project_ids, and Hive validates those project identifiers before linking the created domain back to the matching projects.

The self-hosting agents guide now describes GitHub issues and Grafana alerts as domain evolution signals, and the focused tests cover the zero-domain bootstrap case and project-aware domain creation.

Why

Projects are the durable manual boundary. Domains should be able to grow from the work signals those projects produce, without requiring operators to maintain the domain list before issue ingestion can start.

Root cause

The GitHub issue syncer previously discovered repositories by walking domains and their projects. A project with repositories but no domains was invisible to the syncer, so it could not produce the issue signals that the domain evolution job needs.

Approach

The syncer now asks Forage for repositories that belong to projects. Domain classification still uses the domains attached to a repository’s project when domains exist, while domain evolution can use project context to create and link missing domains.

The evolution fallback remains conservative: if the agent does not provide project context, Hive uses the Tuist project when present, falls back to the single available project, and skips creation when several projects exist without an explicit project choice.

Impact

Operators can keep projects manual and let domains evolve from project work signals. Existing domains, project links, and classification behavior continue to work, and there is no database migration.

Validation

  • mix format
  • mix test test/hive/forage/github_issue_syncer_test.exs test/hive/domains/evolution_test.exs test/hive/domains/evolution_worker_test.exs
  • mix compile --warnings-as-errors
Comments

No GitHub comments yet.