feat(be): Add proto-writer skill and TAGS.md reference#21020
feat(be): Add proto-writer skill and TAGS.md reference#21020charmik-redhat wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
This change is part of the following stack: Change managed by git-spice. |
|
Skipping CI for Draft Pull Request. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🚀 Build Images ReadyImages are ready for commit 848f76d. To use with deploy scripts: export MAIN_IMAGE_TAG=4.12.x-102-g848f76dcbf |
vikin91
left a comment
There was a problem hiding this comment.
Requesting changes regarding the invocation method. I didn't review the contents of the skill.
| name: proto-writer | ||
| description: Guide the creation or modification of StackRox protobuf definitions and Postgres store generation. Use when creating new storage types, adding fields to existing protos, setting up gen.go files, or making architectural decisions about data modeling (embedded vs FK relationships, search scope, API/storage separation). | ||
| --- |
There was a problem hiding this comment.
| name: proto-writer | |
| description: Guide the creation or modification of StackRox protobuf definitions and Postgres store generation. Use when creating new storage types, adding fields to existing protos, setting up gen.go files, or making architectural decisions about data modeling (embedded vs FK relationships, search scope, API/storage separation). | |
| --- | |
| name: proto-writer | |
| description: Guide the creation or modification of StackRox protobuf definitions and Postgres store generation. Use when creating new storage types, adding fields to existing protos, setting up gen.go files, or making architectural decisions about data modeling (embedded vs FK relationships, search scope, API/storage separation). | |
| disable-model-invocation: true | |
| --- |
This skill targets a very specific task. It would be good to let the Agents skip it if not needed. Note that in Cursor, you cannot explicitly disable skills, to we either need disable-model-invocation: true, or the skill should go to a different repo, for example stackrox/skills. Otherwise, the Agents will evaluate whether to use that skill or not on almost every prompt related to that repo.
There was a problem hiding this comment.
I've been thinking about this since the demo. I've seen anecdotally where having a bunch of skills in the repo can degrade the quality of the work the robots do. It may be better to start with it in the skills repo instead and advertise that it is there.
There was a problem hiding this comment.
I can definitely disable auto invocation of this skill or move it to stackrox/skills.
What do you think about the TAGS.md documentation? Do you think that should be moved to the separate repo too? While the documentation looks accurate as far as I can tell, I wouldn't want an agent to go down some unintended rabbit hole after consuming all that context. As I had mentioned in my demo, when a replicable example exists in the codebase, the agent would do just fine by following the same pattern. But when designing something entirely new (like when we flattened ImageCVE the first time), the skill and documentation could be useful.
| - Should it cascade delete? (default yes) If restrict -> add `,restrict-delete` (use sparingly) | ||
|
|
||
| 4. **Should this field be indexed?** | ||
| - Yes -> `sql:"index=btree"` (default), or `hash` for equality-only, `brin` for time-series, `gin` for arrays |
There was a problem hiding this comment.
Even for equality we found hash to have a lot of overhead and expense. Do not recommend using hash unless there is a very specific use case.
There was a problem hiding this comment.
Will update this one
Description
Add comprehensive proto tag reference and interactive Claude Code skill for creating/modifying StackRox protobuf definitions and Postgres store generation.
proto/TAGS.md— Reference covering all 8 tag types (sql,search,policy,hash,sensorhash,scrub,validate,crYaml), gen.go flags, scenarios, and type mappings..claude/skills/proto-writer/SKILL.md— Interactive workflow skill guiding proto changes through tag decisions, architectural choices (embedded vs FK, search scope, API/storage separation), gen.go creation, and registration steps.User-facing documentation
Testing and quality
Automated testing
Documentation and skill files only — no code changes, no tests needed.
How I validated my change
Tested the skill by generating a set of connected protos that have FK dependencies, searchable fields, and secret fields. Compared agent performance with and without the skill. Skill performance was better (less tokens, duration) when generating a completely new set of protos, while the performance with and without skill was identical when a clear repeatable pattern existed in the code base (e.g., flatten NodeCVEs by following the example of ImageCVEV2).