Skip to content

Comments

Update documentation style guide#122

Merged
leynos merged 3 commits intomainfrom
codex/update-documentation-style-guide-footnotes
Jul 23, 2025
Merged

Update documentation style guide#122
leynos merged 3 commits intomainfrom
codex/update-documentation-style-guide-footnotes

Conversation

@leynos
Copy link
Owner

@leynos leynos commented Jul 21, 2025

Summary

  • describe how to link between docs using GitHub anchors
  • mandate GitHub flavoured Markdown references with numbered footnotes
  • convert reference-style links in the style guide to numeric footnotes

Testing

  • make markdownlint
  • make nixie

https://chatgpt.com/codex/tasks/task_e_687e7a1c30448322b53890c2b214ab9d

Summary by Sourcery

Update the documentation style guide to use GitHub-flavoured Markdown anchors and sequential numeric footnotes, replacing legacy reference-style links.

Documentation:

  • Add guidelines for cross-document linking using GitHub’s kebab-case anchor syntax
  • Mandate GitHub-flavoured Markdown references with sequential numeric footnotes and deprecate reference-style links
  • Convert existing link definitions and footnotes to numbered footnotes in the style guide

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jul 21, 2025

Reviewer's Guide

This PR refines the documentation style guide by enforcing GitHub-flavored Markdown with sequential numeric footnotes, converting existing reference-style links to numbered footnotes, and adding guidance for cross-document linking via GitHub kebab-case anchors.

File-Level Changes

