Skip to content

[Chore] Melhorias nos agentes#1487

Merged
rdahis merged 2 commits intomainfrom
feat/ai_onboarding
Mar 31, 2026
Merged

[Chore] Melhorias nos agentes#1487
rdahis merged 2 commits intomainfrom
feat/ai_onboarding

Conversation

@rdahis
Copy link
Copy Markdown
Member

@rdahis rdahis commented Mar 31, 2026

  • Agente confirma com o humano ordem de tabelas e níveis de observação após criá-los.
  • Conserta nome da seção

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated onboarding agent documentation with clarified ordering guidance.
  • New Features

    • Added interactive checkpoints during the onboarding flow allowing explicit configuration of display order for observation levels and tables.
    • Enhanced verification checkpoint with new required fields to confirm ordering setup.

@rdahis rdahis self-assigned this Mar 31, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 31, 2026

📝 Walkthrough

Walkthrough

Documentation for the onboarding agent and onboarding-metadata command was updated. The agent documentation title changed to reflect its role, and two interactive ordering checkpoints were added to the onboarding-metadata command to prompt humans for explicit display ordering of observation levels and tables.

Changes

Cohort / File(s) Summary
Onboarding Agent Documentation
.claude/agents/onboarding.md
Updated title and added verification checkpoint fields for table order and OL order per table; clarified that ordering adjustments are handled within the onboarding-metadata command (steps 7–8).
Onboarding Metadata Command Documentation
.claude/commands/onboarding-metadata.md
Added two new interactive ordering checkpoints: one after creating observation levels per table (calls reorder_observation_levels), and another after creating/updating all tables (calls reorder_tables); both pause for human input before proceeding.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰 The ordering rabbit hops with glee,
New checkpoints spring forth, one, two, three,
Observation levels dance in their place,
Tables reorder at a quickened pace,
Documentation blooms—the humans shall see!

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is minimal but covers the main changes; however, it lacks the structured sections required by the template (Motivação/Contexto, Detalhes Técnicos, Testes, Riscos, Dependências, Revisadores). Expand the description to follow the template structure, including technical details about the ordering checkpoints, test validations, risk assessment, and reviewer assignments.
Title check ❓ Inconclusive The title '[Chore] Melhorias nos agentes' is vague and generic—'Melhorias' (improvements) is non-descriptive and doesn't specify what improvements were made to which agents. Replace with a more specific title that describes the actual changes, such as '[Chore] Add ordering checkpoints to onboarding agent' or '[Docs] Update onboarding agent documentation with ordering confirmations'.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ai_onboarding

Comment @coderabbitai help to get the list of available commands and usage tips.

@rdahis rdahis marked this pull request as ready for review March 31, 2026 05:25
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.claude/commands/onboarding-metadata.md (2)

71-79: Add explicit validation rules before applying OL reordering.

