docs: add mandatory branch/PR workflow rules#1
Merged
Conversation
Locks the rule that no work goes directly to main. Every unit of work must branch from latest main, commit there, update .agent-plan.md in the same PR, and open a GitHub PR. Also installs a git pre-push hook (.git/hooks/pre-push) that mechanically blocks any push targeting main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds explicit “Branch & PR Workflow” rules to the repo’s agent-facing documentation and updates the agent plan to reflect the new workflow constraints.
Changes:
- Adds a mandatory Branch & PR Workflow section at the top of
CLAUDE.md. - Updates
.agent-plan.mdcurrent-state text to mention the workflow rules and their enforcement.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
CLAUDE.md |
Documents mandatory branching/PR workflow rules, including “never push to main”. |
.agent-plan.md |
Updates current system state to reference the new workflow rules and claimed enforcement mechanism. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Extends the branch/PR workflow in CLAUDE.md with two required steps: apply labels (type + layer taxonomy) and assign to a milestone. Adds the full label taxonomy and a milestone map table to CLAUDE.md. GitHub side: creates 22 labels across type/layer/status groups and 6 milestones (v0.1.0 through v1.0.0) matching the roadmap release gates. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Integrates shaypal5/pr-agent-context@v4 with two workflows: - .github/workflows/pr-agent-context.yml Runs on pull_request (opened/synchronize/reopened). Calls the reusable workflow in ci mode with publish_mode=append and include_outdated_review_threads=true so stale-but-unresolved threads always appear in the generated agent context comment. Coverage artifacts are collected under the pr-agent-context-coverage prefix for use by the refresh flow via cross-run lookup. - .github/workflows/pr-agent-context-refresh.yml Triggered by pull_request_review, pull_request_review_comment, and completed non-Actions check_run events. Runs in refresh mode with publish_mode=append (new comment per refresh, previous managed comments hidden), wait_for_reviews_to_settle=true, and enable_cross_run_coverage_lookup=true to reuse coverage artifacts from the CI run on the same head SHA. Both workflows explicitly set include_outdated_review_threads=true per project configuration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment has been minimized.
This comment has been minimized.
- CLAUDE.md: scope the force-push prohibition to `main` explicitly (`git push --force origin main`) and add a note clarifying that the local pre-push hook is a personal convenience, not a versioned repo-wide enforcement; GitHub branch protection is the team-level guard - .agent-plan.md: correct state description to say "local convenience hook (not versioned) and GitHub branch protection" instead of implying the hook is a reliable repo-wide mechanism Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
pr-agent-context report: This run includes unresolved review comments on PR #1.
For each unresolved review comment, recommend one of: resolve as irrelevant, accept and implement
the recommended solution, open a separate issue and resolve as out-of-scope for this PR, accept and
implement a different solution, or resolve as already treated by the code.
After I reply with my decision per item, implement the accepted actions, resolve the corresponding
PR comments, and push all of these changes in a single commit.
# Copilot Comments
## COPILOT-1
Location: .agent-plan.md
URL: https://github.com/leadforge-dev/leadforge/pull/1#discussion_r3104702550
Status: outdated
Root author: copilot-pull-request-reviewer
Comment:
The statement that the workflow is “enforced via `.git/hooks/pre-push`” is misleading/inaccurate in a repo context: `.git/hooks` isn’t versioned/cloned for other developers, and this PR doesn’t add any tracked hook script that would be installed automatically. Consider replacing this with a versioned hooks directory (and documented `core.hooksPath` setup), or describing enforcement via GitHub branch protection/CI checks instead of `.git/hooks`.
## COPILOT-2
Location: CLAUDE.md
URL: https://github.com/leadforge-dev/leadforge/pull/1#discussion_r3104702559
Status: outdated
Root author: copilot-pull-request-reviewer
Comment:
The examples list `git push --force` without specifying `main`, but the sentence is about commands that target `main` directly. As written, it can be read as banning force-pushes to any branch; if the intent is only to block pushes to `main`, consider tightening the wording/examples to explicitly include `main` (or split into two rules: no pushes to `main`, and separate guidance on force-push usage).
~~~suggestion
Never use `git push origin main`, `git push --force origin main`, or any variant that targets `main` directly.
~~~
## COPILOT-3
Location: .github/workflows/pr-agent-context.yml:14
URL: https://github.com/leadforge-dev/leadforge/pull/1#discussion_r3104738699
Root author: copilot-pull-request-reviewer
Comment:
This workflow calls a third-party reusable workflow pinned only to the `v4` tag. For supply-chain security and reproducibility, pin `uses:` to an immutable commit SHA (and optionally keep a comment noting the corresponding release tag).
~~~suggestion
uses: shaypal5/pr-agent-context/.github/workflows/pr-agent-context.yml@<FULL_40_CHAR_COMMIT_SHA_FOR_V4> # v4
~~~
## COPILOT-4
Location: .github/workflows/pr-agent-context-refresh.yml:39
URL: https://github.com/leadforge-dev/leadforge/pull/1#discussion_r3104738714
Root author: copilot-pull-request-reviewer
Comment:
This workflow calls a third-party reusable workflow pinned only to the `v4` tag. For supply-chain security and reproducibility, pin `uses:` to an immutable commit SHA (and optionally keep a comment noting the corresponding release tag).
~~~suggestion
uses: shaypal5/pr-agent-context/.github/workflows/pr-agent-context.yml@<FULL_40_CHAR_COMMIT_SHA_FOR_V4> # v4
~~~Run metadata: |
shaypal5
added a commit
that referenced
this pull request
May 1, 2026
Review feedback addressed: - Remove primary_task/label_window_days as explicit kwargs from resolve_config() and Generator.from_recipe() — these fields are resolved from recipe YAML and override dict only, not casually overridable, since the generation pipeline doesn't yet support arbitrary task types (Copilot-1, Copilot-3, shaypal5 #1, #2) - Add label_window_days <= horizon_days validation in GenerationConfig.__post_init__ (Copilot-2, shaypal5 #3) - Add tests for invalid primary_task on GenerationConfig: empty string, non-string type (shaypal5 #6, pr-agent-context) - Add tests for invalid label_window_days on Recipe.from_dict: bool, non-positive, float (shaypal5 #7, pr-agent-context) - Add test for label_window_days > horizon_days rejection - Fix existing test using horizon_days=30 (now conflicts with default label_window_days=90) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
shaypal5
added a commit
that referenced
this pull request
May 1, 2026
* feat: carry primary_task and label_window_days into WorldSpec for dataset card Add `primary_task` and `label_window_days` fields to `GenerationConfig` (with defaults preserving current behavior). Propagate through `Recipe.from_dict()`, `resolve_config()`, and `Generator.from_recipe()` so recipe YAML can override them. Update `render_dataset_card()` to read from `world_spec.config` instead of hard-coded string literals. Closes #6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: update .agent-plan.md for WorldSpec task fields (PR #36) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: address review feedback — tighten scope, add validation + tests Review feedback addressed: - Remove primary_task/label_window_days as explicit kwargs from resolve_config() and Generator.from_recipe() — these fields are resolved from recipe YAML and override dict only, not casually overridable, since the generation pipeline doesn't yet support arbitrary task types (Copilot-1, Copilot-3, shaypal5 #1, #2) - Add label_window_days <= horizon_days validation in GenerationConfig.__post_init__ (Copilot-2, shaypal5 #3) - Add tests for invalid primary_task on GenerationConfig: empty string, non-string type (shaypal5 #6, pr-agent-context) - Add tests for invalid label_window_days on Recipe.from_dict: bool, non-positive, float (shaypal5 #7, pr-agent-context) - Add test for label_window_days > horizon_days rejection - Fix existing test using horizon_days=30 (now conflicts with default label_window_days=90) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLAUDE.mdas the first section (before all other rules), locking the rule that no work goes directly tomain.git/hooks/pre-pushto mechanically block any push targetingmain, regardless of who or what triggers it.agent-plan.mdto reflect that these workflow rules are now lockedWorkflow rules locked
git checkout main && git pullbefore starting any workgit checkout -b <descriptive-branch-name>— always branch from latest main.agent-plan.mdto reflect state after the PR merges; commit to same branchmaindirectlyEnforcement layers
CLAUDE.md— read by Claude at session start.git/hooks/pre-push— blocks push tomainat git level🤖 Generated with Claude Code