feat: support personal skills in chats#25366
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
/coder-agents-review |
There was a problem hiding this comment.
Well-structured integration PR. The source-aware skill resolution, collision aliasing, error sanitization, and mid-turn refresh are all cleanly implemented with thorough test coverage (1:1.76 code-to-test ratio). The userSkillContext RBAC comment is one of the better security justifications in the codebase.
Severity breakdown: 5 P3, 1 P4, 2 Nit. No blocking issues.
The strongest signal across the panel is the cross-package coupling between isSkillIndexMessage (chatd.go) and renderSkillIndex (skill.go), which 10+ reviewers flagged independently. A shared constant for the XML tags would make the dependency explicit and compiler-enforced.
Process note: workspace skill errors still leak raw err.Error() to the LLM (pre-existing), while personal skill errors are properly sanitized. This PR sets the better standard; aligning workspace errors would be a good follow-up.
"The person reading this at 2 AM knows exactly why this actor exists and what it can't do." (Leorio, on the
userSkillContextcomment)
🤖 This review was automatically generated with Coder Agents.
5acacdf to
ddcbe2a
Compare
3066778 to
b0d7678
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
All 8 R1 findings addressed cleanly. Constants for the XML tags, single-site logging, explicit error type checks, injectedSkillIndex sync, skill name in error messages, doc comments, simplified delegation, and consistent JSON nullability are all verified.
One new finding from R2: ParsePersonalSkillMarkdown failures in loadPersonalSkillBody produce no server-side log entry. The DB error path logs, the parse error path does not.
"If validation rules evolve between versions or if a migration corrupts content, the operator has no trace of the root cause." (Chopper)
🤖 This review was automatically generated with Coder Agents.
b0d7678 to
6231ffc
Compare
ddcbe2a to
83fc999
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
DEREM-12 verified fixed. All 12 prior findings are closed.
One new finding: the test helper that validates the synthesized RBAC actor only checks the actor ID, not the security-critical role.
Razor traced a pre-existing edge case worth knowing: workspace skill names are not validated against SkillNamePattern, so a workspace SKILL.md declaring name: personal/deploy could shadow a personal skill's qualified alias. The fix belongs in workspace skill discovery, not this PR.
🤖 This review was automatically generated with Coder Agents.
6231ffc to
81c22bf
Compare
83fc999 to
53e45b3
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
All 13 prior findings verified fixed. DEREM-13 (role assertion) confirmed addressed.
One new finding: the description tag on ReadSkillArgs.Name and ReadSkillFileArgs.Name says "kebab-case" but qualified aliases (personal/deploy) contain /. Models that weight schema descriptions may avoid passing qualified aliases, causing "not found" on collision scenarios.
coderd/x/chatd/chattool/skill.go:282
P3 [DEREM-14] The description tag reads "The kebab-case name of the skill to read." (same pattern at line 353 for ReadSkillFileArgs). This PR introduces collision aliases of the form personal/deploy and workspace/deploy, which contain / and are not kebab-case. The schema description now contradicts the tool's actual input contract.
The system prompt mitigates with "When a skill is listed as personal/name or workspace/name, pass that qualified alias to read_skill." But models that weight schema descriptions heavily may still avoid non-kebab-case inputs, causing "not found" on collision scenarios.
Could we update both descriptions to "The name or qualified alias of the skill to read."? (Mafuuu P3)
🤖
🤖 This review was automatically generated with Coder Agents.
81c22bf to
eb5d4a3
Compare
53e45b3 to
c3af07b
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
Review blocked. DEREM-14 (P3) has not been addressed or acknowledged.
DEREM-14 (skill.go:282,353): ReadSkillArgs.Name and ReadSkillFileArgs.Name description tags say "The kebab-case name of the skill to read" but this PR introduces qualified aliases (personal/deploy, workspace/deploy) that contain / and are not kebab-case. The schema description contradicts the tool's input contract. Models that weight schema descriptions may avoid passing qualified aliases, causing "not found" on collision scenarios. Suggested fix: update both descriptions to "The name or qualified alias of the skill to read."
Note: this finding was folded into the R4 review body because line 282 is outside the diff hunks; it may have been easy to miss.
Further review is blocked until this finding is addressed, acknowledged, or contested.
🤖 This review was automatically generated with Coder Agents.
|
/coder-agents-review |
b35f358 to
0527a03
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
Post-approval rebase introduced ErrSkillAmbiguous from the downstack PR. The test was updated to expect it, but the tool handlers weren't updated to surface the disambiguation information.
One new finding: when the LLM calls read_skill("deploy") and both personal/deploy and workspace/deploy exist, the handler returns a generic "failed to resolve skill" instead of telling the LLM which qualified aliases to use. The qualified aliases are safe to surface (already in the system prompt).
🤖 This review was automatically generated with Coder Agents.
6d5a8ef to
e74891b
Compare
0527a03 to
92012df
Compare
|
/coder-agents-review |
There was a problem hiding this comment.
All 15 findings across 8 rounds are resolved. DEREM-15 (ErrSkillAmbiguous) verified fixed: skillResolveErrorResponse now surfaces qualified aliases to the LLM via a dedicated ErrSkillAmbiguous branch, with test coverage in both ReadSkill and ReadSkillFile tools.
No new findings from the R8 panel or Netero. Clean.
🤖 This review was automatically generated with Coder Agents.
e74891b to
ac22415
Compare
92012df to
a12d04a
Compare
|
/coder-agents-review
|
ac22415 to
a7c44a4
Compare
a12d04a to
7eea5eb
Compare
|
/coder-agents-review
|
a7c44a4 to
2e2deae
Compare
7eea5eb to
990a6d5
Compare
|
/coder-agents-review
|
|
/coder-agents-review
|
990a6d5 to
819bb7b
Compare

Stack Context
This stack splits experimental personal skills into smaller reviewable PRs. This PR builds on #25365 and completes the feature wiring.
Stack order:
What?
Updates chattool skill formatting and
read_skillresolution so tools can read personal skills from the database, then injects personal skill metadata into chatd prompts and registers the skill-reading tools when skills are available.Why?
The chattool and chatd changes need to land together so the intermediate stack state stays buildable. This completes personal skill availability in chats without syncing personal skills into workspace filesystems.