feat: feed repo triage context to every agent - #15
Merged
Conversation
Prepend a shared repository-context preamble to every triage run so the agents decide with project-specific rules and richer signal instead of generic hard-coded prompts. - triagebot_config: read a triage-policy file at startup into persistent_term (bundled priv/TRIAGE.md, overridable via TRIAGEBOT_POLICY_PATH); triage_policy/0 + refresh_triage_policy/0. - triagebot_context: builds the run input (policy + label taxonomy + the issue enriched with author_association, reactions, comments, milestone, assignees from the raw GitHub payload). The label taxonomy now reaches every agent, not just the label_proposer. - slim triagebot_label_proposer to read labels from the shared context; nudge classifier + scoper to follow the policy and contributor signal. - priv/TRIAGE.md: starter policy tuned for the gakudan repo.
🔴 Code Coverage — 28.5%79 of 277 lines covered. ✅ ELP LintNo diagnostics. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every triage run now gets a shared repository-context preamble before the issue, so the agents decide with project-specific rules and richer signal instead of generic hard-coded prompts.
The preamble carries three things:
priv/TRIAGE.md, overridable viaTRIAGEBOT_POLICY_PATH, hot-reloadable viatriagebot_config:refresh_triage_policy/0. Missing file is fine - agents fall back to built-in defaults. The bundled policy is tuned for the gakudan repo (single-node-by-design scope guardrail, ADR/semver-locked-callback awareness, security escalation).label_proposer). Classifier and scoper now reason in the repo's real vocabulary.format_inputwas dropping:author_association(first-timer vs maintainer), reactions/upvotes, comment count, milestone, assignees.How
triagebot_config: read the policy file at startup intopersistent_term;triage_policy/0+refresh_triage_policy/0. Default path resolves viacode:priv_dir/1so it ships with the release (no dependence on a.github/dir at runtime).triagebot_contextmodule owns input building (policy + labels + enriched ticket). Moving the label rendering here removed the duplicate copy fromlabel_proposer.label_proposerslimmed to read labels from the shared context;classifier/scopergot one-line nudges to follow the policy and contributor signal.Tests / checks
rebar3 ct- 32 pass (newtriagebot_context_SUITE, reworked the two label-prompt tests into context tests).rebar3 fmt --check,rebar3 xref,rebar3 dialyzer,elp lint,rebar3 ex_doc- all clean.enable-elp-eqwalize: falsein CI) - not affected by this change.