Please document a guard: only run reorder_observation_levels when the provided order is a complete permutation of the created OL set (no missing/extra/duplicate items), otherwise ask for correction. This prevents accidental bad ordering writes from malformed human input.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/commands/onboarding-metadata.md around lines 71 - 79, Add a
validation guard before calling reorder_observation_levels: when the human
replies with a requested order for OLs (for the prompt about "Should I set a
specific display order..."), parse the provided identifiers and verify they form
an exact permutation of the created OL set (same length, same unique IDs, no
duplicates, no missing or extra items); if the check fails, do not call
reorder_observation_levels and instead prompt the human to correct the order
(show expected IDs and the detected problems). Implement this check in the logic
that handles the human reply—compare the reply list against the created OL IDs,
return validation errors for duplicates/missing/extra, and only invoke
reorder_observation_levels(reordered_ids) when validation passes.

153-163: Require full table-order validation before calling reorder_tables.

Please add the same safeguard here: validate that the provided slug list exactly matches the registered tables for the dataset (same members, no duplicates) before reordering; if not, pause and request a corrected list.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/commands/onboarding-metadata.md around lines 153 - 163, When
handling the "Table ordering checkpoint" reply (the user response parsing code
that triggers reorder_tables), validate the user's slug list exactly matches the
registered table slugs for the dataset: fetch the canonical list of registered
slugs for dataset_slug, parse the user-provided order (support newline or
comma-separated), trim and dedupe entries, then check that the set of provided
slugs equals the set of registered slugs and that the provided list length
equals the registered count (no missing or duplicate items). Only call
reorder_tables(dataset_slug, requested_order) if that strict equality holds;
otherwise pause/ask the human for a corrected list showing the expected slugs
and explain the mismatch. Ensure this logic is added where the code currently
calls reorder_tables after receiving the human reply.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/agents/onboarding.md:
- Line 60: The note incorrectly refers to ordering being handled in
onboarding-metadata steps 7–8; update the text that mentions
`onboarding-metadata` so it points to the correct location where ordering logic
is documented (the section right after step 2 in `onboarding-metadata`) and
rephrase to say ordering is handled in onboarding-metadata immediately after
step 2 (and that you should prompt the human to adjust ordering here only if
they didn’t specify order in that section).

---

Nitpick comments:
In @.claude/commands/onboarding-metadata.md:
- Around line 71-79: Add a validation guard before calling
reorder_observation_levels: when the human replies with a requested order for
OLs (for the prompt about "Should I set a specific display order..."), parse the
provided identifiers and verify they form an exact permutation of the created OL
set (same length, same unique IDs, no duplicates, no missing or extra items); if
the check fails, do not call reorder_observation_levels and instead prompt the
human to correct the order (show expected IDs and the detected problems).
Implement this check in the logic that handles the human reply—compare the reply
list against the created OL IDs, return validation errors for
duplicates/missing/extra, and only invoke
reorder_observation_levels(reordered_ids) when validation passes.
- Around line 153-163: When handling the "Table ordering checkpoint" reply (the
user response parsing code that triggers reorder_tables), validate the user's
slug list exactly matches the registered table slugs for the dataset: fetch the
canonical list of registered slugs for dataset_slug, parse the user-provided
order (support newline or comma-separated), trim and dedupe entries, then check
that the set of provided slugs equals the set of registered slugs and that the
provided list length equals the registered count (no missing or duplicate
items). Only call reorder_tables(dataset_slug, requested_order) if that strict
equality holds; otherwise pause/ask the human for a corrected list showing the
expected slugs and explain the mismatch. Ensure this logic is added where the
code currently calls reorder_tables after receiving the human reply.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 62b07949-ffad-4d0c-b346-a5256051abb5

📥 Commits

Reviewing files that changed from the base of the PR and between 4322c02 and d26141f.

📒 Files selected for processing (2)
  • .claude/agents/onboarding.md
  • .claude/commands/onboarding-metadata.md

Reply "approved" to promote to prod, or describe what needs fixing.
```

Note: ordering steps are handled inside `onboarding-metadata` (steps 7–8 of that command). If the human did not specify an order during step 8, you may ask here whether they want to adjust ordering before promoting to prod.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix inaccurate step reference to ordering logic.

This line says ordering is handled in onboarding-metadata steps 7–8, but OL ordering is documented in that command right after step 2. Please update this reference to avoid operator confusion during the checkpoint flow.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/agents/onboarding.md at line 60, The note incorrectly refers to
ordering being handled in onboarding-metadata steps 7–8; update the text that
mentions `onboarding-metadata` so it points to the correct location where
ordering logic is documented (the section right after step 2 in
`onboarding-metadata`) and rephrase to say ordering is handled in
onboarding-metadata immediately after step 2 (and that you should prompt the
human to adjust ordering here only if they didn’t specify order in that
section).

@rdahis rdahis merged commit 31dde53 into main Mar 31, 2026
4 checks passed
@rdahis rdahis deleted the feat/ai_onboarding branch March 31, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant