Skip to content

docs(repo): define local-first PR workflow#192

Merged
Whiteks1 merged 1 commit intomainfrom
codex/local-first-pr-workflow
Mar 27, 2026
Merged

docs(repo): define local-first PR workflow#192
Whiteks1 merged 1 commit intomainfrom
codex/local-first-pr-workflow

Conversation

@Whiteks1
Copy link
Copy Markdown
Owner

@Whiteks1 Whiteks1 commented Mar 27, 2026

Summary

This PR defines a repository-level local-first development workflow for QuantLab.

Changes included:

  • add CONTRIBUTING.md
  • document the preferred local-first slice workflow
  • define the recommended battery-of-commits pattern
  • explain when to push and when to wait
  • align the PR template with the local-first rule
  • link the workflow from README.md

Why

The recent advice to work locally first and push only when the PR is coherent is directionally right for QuantLab.

It does not literally reduce model tokens by itself, but it does reduce:

  • stale remote branches
  • noisy compare screens
  • repeated context reconstruction
  • low-quality half-formed PRs

That makes the repo easier to operate and keeps the development workflow aligned with QuantLab's slice-based style.

Scope

This PR does not:

  • change CI
  • enforce merge strategy through branch protection
  • rewrite historical PRs

It focuses only on documenting the preferred workflow and aligning repo guidance with it.

Validation

Validated with:

  • git diff --check

Notes

  • the workflow includes one important exception: longer or riskier work can still be pushed early when remote backup or coordination matters
  • the goal is not process overhead; the goal is to keep QuantLab easy to reason about as the product surface grows

Closes #191

Summary by Sourcery

Document a local-first, slice-oriented contribution workflow and align repository guidance with it.

Enhancements:

  • Update the pull request template to encourage opening PRs after a coherent local battery of commits in line with the local-first workflow.

Documentation:

  • Add CONTRIBUTING.md describing the preferred local-first slice workflow, commit patterns, PR conventions, and merge practices.
  • Link the new contribution workflow from the README to guide contributors to the documented process.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 27, 2026

Reviewer's Guide

Documents a local-first, slice-oriented contribution workflow for QuantLab by adding a CONTRIBUTING guide, aligning the PR template, and linking the workflow from the README.

Flow diagram for deciding when to push early vs follow local-first rule

flowchart TD
  A[Start new QuantLab slice] --> B[Work locally on changes]
  B --> C[Do you have a coherent slice with validation and PR body?]
  C -->|Yes| D[Push branch to origin]
  D --> E[Open focused PR]
  E --> F[Review and merge]
  F --> G[Let branch be deleted and clean up locals]

  C -->|No| H[Is there a good reason to push early?]
  H -->|Yes: multi-session, risky, collaborative, stacked| I[Push early]
  I --> J[Optionally open draft PR if useful for coordination]
  J --> B

  H -->|No| K[Continue working locally]
  K --> B
Loading

File-Level Changes

Change Details Files
Document and standardize the local-first slice-based contribution workflow, including commit patterns, push timing, PR expectations, and merge style.
  • Introduce CONTRIBUTING.md describing preferred slice shape, local-first development rule, recommended battery-of-commits pattern, and when to push early.
  • Define PR structure and expectations (Summary/Why/Scope/Validation/Notes), including guidance on issue closures and integration PR behavior.
  • Recommend squash-and-merge as the default merge style, with rationale and exceptions, plus guidance for post-merge branch cleanup.
CONTRIBUTING.md
Align repo-facing documentation with the new contribution workflow.
  • Link CONTRIBUTING.md from README under a new Contribution workflow section so contributors can discover the workflow.
  • Update the PR template Notes section to prefer opening PRs only after a coherent local battery of commits for standard slices, clarifying behavior for stacked/integration work.
README.md
.github/pull_request_template.md

Assessment against linked issues

Issue Objective Addressed Explanation
#191 Document a local-first development workflow for QuantLab slices, including a recommended battery-of-commits pattern, guidance on when to push vs wait, and an exception for long-running or risky work.
#191 Align repository documentation (README) and the PR template guidance with the new local-first workflow.

Possibly linked issues


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

Copy link
Copy Markdown

@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 - I've reviewed your changes and they look great!


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.

@Whiteks1 Whiteks1 merged commit 2482181 into main Mar 27, 2026
2 checks passed
@Whiteks1 Whiteks1 deleted the codex/local-first-pr-workflow branch March 27, 2026 22:52
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.

Docs: define local-first PR workflow for QuantLab slices

1 participant