Skip to content

Add CONTRIBUTING.md and STYLEGUIDE.md - #10

Merged
jpshackelford merged 1 commit into
mainfrom
contributing-and-style-guide
Oct 5, 2026
Merged

jpshackelford merged 1 commit into
mainfrom
contributing-and-style-guide

Conversation

@jpshackelford

Copy link
Copy Markdown
Member

Why

Each example now has to read well on GitHub and render as a docs page, and the remaining examples are about to be brought up to the standard set by command-blacklist (#8). This splits the guidance into two files. CONTRIBUTING.md is the process: publishing with example.yaml, what the preview and sync pull requests in OpenHands/docs do, what a failing docs-preview means, and why cookbook/ in the docs repository is never edited by hand. STYLEGUIDE.md is the conventions: README structure with standard section names, when to use each docs component, links, code blocks, script flags, launch badges, example.yaml, and an upleveling checklist to work through for each example.

For general writing style, the style guide points to the docs site's own guide rather than restating it. That guide sets Title Case for first- and second-level headings and calls for tabs when there are alternative approaches. The authoring rules that were in tools/docs-render/README.md moved into these files, so that README is now notes for maintaining the converter.

A few rules choose between conventions the examples currently disagree on:

  • Run It: 11 examples use "Run it", 5 use "Try it" (including command-blacklist), and 5 use "Usage".
  • Base URL variable: 14 scripts read OH_API_BASE and 3 read OH_API_URL.
  • Title Case for titles: the two published example.yaml titles are in sentence case.

Where an example disagrees, the guide says to follow the guide; those examples get fixed when they're upleveled. The checklist also covers launch badges: every badge in the repository still encodes github:jpshackelford/oh-examples in its base64 payload.

Validation

  • Commands and links — each documented command runs as written (pre-commit, pytest, npm test, npm run check). Every relative link and #anchor across the four Markdown files resolves. The new external links return 200, except docs.openhands.dev/cookbook, which goes live when docs(cookbook): sync from OpenHands/enterprise-cookbook docs#884 merges.
  • Facts — the required checks, squash-only merging and one-approval rule match the main ruleset. The example.yaml rules, card icons and CLI defaults match the converter code. The flag/environment-variable table matches what the existing scripts read.

This PR was drafted by an AI agent on behalf of the user.

@jpshackelford can click here to continue refining the PR

CONTRIBUTING.md covers the process: publishing with example.yaml, the docs
preview and sync pull requests, and the rules for the docs repository.
STYLEGUIDE.md covers the conventions: README structure, docs components, links,
code blocks, example code, launch badges, example.yaml, and an upleveling
checklist. tools/docs-render/README.md becomes maintainer notes for the converter.

Co-authored-by: openhands <openhands@all-hands.dev>
@jpshackelford
jpshackelford marked this pull request as ready for review October 4, 2026 01:12
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Coverage

Coverage Report
FileStmtsMissCoverMissing
__init__.py50100% 
cli.py65395%59–60, 100
client.py1051784%56, 109, 117, 150, 160–162, 173, 203, 206–208, 210, 217–219, 221
metrics.py80298%102, 182
v0.py48394%88, 104, 141
v1.py83989%86, 90, 94, 131, 135, 155, 178, 206, 214
TOTAL3863491% 

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Docs preview

✅ Docs preview is ready: https://allhandsai-cookbook-preview-pr-10.mintlify.site

Page Change
/cookbook/command-blacklist added
/cookbook/conversation-tags added
/cookbook added

Docs PR: OpenHands/docs#889 (draft preview; never merged, closes with this PR).
Rendered from 0425200. After merge, a separate sync PR updates the docs.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Excellent documentation PR. The guides are well-structured, clearly written, and provide actionable guidance for contributors.

Changes:

  • Adds CONTRIBUTING.md covering the contribution process and publishing workflow
  • Adds STYLEGUIDE.md with comprehensive conventions for writing examples
  • Updates README.md and cookbook.yaml to reference the new documentation
  • Refactors tools/docs-render/README.md to focus on converter maintenance

Validation:
✅ All internal links and anchors verified to exist
✅ Referenced files and workflows exist
✅ Commands are correct for uv-based project
✅ Documentation is internally consistent and complete
✅ No material issues found

[RISK ASSESSMENT]

Risk Level: LOW

  • Documentation-only change with no code modifications
  • Improves contribution quality and consistency
  • No security, compatibility, or functional concerns

Verdict: APPROVED. This PR successfully establishes clear contribution guidelines and style standards that will benefit all future contributors.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/OpenHands/enterprise-cookbook/actions/runs/37167278629

@jpshackelford
jpshackelford merged commit 7968e7c into main Oct 5, 2026
9 checks passed
@jpshackelford
jpshackelford deleted the contributing-and-style-guide branch October 5, 2026 01:18
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