Skip to content

RFC 0005: Approval Prompt Markdown Contract#4

Merged
omarshahine merged 2 commits into
mainfrom
rfc-0005-approval-prompt-markdown
May 30, 2026
Merged

RFC 0005: Approval Prompt Markdown Contract#4
omarshahine merged 2 commits into
mainfrom
rfc-0005-approval-prompt-markdown

Conversation

@omarshahine

Copy link
Copy Markdown
Contributor

Summary

Adds RFC 0005: a defined markdown contract for approval prompt text.

Approval prompts are built once in core and sent verbatim to every channel.
The builders emit mostly plain text, but an ad hoc markdown subset already
leaks in for exec approvals (buildFence code blocks, inline-code ids in
src/infra/exec-approval-reply.ts), and channels render that string
inconsistently. Meanwhile iMessage already converts a markdown subset to
native typed-runs on send, so the rendering machinery exists and sits unused
for approvals.

Proposal

  • Core plugin SDK emits one canonical markdown subset (**bold**, _italic_,
    ~~strike~~, inline code, fenced code) deliberately, and ships a lossless
    downgradeApprovalMarkdownToPlaintext helper.
  • Each channel gains an explicit approvalText: "markdown" | "plaintext"
    capability. markdown channels translate to native styling and own their
    escaping; plaintext channels downgrade losslessly.
  • Default is plaintext, so behavior is unchanged until a channel opts in. No
    flag day; plaintext is a permanent supported end state.

Rationale

Keeps formatting policy in core and rendering in channels, matching the
repo rule that core stays channel-agnostic. The RFC weighs three alternatives
(iMessage-local only, naive shared-markdown with no opt-in, fully structured
segments) and explains why the opt-in middle path ships safely channel by
channel.

Notes

  • New file only: rfcs/0005-approval-prompt-markdown.md. No code changes; this
    is a design proposal.
  • Built from rfcs/0000-template.md; 0005 is the next sequential id.

omarshahine and others added 2 commits May 30, 2026 23:26
Propose core plugin SDK emit a canonical markdown subset for approval
prompt text, with each channel opting in to render it natively or
downgrade losslessly to plaintext. Default is plaintext so the change
ships safely channel by channel.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clawsweeper

clawsweeper Bot commented May 30, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed May 30, 2026, 7:31 PM ET / 23:31 UTC.

Summary
Adds a new RFC document defining an approval prompt markdown contract for OpenClaw core and channel renderers.

Reproducibility: not applicable. this is an RFC PR, not a runtime bug report. I checked current main and the proposed document instead of trying to reproduce behavior.

Review metrics: 2 noteworthy metrics.

  • Diff scope: 1 file added, 202 lines added, 0 deleted. The review surface is a new RFC document, not runtime code or repository automation.
  • Executable changes: 0 code, workflow, dependency, or script files changed. Security and runtime proof review are limited to the design text and its referenced behavior.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Have maintainers decide whether the proposed approvalText capability and markdown/plaintext contract should be accepted as RFC direction.

Risk before merge

  • [P1] Merging the RFC records a plugin SDK and channel-capability direction for approval rendering, so maintainers should accept that API/design contract before treating follow-up implementation work as approved.
  • [P1] The RFC references live OpenClaw core and channel behavior outside this repository; spot checks confirmed the central references, but full product review still belongs with the relevant OpenClaw maintainers.

Maintainer options:

  1. Decide the mitigation before merge
    Review this as an RFC design decision and merge it if maintainers accept the markdown/plaintext approval contract; implementation should happen later in focused OpenClaw core and channel PRs.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] The remaining action is maintainer RFC/design review, not a narrow automated code repair.

Security
Cleared: The diff adds only one Markdown RFC file and does not touch workflows, dependencies, scripts, secrets, or executable code.

Review details

Best possible solution:

