Skip to content

Merge dev to main: friction prompt rewrite#1306

Merged
zbigniewsobiecki merged 4 commits into
mainfrom
dev
May 10, 2026
Merged

Merge dev to main: friction prompt rewrite#1306
zbigniewsobiecki merged 4 commits into
mainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

Test plan

  • dev branch CI green pre-merge
  • Watch prod build + deploy after merge
  • Monitor prod worker engineLogs for first actual cascade-tools pm report-friction invocation

🤖 Generated with Claude Code

aaight and others added 4 commits May 10, 2026 09:38
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>
@zbigniewsobiecki zbigniewsobiecki merged commit 583b61f into main May 10, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants