← Back to Pull requests

Improve agent documentation #3812

Closed
unknown closed this pull request without merging on Oct 01, 2026 16:39 UTC
View on GitHub
unknown unknown commented on Sep 25, 2026 00:37 UTC
Author

Description

1. Instructions that were wrong (napetrov's #3780)

  • dev/bazel/AGENTS.md (+47/−96): replaced the bare cc_library/cc_test and copts examples with the macros the repo actually uses: dal_module, dal_test_suite, daal_module. It also now has correct dependency labels and a note that --config must be passed. The reference target is cpp/oneapi/dal/algo/pca/BUILD.

  • dev/AGENTS.md, cpp/oneapi/AGENTS.md: replaced the unsupported bazel test //... with scoped targets using --config=host or --config=dpc. Make commands now use the real make -f makefile ... PLAT= form. The CMake recipes now build the examples against an installed release, since there is no root CMakeLists.txt.

  • Also removed or fixed, from review on this PR: the bare Bazel pattern in dev/AGENTS.md, the daal_module example that passed cpu_defines and features (the macro sets both), the Bazel version and macOS claims, TBB lines that contradicted the threading-layer rule, fake names (KMeansBatch, MAX_ITERATIONS), and snippets in cpp/daal and cpp/oneapi that didn't compile (missing =, depends_on inside the kernel, the SPMD call, a device pull without a queue).

  • examples/AGENTS.md: replaced a per-algorithm dal_example_suite target that doesn't exist with the real dal_algo_example_suite(algos = [...]) registration.

  • CONTRIBUTING.md: fixed the clang-format command (it was missing a -) and replaced the link to a root .clang-format file that doesn't exist.
  • 2. Code search (#3781)

  • .gitattributes: .i files are treated as C++, so code search finds them. The clang-format hook and CI script changes from #3781 are left to #3813.
  • 3. Rules taken from review comments

  • Root AGENTS.md: a "Rules for Changes" section covering:

  • - comments describe the merged code
    - short comments
    - one change per PR
    - search for an existing helper first
    - no unnecessary locks or guards
    - a regression test with every bug fix
    - no hardcoded versions
    - the copyright header for new files
    - ASCII only
    - POSIX sh and .bat portability
  • cpp/daal/AGENTS.md:

  • - .i files take a CpuType template parameter
    - use TArray and aligned allocation
    - no magic numbers
    - the zero-init-and-sum-back accuracy pattern
  • cpp/oneapi/AGENTS.md: the namespace vN plus using re-export pattern, used in 472 namespace v1 blocks and previously undocumented.

  • cpp/AGENTS.md: a new section on ABI and the public API.

  • New dev/make/AGENTS.md: makefiles and .mk, .bat and .sh scripts drew 61 human review threads across the last 200 PRs and had no guidance file.

  • .ci/AGENTS.md: CI-specific rules.
  • 4. Trimming

  • Root AGENTS.md: the rules and verification commands come first, within the first 4K characters. Also removed emoji headers, general C++ advice (including a smart-pointer rule that contradicts the TArray rule), the quick start, and web links.

  • cpp/AGENTS.md and dev/AGENTS.md rewritten around what the repo actually does: an interface-conventions table, a review checklist, the real train_ops_dispatcher signature, and verified Make PLAT/COMPILER/REQCPU/BACKEND_CONFIG values. Invented snippets and emoji headers are gone.

  • docs/AGENTS.md (7.9K to 1.1K) and examples/AGENTS.md (6.7K to 1.5K): cut to layout, rules and verification commands. New rules: Sphinx runs with -W, generated source/examples/ RST is not committed, and renaming an example breaks its docs references.
  • 5. Drop the Copilot instruction files

  • Removed .github/copilot-instructions.md and .github/instructions/*. Copilot code review and the coding agent both read AGENTS.md, so they only duplicated it.

  • Content not already in an AGENTS.md was merged into the nearest one. Review-critical rules (interface separation, API/ABI changes, what CI already enforces) are near the top of the root AGENTS.md, because that is the file Copilot code review is documented to read.

  • .licenserc.yaml: dropped the two exemptions for the removed files.
  • ---

    <!--
    PR should start as a draft, then move to ready for review state
    after CI is passed and all applicable checkboxes are closed.
    This approach ensures that reviewers don't spend extra time asking for regular requirements.

    You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way.
    For example, a PR with docs update doesn't require checkboxes for performance
    while a PR with any change in actual code should list checkboxes and
    justify how this code change is expected to affect performance (or justification should be self-evident).
    -->

    <details>
    <summary>Checklist:</summary>

    Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.

  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.

  • Git commit message contains an appropriate signed-off-by string _(see CONTRIBUTING.md for details)_.

  • I have resolved any merge conflicts that might occur with the base branch.
  • Testing

  • I have run it locally and tested the changes extensively.

  • All CI jobs are green or I have provided justification why they aren't.

  • I have extended testing suite if new functionality was introduced in this PR.
  • Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least a summary table with measured data, if performance change is expected.

  • I have provided justification why performance and/or quality metrics have changed or why changes are not expected.

  • I have extended the benchmarking suite and provided a corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.
  • </details>

    🤖 Generated with Claude Code

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: Vika-F Review duration: 9601m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3812"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 52% (MEDIUM) · Higher = larger blast radius
    52%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 22.5% · Safe to merge
    22.5%