8.2 KiB
8.2 KiB
APP-4549: Tech Spec — Feedback Bundled Skill Setting
Linear: APP-4549
Context
PRODUCT.md defines the user-visible behavior: add a default-on setting that disables only Warp’s built-in feedback bundled skill.
The relevant code already has a central bundled-skill activation path:
app/src/ai/skills/skill_manager.rs (20-47)—BundledSkillActivationmodels whether a bundled skill is active.app/src/ai/skills/skill_manager.rs (361-389)— bundled skills are loaded from app resources and assigned an activation condition.app/src/ai/skills/skill_manager.rs (591-600)—activation_for_bundled_skillcurrently makes most bundled skills, includingfeedback, always active.app/src/ai/skills/skill_manager.rs (185-201)—get_skills_for_working_directoryappends bundled skills whose activation condition is enabled.app/src/ai/skills/skill_utils.rs (94-121)—list_skills_if_changedsends available skill descriptors to the agent when the list changes.app/src/ai/blocklist/action_model/execute/read_skill.rs (36-63)—read_skillresolvesSkillReference::BundledSkillIdthroughSkillManager::skill_by_reference.app/src/settings/ai.rs (715-1464)—AISettingsdefines user-level Agent settings, including public TOML-backed settings underagents.warp_agent.*.app/src/settings_view/ai_page.rs (6024-6223)— the Agent settings “Other” widget renders related Agent toggles using shared helpers.app/src/bin/generate_settings_schema.rs (146-199)andscript/prepare_bundled_resources (132-159)— public settings withtoml_pathare included in the generated settings schema bundled with app resources. Bundled skills are copied into the application bundle fromresources/bundledbyscript/prepare_bundled_resources:48. This change should not try to remove the feedback skill from the bundle at build time; it should make the skill inactive at runtime.
Proposed changes
- Add a public AI setting in
app/src/settings/ai.rs.- Suggested field:
feedback_bundled_skill_enabled. - Suggested generated setting type:
FeedbackBundledSkillEnabled. - Type:
bool. - Default:
true. - Supported platforms:
SupportedPlatforms::ALL. - Sync:
SyncToCloud::Globally(RespectUserSyncSetting::Yes). - Private:
false. - Suggested TOML path:
agents.warp_agent.other.feedback_bundled_skill_enabled. - Description: “Whether Warp’s built-in feedback skill is available to the Warp Agent.”
- Suggested field:
- Extend bundled skill activation in
app/src/ai/skills/skill_manager.rs.- Add a
BundledSkillActivationvariant for settings-backed feedback activation, for exampleFeedbackSkillSetting. - Update
BundledSkillActivation::is_enabledto consultAISettings::as_ref(ctx).feedback_bundled_skill_enabledfor that variant. - Update
activation_for_bundled_skillsoskill_id == "feedback"uses that variant. - Keep
modify-settingsonRequiresFileand all unrelated bundled skills on their existing activation behavior.
- Add a
- Add an activation-aware lookup for bundled skill reads.
- Preserve raw lookup behavior where the UI needs historical metadata for already-rendered outputs.
- Add a method such as
skill_by_reference_if_active(&self, reference: &SkillReference, ctx: &AppContext) -> Option<&ParsedSkill>, or updateReadSkillExecutorto pattern-match bundled references and callactive_bundled_skill(id, ctx). - Use the activation-aware path in
ReadSkillExecutorsoread_skillcannot expose@warp-skill:feedbackcontent when the setting is disabled. - Path-based user skills should continue to use
skills_by_pathand should not be affected by the feedback bundled-skill setting.
- Add the UI toggle in
app/src/settings_view/ai_page.rs.- Import the generated
FeedbackBundledSkillEnabledsetting type. - Add a
SwitchStateHandletoOtherAIWidget. - Add
AISettingsPageAction::ToggleFeedbackBundledSkill. - Handle the action by toggling
AISettings.feedback_bundled_skill_enabledand notifying the view. - Render the toggle in the existing Agent “Other” section using
render_ai_setting_toggle. - Suggested label: “Enable built-in feedback skill”.
- Suggested description: “Let Oz use Warp’s built-in skill for turning Warp product feedback into GitHub issues.”
- Update
OtherAIWidget::search_termsto include feedback, skill, and bundled skill.
- Import the generated
- Schema and resources.
- No manual schema file changes should be necessary. The setting should appear in generated schema output through the existing settings inventory path.
- Normal resource preparation should continue to copy the
feedbackskill file into the bundle.
- Keep the implementation narrow.
- Do not alter
resources/bundled/skills/feedback/SKILL.md. - Do not add broad bundled-skill allow/deny lists.
- Do not change skill deduplication, provider precedence, or user-created skill scoping.
- Do not alter
Testing and validation
Map tests to the product behavior in PRODUCT.md:
- Product behavior 2 and 3: add a skill manager test showing
feedbackis active by default and included inget_skills_for_working_directorywhen bundled skills are enabled. - Product behavior 4: add a skill manager test that sets
feedback_bundled_skill_enabledtofalseand verifiesfeedbackis excluded from returned bundled skill descriptors. - Product behavior 8: in the same test or a companion test, verify another bundled skill remains included when feedback is disabled.
- Product behavior 7: verify path-based skills named
feedbackare still returned according to existing home/project skill scope rules when the bundled feedback skill is disabled. - Product behavior 4: add or update
read_skill_testssoReadSkillExecutorreturns an error forSkillReference::BundledSkillId("feedback")when the setting is disabled. - Product behavior 3 and 8: add a read-skill test showing an enabled bundled skill can still be read.
- Product behavior 9, 12, and 13: update
ai_page_testsif the existing settings page tests assert widget search/filtering or rendered action coverage for the “Other” widget. - Run
cargo fmt. - Run targeted tests:
cargo test -p warp skill_manager_testscargo test -p warp read_skill_testscargo test -p warp ai_page_testsAdjust exact package/test filters if local test names differ.
- If this is prepared for PR review, follow repo guidance and run the required formatting and clippy checks before opening or updating a PR.
Risks and mitigations
- Stale skill context could still reference
@warp-skill:feedback. Mitigation: guard directread_skillexecution with the same activation state used by skill listing. - The setting could accidentally disable user-authored skills named
feedback. Mitigation: check only the bundled skill ID, not parsed skill name or path-based references. - Other bundled skills could regress if activation is generalized too broadly. Mitigation: add tests that feedback is disabled while another bundled skill remains active.
- Settings UI copy could imply all feedback mechanisms are disabled. Mitigation: label and description should explicitly say “built-in feedback skill.”
Parallelization
Do not parallelize the implementation. The setting definition, activation logic, direct read enforcement, and UI toggle are tightly coupled and touch overlapping files, so a single implementer should make the code changes in one checkout on branch safia/app-4549-add-setting-to-disable-the-feedback-skill.
Validation can be parallelized after implementation if desired:
- Agent A: local execution in
/Users/captainsafia/code/warp, same branch, ownsskill_manager_testsandread_skill_tests. - Agent B: local execution in a separate worktree, for example
/Users/captainsafia/code/warp-app-4549-ui-testson branchsafia/app-4549-ui-validation, ownsai_page_testsand settings UI review. If using the optional validation split, Agent B should not modify source files unless asked; it should report failures and suggested fixes back to the main branch owner. The final PR should land as a single branch/PR fromsafia/app-4549-add-setting-to-disable-the-feedback-skill.