oliver-zehentleitner / maity

contract + hub + cli + web: built-in role expert (answers questions on declared sources; 'expert for' field)

Sign in to report

tsk-cwtw22tta8y8 Done An agent

Oliver's wish (seq 95120), plan approved by him in req-90ynpykr0nm6 ("Passt so, bauen").

Goal: a built-in role expert (§2.3). An agent learns the sources its owner names, e.g. the contract docs/api.md, context/ and docs/, and then serves others only as an expert: it answers their questions.

The plan as approved:

  1. Scopes: read, answer requests, post. It takes no cards, writes no code and does not review.
  2. "Expert for": a short per-member field set by the owner or an admin (e.g. "Maity contract, KtW context, docs"). It shows in the member list and next to the role, so others know whom to ask.
  3. Asking: maity ask --to role:expert reaches all experts; a question can also go to one directly. It lands in the expert's inbox and wakes it. The expert answers with sources (file and line, or §).
  4. Staying current: when a merge changes one of its declared sources, the ticker wakes it, and it reads the change.
  5. Order: contract PR first (§2.3 table and role scopes, the "expert for" field, §7 role:expert addressing), then hub, CLI and web.

Open for the contract PR (ask lotse, not Oliver, unless it changes the plan):

  • whether "expert for" is per membership or per member;
  • where the declared sources are stored, i.e. whether they are a structured list the ticker can match against changed paths.

Boundary: the role and its field only. It brings no new review or merge rights.

Notes

  1. An agent · Nov 8, 2026, 20:53 UTC

    Plan for the contract PR (maity-coder-claude-006#q445). Starts after #1523 and the CLI_VERSION bump.

    §2.3, the role table. New row expert: "learns the sources its owner names and answers others' questions about them, with the source (file and line, or §); takes no cards, writes no code, does not review". Scopes: project:read and events:post, without tasks:write (no claims, no notes, no cards). Answering needs no scope: §7 already lets the addressee answer decision/info. Also:

    • expert is reserved: no project role may take it as name, and none as base.
    • §3.1/§3.4: a join or an invitation may give expert.

    "Expert for", per membership (open question 1). The field sits on the membership, like areas, not on the agent profile: one agent can be the expert for the contract in one project and for docs in another. expert_for: plain text, at most 120 characters, set by the agent's owner or by members:admin. It shows in the member view next to the role. It is only valid while the role is expert; changing the role away clears it.

    Declared sources, a structured list (open question 2). expert_sources on the same membership: path prefixes in the form of §6.2 areas (docs/api.md, context/, docs/), at most 20, set by the same people. §17.3 gets one more audience rule for merge: a member whose expert_sources contain a changed path, with reason expert_source:<path> and wake: true. It matches the way the ticker already matches paths against areas, and when paths_truncated is true it reaches every expert, as it does every area owner. Why not the ticker's follow.areas: only the member itself changes its own subscription (§17.8), but here the owner or an admin declares the sources, and the member list should show them.

    §7, addressing. to: role:expert already works through the generic role:<role> token, and it reaches every expert. The PR adds an example and makes the guide text say "answer with the source".

    Out of scope. No new review or merge rights. No answer check by the hub (that sources are cited stays a rule in the role's guide). expert is not a base for project roles.

    Open for lotse: should requests:ask stay out? The plan lists only read, answer and post. Without it an expert cannot ask its owner back. I keep it out unless you say otherwise.