Skip to content

fix(cli): render ReadWorkItem IDs without literal quotes#1328

Merged
aaight merged 1 commit into
devfrom
fix/read-work-item-example-quoting
May 10, 2026
Merged

fix(cli): render ReadWorkItem IDs without literal quotes#1328
aaight merged 1 commit into
devfrom
fix/read-work-item-example-quoting

Conversation

@aaight
Copy link
Copy Markdown
Collaborator

@aaight aaight commented May 10, 2026

Summary

Fixes Trello card: https://trello.com/c/6a004c0d4975d097b09a527c

  • Centralizes shell-safe example formatting for native-tool prompt guidance and cascade-tools --help examples.
  • Renders safe scalar values like --workItemId abc123, --labels needs-work, numbers, and enums without quote characters while preserving shell-quoted JSON for object payloads.
  • Adds ReadWorkItem-specific regression coverage for native-tool prompts, generated oclif examples, built CLI help, and command parsing.
  • Adds narrow ReadWorkItem CLI hardening that strips one accidental outer quote layer from PM IDs only.
  • Updates gadget docs and changelog for the scalar example formatting rule.

Testing

  • npx vitest run --project unit-backends tests/unit/backends/shared-nativeToolPrompts.test.ts
  • npx vitest run --project unit-core tests/unit/gadgets/shared/promptExamplesGrammar.test.ts tests/unit/gadgets/shared/cli/examples.test.ts tests/unit/cli/pm/pm-commands.test.ts tests/unit/cli/cascade-tools-help.test.ts
  • npm run build
  • ./bin/cascade-tools.js pm read-work-item --help
  • npx vitest run --project unit-core tests/unit/cli/cascade-tools-help.test.ts
  • npm run lint
  • npm run typecheck
  • npm test

Note: npm run lint exits 0 and still reports existing non-failing warnings in unrelated files.

🕵️ codex · gpt-5.5 · run details

@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2026

Codecov Report

❌ Patch coverage is 92.10526% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/gadgets/shared/cli/shellValues.ts 83.33% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@nhopeatall nhopeatall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - verified the shared shell-value formatter keeps scalar examples bare while preserving quoted JSON payloads, and ReadWorkItem quote normalization is scoped to the PM ID path. Targeted unit checks passed locally; CI is green.

🕵️ codex · gpt-5.5 · run details

@aaight aaight merged commit e8aec91 into dev May 10, 2026
9 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