Skip to content

feat(docs): add code format flag#705

Merged
steipete merged 1 commit into
mainfrom
feat/docs-format-code
Jun 7, 2026
Merged

feat(docs): add code format flag#705
steipete merged 1 commit into
mainfrom
feat/docs-format-code

Conversation

@steipete
Copy link
Copy Markdown
Collaborator

@steipete steipete commented Jun 7, 2026

Summary

Closes #685.

Proof

  • go test ./internal/cmd -run 'TestDocsFormatFlags|TestDocsFormatCmdMatchAll'
  • go test ./internal/cmd/...
  • make docs-commands
  • make ci
  • autoreview --mode local clean, no accepted/actionable findings
  • Live E2E with clawdbot@gmail.com: created scratch Doc 1Uir0CrHQoOCW13kRLtOZcR0VRlIja43XcLzsYjk5QVM, verified raw Docs API styling for both docs format --code and plain-text docs write --code, verified conflicts for --font-family and --bg-color, then trashed the Doc and verified trashed:true.

@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented Jun 7, 2026

Codex review: needs maintainer review before merge. Reviewed June 7, 2026, 12:55 AM ET / 04:55 UTC.

Summary
The PR adds a shared Docs --code format flag for docs format and plain-text docs write, documents the generated command flags, and adds unit coverage for code styling and conflicts.

Reproducibility: not applicable. as a bug reproduction: this is a feature PR. Source inspection confirms current main lacks the flag, while the PR body reports live E2E validation for the new behavior.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Next step before merge

  • No repair lane is needed; this collaborator-authored PR is ready for normal maintainer review and landing checks.

Security
Cleared: The diff only adds a Go CLI flag, unit tests, generated command docs, and a changelog entry; it does not change credentials, dependencies, CI, or code execution surfaces.

Review details

Best possible solution:

Land the shared --code flag after normal maintainer review/checks, keeping it tied to the existing Courier New plus codeBackgroundGrey behavior.

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

Not applicable as a bug reproduction: this is a feature PR. Source inspection confirms current main lacks the flag, while the PR body reports live E2E validation for the new behavior.

Is this the best way to solve the issue?

Yes. Adding the flag to shared DocsFormatFlags is the narrow maintainable path because both docs format and plain-text docs write already consume that struct.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is a low-risk user-facing Docs formatting feature with tests and limited blast radius.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR, though the body includes reported live Docs API E2E proof.

Label justifications:

  • P3: This is a low-risk user-facing Docs formatting feature with tests and limited blast radius.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this collaborator-authored PR, though the body includes reported live Docs API E2E proof.
Evidence reviewed

What I checked:

  • Repository policy read: Read the full target AGENTS.md and applied its PR review guidance by inspecting the PR/source without switching branches or editing files. (AGENTS.md:1, cce9e510db65)
  • Current main lacks the flag: On current main, DocsFormatFlags includes font, color, background, and boolean style fields, but no Code flag yet. (internal/cmd/docs_format.go:25, cce9e510db65)
  • PR implementation: The PR commit adds Code bool, includes it in dry-run output and any(), and maps it to Courier New plus the existing grey background while rejecting conflicting font/background flags. (internal/cmd/docs_format.go:30, f76627f99a4a)
  • PR test coverage: The PR adds unit coverage for the generated code-style UpdateTextStyle request and for --code conflicts with --font-family and --bg-color. (internal/cmd/docs_format_test.go:70, f76627f99a4a)
  • Existing code style source: Current main already defines the shared grey value and inline-code behavior as Courier New plus codeBackgroundGrey, which the PR reuses. (internal/cmd/docs_sed_helpers.go:50, cce9e510db65)
  • Diff scope: The PR changes five files with 51 additions: one Go implementation file, one Go test file, two generated command docs, and the changelog. (f76627f99a4a)

Likely related people:

  • steipete: Current blame for the Docs format path and shared code-style helper points to the v0.21.0 release commit, and history shows earlier rich-text Docs formatting work in this area by the same author. (role: recent area contributor; confidence: high; commits: 2c84d8981dd5, b4d6f559c399, b26e19003ebd; files: internal/cmd/docs_format.go, internal/cmd/docs_edit.go, internal/cmd/docs_sed_helpers.go)
  • sebsnyk: The linked feature request came from this contributor, and recent history shows adjacent Docs markdown code-block rendering work credited to Sebastian Roth around the same code-style behavior. (role: adjacent contributor and requester; confidence: medium; commits: b646e886f6dd, 58b866e9ac55; files: internal/cmd/docs_formatter.go, internal/cmd/docs_sed_helpers.go)
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: 🦞 diamond lobster Very strong PR readiness with only minor 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 Jun 7, 2026
@steipete steipete merged commit 313a310 into main Jun 7, 2026
11 checks passed
@steipete steipete deleted the feat/docs-format-code branch June 7, 2026 05:03
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: 🦞 diamond lobster Very strong PR readiness with only minor 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.

feat(docs): add --code flag to docs format for monospace + grey background

1 participant