Skip to content

fix(evolve-lite): tighten learn skill to only extract high-signal guidelines#122

Merged
visahak merged 3 commits intoAgentToolkit:mainfrom
vinodmut:bob-integration2
Apr 1, 2026
Merged

fix(evolve-lite): tighten learn skill to only extract high-signal guidelines#122
visahak merged 3 commits intoAgentToolkit:mainfrom
vinodmut:bob-integration2

Conversation

@vinodmut
Copy link
Copy Markdown
Contributor

@vinodmut vinodmut commented Apr 1, 2026

Narrow guideline extraction to three categories: shortcuts (reducing wasted steps), error prevention, and user corrections. Add explicit exclusion list, quality gate checklist, and enforce that zero entities is a valid output when no corrections occurred.

Also restrict entity_io.py to an allowlist of types (guideline, preference) so the LLM can no longer invent types like "observation" that store codebase facts instead of reasoning chain corrections.

For #103

Summary by CodeRabbit

  • Documentation

    • Replaced "Best Practices" with a "Quality Gate" checklist enforcing category membership, concrete behavioral impact, and specificity/actionability.
  • Changes

    • Extraction reorganized into three categories: shortcuts, error prevention, and user corrections.
    • Exactly one entity per identified category (up to 5); zero results allowed when none apply.
    • Output types constrained to guideline/preference with preference for guideline.

…delines

Narrow guideline extraction to three categories: shortcuts (reducing
wasted steps), error prevention, and user corrections. Add explicit
exclusion list, quality gate checklist, and enforce that zero entities
is a valid output when no corrections occurred.

Also restrict entity_io.py to an allowlist of types (guideline,
preference) so the LLM can no longer invent types like "observation"
that store codebase facts instead of reasoning chain corrections.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c585bdbb-588b-442d-bb79-5d9b60db3f29

📥 Commits

Reviewing files that changed from the base of the PR and between 3d16e73 and 74ce4b5.

📒 Files selected for processing (2)
  • platform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.md
  • platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py
✅ Files skipped from review due to trivial changes (1)
  • platform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py

📝 Walkthrough

Walkthrough

Reframes evolve-learn skill output from "actionable entities" to "guidelines" with a three-category model (shortcuts, error prevention, user corrections), tightens extraction and Quality Gate rules, and restricts persisted entity types to an allowlist ("guideline", "preference") with a default of "guideline".

Changes

Cohort / File(s) Summary
Skill Documentation
platform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.md
Replaced "actionable entities" goal with "guidelines". Switched selection logic to three categories: shortcuts, error prevention, user corrections. Enforced one entity per category instance (up to 5), allow zero results, and require JSON type be "guideline". Introduced a Quality Gate checklist to validate and drop entities that fail criteria.
Entity I/O Validation
platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py
Replaced regex-derived entity_type logic with an explicit allowlist {"guideline","preference"}. Default entity_type now "guideline"; non-string or non-allowlisted entity.get("type") values are coerced to "guideline". Output directory path and persisted entity["type"] limited to those allowlisted values.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • visahak
  • illeatmyhat

Poem

🐰 I hopped through docs and code today,

Trimmed the noise and cleared the way,
Shortcuts, fixes, and user cues,
One guideline per insight to use,
Now the learning burrow's tidy and gay. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main change: tightening the learn skill to extract only high-signal guidelines, which aligns with the PR's core objectives of narrowing extraction to three categories and adding quality-gate checks.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@platform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.md`:
- Line 54: The SKILL.md says the entity `type` must be "guideline" but the save
code in platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py
currently accepts both "guideline" and "preference" (see the validation around
write_entity_file/write_entity_file() call); fix the mismatch by either (A)
updating SKILL.md to document that both "guideline" and "preference" are valid,
or (B) enforcing guideline-only in the skill save path by validating the entity
`type` before calling write_entity_file() (reject or coerce non-"guideline"
types), and ensure the code path and SKILL.md remain consistent.
- Line 36: Update the ambiguous entity-count sentence in SKILL.md: replace the
phrase "Maximum 3-5 entities." in the line beginning "For each identified
shortcut, error, or user correction, create one entity." with clearer wording
such as "up to 5 entities; output 0 when none qualify." Ensure the new text
reads as a single rule (e.g., "For each identified shortcut, error, or user
correction, create one entity — up to 5 entities; output 0 when none qualify.")
so the zero-entity path is explicit.

In `@platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py`:
- Around line 265-268: entity.get("type") may be non-string/unhashable which
causes the allowlist check against _ALLOWED_TYPES to raise; update the
assignment and validation around entity_type (the variable set from
entity.get("type", "guideline") and the membership check against _ALLOWED_TYPES)
to first coerce or validate to a string (e.g., if not isinstance(entity_type,
str): entity_type = str(entity_type) or simply set entity_type =
entity.get("type", "guideline") and then if not isinstance(entity_type, str) set
entity_type = "guideline") before performing the "in _ALLOWED_TYPES" check so
unhashable types cannot raise and invalid types fallback to "guideline".
🪄 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: 79416854-a1b4-4379-aa84-9d396bf9a25b

📥 Commits

Reviewing files that changed from the base of the PR and between 6945ce1 and 3d16e73.

📒 Files selected for processing (2)
  • platform-integrations/bob/evolve-lite/skills/evolve-learn/SKILL.md
  • platform-integrations/claude/plugins/evolve-lite/lib/entity_io.py

vinodmut added 2 commits April 1, 2026 11:56
Addresses CodeRabbit review finding: Clarify entity count rule to avoid ambiguity
Add isinstance check before the allowlist membership test so
non-string or unhashable types fall back to "guideline" instead
of raising.

Addresses CodeRabbit review finding: Handle non-string type values before allowlist check
@vinodmut vinodmut requested review from illeatmyhat and visahak April 1, 2026 17:32
@visahak visahak merged commit 824e4d9 into AgentToolkit:main Apr 1, 2026
16 checks passed
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.

2 participants