Review this as an RFC design decision and merge it if maintainers accept the markdown/plaintext approval contract; implementation should happen later in focused OpenClaw core and channel PRs.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is an RFC PR, not a runtime bug report. I checked current main and the proposed document instead of trying to reproduce behavior.

Is this the best way to solve the issue?

Yes for an RFC-stage change: adding a focused design document is the maintainable way to discuss the approval markdown contract before code lands. The actual SDK/channel implementation still needs maintainer design acceptance and later focused PRs.

AGENTS.md: not found in the target repository.

Codex review notes: model gpt-5.5, reasoning high; reviewed against fb2bfbdbb6c1.

Label changes

Label changes:

  • add P3: This is a low-risk RFC/design proposal with no executable changes and no urgent user-facing regression.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR only adds an RFC design document, so there is no changed runtime behavior for contributor proof.

Label justifications:

  • P3: This is a low-risk RFC/design proposal with no executable changes and no urgent user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The PR only adds an RFC design document, so there is no changed runtime behavior for contributor proof.
Evidence reviewed

What I checked:

  • Target repository policy check: No AGENTS.md exists under the target repository root, so no repository-authored review policy applied. (fb2bfbdbb6c1)
  • Current main does not already contain the RFC: The current RFC list contains 0000 through 0004 only, and a string-history search found no existing Approval Prompt Markdown Contract on main. (rfcs, fb2bfbdbb6c1)
  • PR scope: GitHub reports one added file, rfcs/0005-approval-prompt-markdown.md, with 202 additions and no deletions; the PR is open, unmerged, and mergeable clean. (rfcs/0005-approval-prompt-markdown.md:1, e9e5c2beb48c)
  • RFC structure matches current repo guidance: README.md says new RFCs should use rfcs/0000-template.md, be named -.md, and use YAML frontmatter plus the expected Summary/Motivation/Goals/Non-Goals/Proposal/Rationale/Unresolved questions shape. (README.md:42, fb2bfbdbb6c1)
  • Named OpenClaw code references spot-checked: The external OpenClaw main branch contains the named approval builders and markdown behavior the RFC cites, including exec approval fences/inline id, plugin approval plaintext, reaction bindings, and iMessage markdown formatting. (openclaw/openclaw:src/infra/exec-approval-reply.ts:366, 4c33aaa86c16)
  • History and routing provenance: The RFC template and README structure trace to kevinlin-openai, prior merged RFC work includes Omar Shahine’s iMessage cleanup RFC, and Gio Della-Libera has recent RFC merge/alignment history. (rfcs/0000-template.md:1, f4fdf38f4717)

Likely related people:

  • kevinlin-openai: Introduced the RFC template and README structure that this new RFC follows, and has recent main-branch RFC updates. (role: RFC process/template owner; confidence: high; commits: f4fdf38f4717, bbb4058da234, c288e2f1a193; files: README.md, rfcs/0000-template.md, rfcs/0001-lts-release-policy.md)
  • omarshahine: Authored the prior merged iMessage configuration RFC and follow-up template alignment on current main; this RFC also centers channel rendering and iMessage approval behavior. (role: recent related RFC contributor; confidence: high; commits: 54b2f430a77f, 1a545b1de86d, 4b98ff01752e; files: rfcs/0004-imessage-channel-configuration-cleanup.md)
  • Gio Della-Libera: Recent history shows merges of earlier RFCs and an alignment pass across merged RFC documents, making this a likely review/routing signal for RFC consistency. (role: recent RFC merger and formatter; confidence: medium; commits: 25d588eeed14, 5007f927bbe3, e46c2a113cc9; files: rfcs/0002-doctor-health-upgrades.md, rfcs/0003-policy-conformance.md, rfcs/0004-imessage-channel-configuration-cleanup.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels May 30, 2026
@omarshahine
omarshahine merged commit f346050 into main May 30, 2026
@omarshahine
omarshahine deleted the rfc-0005-approval-prompt-markdown branch May 30, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant