Skip to content

improvement: refine HertzBeat AI tool guidance - #4118

Open
bigcyy wants to merge 6 commits into
apache:masterfrom
bigcyy:codex/log-mcp
Open

improvement: refine HertzBeat AI tool guidance#4118
bigcyy wants to merge 6 commits into
apache:masterfrom
bigcyy:codex/log-mcp

Conversation

@bigcyy

@bigcyy bigcyy commented Apr 13, 2026

Copy link
Copy Markdown
Member

Summary

Simplify the HertzBeat AI system guidance, align every documented tool reference with the tools actually registered on current master, and prevent the legacy Schedule compatibility methods from being exposed to the model.

What changed

  • condensed duplicated and contradictory prompt guidance into explicit operating principles and task workflows;
  • retained confirmation, secret-handling, prompt-injection, and exact-identifier safeguards;
  • aligned monitor, metric, alert, skill, and schedule references with their current @Tool names;
  • removed @Tool exposure from the two compatibility-only Schedule methods that always return an error;
  • updated both skill README examples to use query_monitors;
  • added a regression contract that reflects the registered tool annotations and rejects stale names in the system prompt, tool descriptions, and skill examples.

Current-master repair

The branch was merged with current master. The new contract initially found one remaining ambiguous skill invocation in the shortened prompt; the wording now names executeSkill separately from its arguments.

Validation

  • 3 AiToolGuidanceContractTest cases — passed;
  • 15 focused guidance/Schedule/Skill/ToolRegistry tests — passed through the 23-module selected reactor;
  • Java 25 compilation and Checkstyle for the complete selected reactor — passed;
  • git diff apache/master --check — passed;
  • OCR rule resolution plus manual review of the prompt and excluded regression test — no remaining high- or medium-severity findings.

AI assistance: used for current-master reconciliation, regression-test drafting, and test iteration.
Human validation: verified each guided name against the runtime @Tool annotations and ran the focused Java 25 test set.
Risk notes: this changes model guidance and removes two error-only legacy tool callbacks; the underlying action services and authorization boundaries are unchanged.

@bigcyy
bigcyy marked this pull request as draft April 13, 2026 17:37
@github-actions github-actions Bot added the doc Improvements or additions to documentation label Apr 13, 2026
@zqr10159
zqr10159 marked this pull request as ready for review August 24, 2026 10:41

@zqr10159 zqr10159 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revalidated against current master. Tool names, prompt safeguards, compatibility-only Schedule exposure, skill examples, and the new annotation-backed regression contract are consistent. Focused Java 25 tests and Checkstyle passed.

@zqr10159
zqr10159 requested review from Duansg August 24, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants