Merge dev to main: friction prompt rewrite#1306
Merged
Merged
Conversation
Co-authored-by: Cascade Bot <bot@cascade.dev>
Live signal from prod 2026-05-10 PR #1303 (a4585987 implementation run): the agent encountered a textbook incidental papercut — `CASCADE_ORG_ID=mongrel` leaking from worker env into `tests/unit/cli/dashboard/config.test.ts`, worked around with `env -u CASCADE_ORG_ID npm test` — but reported it in the PR body instead of via `ReportFriction`. The plumbing was correct (capability scoped, gadget surfaced, sidecar env var injected, CLI installed); the prompt just wasn't recruiting the agent. The prior text framed reporting as a constraint, not a trigger: > When the ReportFriction tool is available, use it ONLY for > incidental papercuts in the environment, tooling, repository setup, > documentation, or developer workflow that make the work harder > than it should be. > > Do not report core task difficulty, expected debugging effort, > product ambiguity that belongs in the current work item, or issues > you can resolve directly as part of the assigned task. > > Keep working after reporting friction unless the issue blocks > progress. ... Three problems with this framing — verified by reading other agent prompt sections that DO recruit action well (`## Git`, `### Service Recovery`, `### Test Writing Protocol`): 1. "use it only for ..." reads as a SCOPING CONSTRAINT, not an action trigger. Agents default to "skip if uncertain." 2. Three negative clauses ("Do not report ...") with zero positive trigger language. Bias is toward not reporting. 3. "When the ReportFriction tool is available" hedge — but the guidance is only injected when the capability IS effective, so the conditional just creates agent doubt. New text drops all three. Action-trigger framing, "when in doubt, report" calibration, "better to over-report initial papercuts" license, non-blocking semantic preserved. No example list — would create pattern-match traps that narrow the use; the gadget's `category` enum (tooling | environment | permissions | dependency | test-failure | pm-data | scm-data | other) provides the categorical anchoring at invocation time. Tests updated: - `tests/unit/agents/shared/frictionGuidance.test.ts` — flipped from "expect old text" to assert the action-trigger framing + the intentional removal of the prior under-reporting clauses. - `tests/unit/backends/secretOrchestrator.test.ts:260` — flipped the prompt-assembly test's `toContain('incidental papercuts')` style assertions to the new content. No code wiring changes. The plumbing stays exactly as PR #1296/#1298/#1300 shipped it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mpt-rewrite chore(prompts): rewrite friction guidance to be action-triggered
Co-authored-by: Cascade Bot <bot@cascade.dev>
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
env -u CASCADE_ORG_IDworkaround but reported it in the PR body instead of viaReportFriction. Drops the conditional hedge, the constraint framing, and the three negative clauses; adds explicit "when in doubt, report" calibration.Test plan
cascade-tools pm report-frictioninvocation🤖 Generated with Claude Code