Repository navigation
Conversation
Add sqlc queries for skills owned by a chat project and authorize them through the parent project in dbauthz: reading needs chat_project:read and writing needs chat_project:update. Skill.RBACObject keeps denying project rows so any unwrapped path fails closed. Add the chat_project_skill audit resource type and AuditableChatProjectSkill so the upcoming project skill API can record audit entries.
Add experimental routes to list, create, read, update and delete skills on a chat project. Reading needs read on the project and writes need update; callers who lack the permission get a 404 like the project instructions routes. The handlers reuse the shared skill create and update path, map the per-project cap and name index to 409, and audit every write as a chat_project_skill. Add matching ExperimentalClient methods.
Chats in a project now get the project's enabled skills as a new "project" skill source, read as the chat owner each turn. Subagents use the root chat's project. read_skill loads project skill bodies, and MergeSkills takes sources in merge order so new sources do not change its signature.
The "/" menu offers the skills of the chat's project, next to personal, organization and workspace skills, and /clear and /compact defer to a project skill with the same name. Documents project skills.
…g in the slash menu Organization and project skills load through one hook, and the menu renders its skill groups from one ordered list. Adds project loading and error stories.
…lify skill group offsets
…nd resolve emptiness in the hook
…naming in the composer
Cover the project-only skill tool check in the integration test, the project skill body loader's not-found mapping, and the chat-projects experiment gate in the composer.
Docs previewCheck off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 681b37465f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… request instead of menu markup
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…gration after main
…gration after main
# Conflicts: # coderd/x/chatd/chatd.go # coderd/x/chatd/generation_preparer.go
Add experimental routes to list, create, read, update and delete skills on a chat project. Reading needs read on the project and writes need update; callers who lack the permission get a 404 like the project instructions routes. The handlers reuse the shared skill create and update path, map the per-project cap and name index to 409, and audit every write as a chat_project_skill. Add matching ExperimentalClient methods.
Adds the storage and authorization layer for chat project skills. The `skills` table already allows a `project_id` owner (migration 000621); this adds the queries for it and authorizes them through the parent chat project, the same way project instructions work. - New queries in `skills.sql`: insert, get by name, list metadata, update (COALESCE on description, content and enabled), delete, and `GetProjectSkillByIDForUpdate` for the shared update lock. - dbauthz checks `chat_project:read` on the project for reads and `chat_project:update` for writes. `authorizeChatProjectInstructions` became `authorizeChatProjectConfig`, shared by instructions and skills. `Skill.RBACObject()` still denies project rows so nothing reaches them without going through the project. - Audit: new `chat_project_skill` resource type (enum-only migration 000624), `AuditableChatProjectSkill`, and the usual diff/request/table/FriendlyString/AuditFilter wiring. The API that emits these entries comes in the next PR. Stack (merge top to bottom): - #30826 👈 - #30827 - #30838 - #30840 - #30854 - #30855 - #30856 - #30861 - #30880 - #30881 - #30882 - #30884
Adds experimental routes for managing a chat project's skills under
`/api/experimental/organizations/{organization}/chats/projects/{project}/skills`:
list, create, get, update (PATCH) and delete by skill name.
The handlers reuse the shared skill create and update path from the
personal and organization skill APIs. Reading needs `chat_project:read`
on the project and writing needs `chat_project:update`; callers without
access get 404, matching the project instructions routes. Duplicate
names and the 100-skill-per-project cap return 409. Writes are audited
as `chat_project_skill` with the skill name as the target. The SDK gains
the matching `ExperimentalClient` methods.
Stack (merge top to bottom):
- #30826
- #30827 👈
- #30838
- #30840
- #30854
- #30855
- #30856
- #30861
- #30880
- #30881
- #30882
- #30884
Chats that belong to a chat project now get the project's skills, next to personal, organization and workspace skills. They show up in the model's skill list, load through
read_skill, and appear in a "Project skills" group in the/menu.coderd/x/skillsadds theprojectsource.MergeSkillsnow takes a list of sources in merge order (personal, organization, project, workspace). Bare names stay bare unless two sources share a name, in which case they getproject/<name>style aliases.chat-projectsexperiment./clearand/compactdefer to a project skill with the same name, as they already do for other sources.coderd/x/chatd/ARCHITECTURE.mdonly gets a TODO for the author.Dogfood UAT on this branch passed: project skills appear in the project page
/menu and in project chats,read_skillloads them, disabled and deleted skills report not found, chats outside the project don't see them, and a subagent gets them through its root chat. The site side of subagent chats inheriting their root chat's project is in #30840./menuread_skillin a project chatStack (merge top to bottom):