feat(skills): improve skill descriptions and add per-profile agent guidance#10
Merged
Conversation
Contributor
Greptile SummaryThis PR improves the AI agent skill system by replacing the generic "query status, turn on/off, set properties" description with a concrete, action-oriented one derived from real property metadata, and adds per-profile Key changes:
|
| Filename | Overview |
|---|---|
| src/iotcli/skills/generator.py | Adds _build_description (action-oriented frontmatter), _PROFILE_DESCRIPTION_NOTES, and _PROFILE_PITFALLS. Two concrete property-name bugs remain: food_level (should be food_empty) in the petfeeder pitfall, and temperature/timer (should be target_temp/target_time) in the airfryer pitfall — both will mislead agents. |
| src/iotcli/skills/templates/device_skill.md.j2 | Template updated to render ## What This Skill Does as a capability bullet list and add a new ## Agent Guidance block when pitfalls are present. Conditional logic and Jinja2 syntax look correct. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Device + Profile] --> B[build_device_context]
B --> C[properties / trigger_names / actions]
C --> D[_build_description]
C --> E[_build_pitfalls]
D --> F[frontmatter description string]
E --> G[pitfalls list]
F & G --> H[Jinja2: device_skill.md.j2]
H --> I[SKILL.md frontmatter\nname / description / metadata]
H --> J[## What This Skill Does\nbullet list]
H --> K{pitfalls?}
K -- yes --> L[## Agent Guidance\nwarning bullets]
K -- no --> M[skip section]
L & J & I --> N[Written to skills/device-slug/SKILL.md]
Reviews (2): Last reviewed commit: "Update src/iotcli/skills/generator.py" | Re-trigger Greptile
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Contributor
Author
|
@greptile review |
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.
Summary
_build_description()now generates an action-oriented frontmatter description from actual properties — agents see concrete things likeset temperature (16–30 C)andset mode (COOL/HEAT/DRY/FAN/…)instead of the generic "query status, turn on/off, set properties"_PROFILE_DESCRIPTION_NOTES— short per-profile clarifications appended to the description (e.g. petfeeder: "Useset portions=Nto feed —ononly triggers one quick portion")_PROFILE_PITFALLS— per-profile lists of common agent mistakes, surfaced in a new## Agent Guidancesection in SKILL.md## What This Skill Doesis now a capability bullet list;## Agent Guidanceblock appears when pitfalls existKey example — pet feeder
Before:
After:
Plus an explicit Agent Guidance section explaining the
onvsportionspitfall.