Change Details Files
Add cross-document linking using GitHub kebab-case anchors
  • Introduce rule for linking to headings in other docs with kebab-case anchors
  • Provide example showing full path plus anchor (e.g., docs/...#3-1-...)
  • Ensure guidance sits under Markdown rules section
docs/documentation-style-guide.md
Enforce GitHub-flavored Markdown and sequential numeric footnotes
  • Update rule to mandate numbered footnotes ([^1]) over label-based references
  • Prohibit reference-style links ([foo][bar]) and non-standard citation forms
  • Clarify that footnotes must be numbered sequentially
docs/documentation-style-guide.md
Convert existing reference-style links and definitions to numeric footnotes
  • Replace [^markdownlint] with [^1] and update its footnote definition
  • Change [NumPy docstring standard][numpydoc] to NumPy docstring standard[^2]
  • Remove old reference definitions at the bottom of the document
docs/documentation-style-guide.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 21, 2025

Warning

Rate limit exceeded

@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 19 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 857632b and af5f54c.

📒 Files selected for processing (1)
  • docs/documentation-style-guide.md (4 hunks)

Summary by CodeRabbit

  • Documentation
    • Updated guidance on footnote usage to require sequentially numbered footnotes and clarified disallowed citation formats.
    • Added instructions and examples for linking to headings in other documents using GitHub's kebab-case anchors.
    • Revised references to the NumPy docstring standard to use numbered footnotes.

Walkthrough

Update the documentation style guide to clarify Markdown and footnote conventions. Change footnote references to use numbered Markdown syntax, add guidance for linking to headings via GitHub anchors, and explicitly discourage non-standard citation formats. Revise footnote examples and update references to the NumPy docstring standard accordingly.

Changes

File(s) Change Summary
docs/documentation-style-guide.md Clarified Markdown and footnote usage, standardised footnote references to numbered Markdown format, added explicit heading-linking guidance, and updated NumPy docstring reference and footnotes.

Sequence Diagram(s)

No sequence diagram necessary due to documentation-only changes.

Estimated code review effort

1 (~2 minutes)

Possibly related PRs

Poem

Markdown rules receive a tidy tune,
Footnotes now march in numbered platoon.
Anchors in kebab-case, links clear and bright,
NumPy gets its own footnote at night.
Docs shine with order, no chaos in sight!
📚✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-documentation-style-guide-footnotes

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @leynos - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `docs/documentation-style-guide.md:37` </location>
<code_context>
 - Ensure blank lines before and after bulleted lists and fenced blocks.
 - Ensure tables have a delimiter line below the header row.
+- When linking to headings in other documents, use GitHub's kebab-case anchors.
+  For example, `docs/rust-binary-router-library-design.md#3-1-binary-serialization-libraries-in-rust`
+  links to "3.1. Binary Serialization Libraries in Rust".

</code_context>

<issue_to_address>
This example line exceeds 80 columns and should be wrapped.

Even example lines in bullets should be wrapped to 80 columns, unless they are code blocks or tables.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2dc9055 and 5a0b382.

📒 Files selected for processing (1)
  • docs/documentation-style-guide.md (4 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
docs/**/*.md

📄 CodeRabbit Inference Engine (docs/documentation-style-guide.md)

docs/**/*.md: Use British English based on the Oxford English Dictionary (en-oxendict) for documentation, except when US spelling is used in an API (e.g., color), and spell the project licence file as LICENSE.
Use the Oxford comma in documentation.
Treat company names as collective nouns (e.g., 'Lille Industries are expanding') in documentation.
Write headings in sentence case in documentation.
Use Markdown headings (#, ##, ###, etc.) in order without skipping levels.
Follow markdownlint recommendations for Markdown files.
Provide code blocks and lists using standard Markdown syntax.
Always provide a language identifier for fenced code blocks in Markdown; use plaintext for non-code text.
Use - as the first level bullet and renumber lists when items change in Markdown.
Prefer inline links using [text](url) or angle brackets around the URL in Markdown.
Ensure blank lines before and after bulleted lists and fenced code blocks in Markdown.
Ensure tables in Markdown have a delimiter line below the header row.
Expand any uncommon acronym on first use in documentation (e.g., Continuous Integration (CI)).
Wrap paragraphs at 80 columns in documentation.
Wrap code at 120 columns in documentation.
Do not wrap tables in documentation.
Use footnotes referenced with [^label] in documentation.
Include Mermaid diagrams in documentation where it adds clarity.
When embedding figures in documentation, use ![alt text](path/to/image) and provide concise alt text describing the content.
Add a short description before each Mermaid diagram in documentation so screen readers can understand it.

The logging class diagram should be maintained in Markdown documentation using Mermaid syntax for clarity and up-to-date reference.

docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
Proactively update the relevant file(s) in the docs/ directory to r...

Files:

  • docs/documentation-style-guide.md
**/*.md

📄 CodeRabbit Inference Engine (AGENTS.md)

**/*.md: For Markdown files (.md only): Run make markdownlint or use integrated editor linting.
For Markdown files (.md only): Validate Mermaid diagrams with make nixie.

Files:

  • docs/documentation-style-guide.md

⚙️ CodeRabbit Configuration File

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Paragraphs and bullets must be wrapped to 80 columns, except where a long URL would prevent this (in which case, silence MD013 for that line)
  • Code blocks should be wrapped to 120 columns.
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/documentation-style-guide.md
docs/**/*.{py,rs,md}

📄 CodeRabbit Inference Engine (docs/dev-workflow.md)

docs/**/*.{py,rs,md}: Run make fmt to format Python, Rust, and Markdown sources
Run make check-fmt to verify formatting of Python, Rust, and Markdown sources without modifying files

Files:

  • docs/documentation-style-guide.md
{README.md,docs/**}

📄 CodeRabbit Inference Engine (.rules/python-00.mdc)

Colocate documentation (README.md or docs/) near reusable packages and include usage examples

Files:

  • docs/documentation-style-guide.md
🔇 Additional comments (3)
docs/documentation-style-guide.md (3)

27-29: Adopt numeric footnotes correctly.

Numeric reference [^\d] is in place and the matching definition exists; this aligns with the new convention.


117-118: Footnote link updated correctly.

The inline reference now uses the numbered footnote scheme and complies with the new rule set.


144-145: Footnote definitions match references.

Footnote numbers are sequential and the URL is wrapped in angle brackets, fulfilling the documented requirements.

@leynos leynos merged commit 388aa5a into main Jul 23, 2025
3 checks passed
@leynos leynos deleted the codex/update-documentation-style-guide-footnotes branch July 23, 2025 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant