Skip to content

docs: clarify goals, plans, and package maintenance#86

Merged
gaelic-ghost merged 4 commits into
mainfrom
docs/clarify-goals-plans
Jun 6, 2026
Merged

docs: clarify goals, plans, and package maintenance#86
gaelic-ghost merged 4 commits into
mainfrom
docs/clarify-goals-plans

Conversation

@gaelic-ghost

@gaelic-ghost gaelic-ghost commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • clarify CodexThread goal and plan documentation
  • add maintainer notes for thread goal and companion plan behavior
  • sync Swift package guidance, Codex local actions, and repo-maintenance release scripts

Verification

  • bash scripts/repo-maintenance/validate-all.sh
  • swift build
  • swift test
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added Swift Package Manager workflow environment and configuration support.
    • Enhanced release workflow with improved GitHub release metadata verification and remote CI pacing controls.
  • Documentation

    • Added Swift Package Workflow guidance to repository documentation.
    • Clarified distinctions between goals, plans, and collaboration modes in conceptual documentation.
  • Chores

    • Updated validation workflow to macOS with enhanced toolchain reporting.
    • Refined release process configuration for improved timing and synchronization.

@gaelic-ghost gaelic-ghost added the documentation Improvements or additions to documentation label Jun 6, 2026
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@gaelic-ghost, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 44 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f845b85e-1dfc-440d-b9e5-b67ee1211549

📥 Commits

Reviewing files that changed from the base of the PR and between ef67c89 and f0119d5.

📒 Files selected for processing (3)
  • .github/workflows/validate-repo-maintenance.yml
  • docs/maintainers/thread-plan-goal-companion-plan.md
  • scripts/repo-maintenance/release.sh
📝 Walkthrough

Walkthrough

This PR enhances repository release automation with configurable remote CI orchestration, adds Swift Package Codex environment support, updates developer validation tooling, and clarifies conceptual boundaries between Goals and Plans in documentation.

Changes

Release Automation and Swift Package Support

Layer / File(s) Summary
Swift Package Codex Environment
.codex/environments/swift-package.toml
New Codex environment configuration for Swift packages with setup script (swift package resolve) and actions for resolve, build, and test commands.
Developer Validation and Workflow Guidance
.github/workflows/validate-repo-maintenance.yml, AGENTS.md
CI validation now runs on macOS with Xcode/Swift tooling diagnostics, installs SwiftFormat and SwiftLint, and documentation describes Swift Package workflow conventions, release boundaries, and resource/fixture handling.
Release Automation Helper Functions
scripts/repo-maintenance/lib/common.sh
Adds utilities for environment-configured timeout/poll parsing, semver prerelease tag detection and GitHub flag mapping, prerelease metadata verification, and polling-based waiters for remote branch/tag/release availability with configurable timeouts and die failure on timeout.
Release Configuration and Flow Refactoring
scripts/repo-maintenance/config/release.env, scripts/repo-maintenance/release.sh, scripts/repo-maintenance/release/30-push-release.sh, scripts/repo-maintenance/release/40-github-release.sh
Release configuration introduces REPO_MAINTENANCE_REMOTE_CI_MODE (full/defer) and GitHub wait defaults. Main release script adds remote CI mode validation, refactors sequence to push branch/PR first, waits for initial check discovery, polls for PR review/comment readiness, and optionally defers in defer mode. Push and GitHub release scripts wait for remote synchronization and validate prerelease metadata after creation.
Goals and Plans Conceptual Clarity
Sources/SwiftASB/SwiftASB.docc/CodexThread.md, docs/maintainers/thread-plan-goal-companion-plan.md
Refines documentation to distinguish Goals (durable objectives), Plans (working checklists), and plan collaboration mode (cadence flow), and clarifies that goal creation and mutation remain explicit user/host actions, not automatic from plan completion.

Sequence Diagram(s)

The Release Workflow Orchestration diagram above visualizes the updated release sequence: version bump → branch/PR setup → wait for initial CI checks → optional deferral point → CI watch and review gates → merge → tag creation → GitHub release with prerelease verification.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

enhancement

Poem

🐰 Release flows now pause and wait,
With branch and tag in sync state,
Swift packages find their home so neat,
While Goals and Plans stay clean and sweet!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title comprehensively captures the main theme of the PR—clarifying documentation around goals, plans, and package maintenance—matching the core changes across documentation files and maintenance scripts.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/clarify-goals-plans

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef67c89e74

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 387 to +390
git -C "$REPO_ROOT" pull --ff-only origin "$base_branch"
log "Fast-forwarded local $base_branch."
else
warn "Could not check out local $base_branch, likely because another worktree owns it. Fast-forward $base_branch from origin/$base_branch in that checkout before cleanup."
die "Could not check out local $base_branch, likely because another worktree owns it. Fast-forward $base_branch from origin/$base_branch in that checkout, then rerun release.sh so the release tag is created from the reviewed base branch."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle multi-worktree releases before merging

When main is checked out in another worktree, this new hard failure happens after gh pr merge has already merged the release PR and deleted the remote branch, but before the tag is created. The suggested rerun path cannot recover cleanly because standard mode refuses to run from main, and rerunning from the release branch will try to push/recreate a PR for commits already merged. Either verify that $base_branch can be checked out before merging, or create the tag from the fetched origin/$base_branch without needing to switch worktrees.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in 5480734. The release flow now preflights local base-branch checkout before merging, so multi-worktree ownership fails while the PR is still recoverable.

Comment on lines 458 to +460
run_version_bump
ensure_clean_worktree
run_local_release_gate
ensure_clean_worktree
create_release_tag
push_branch_and_tag "$branch_name"
push_release_branch "$branch_name"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the local live release gate

Standard releases now go straight from validate-all.sh and the version bump to pushing the release branch, so the maintained scripts/run-live-codex-release-gate.sh is never invoked before CI/merge/tagging. I checked the repo and that gate still exists, and CONTRIBUTING.md still documents standard release as running the full local release gate; the GitHub validation workflow only runs validate-all.sh, so this lets releases be tagged without the opt-in live Codex probes that previously guarded release candidates.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in 5480734. Standard release mode restores the local live release gate and keeps the explicit skip flag for intentional resumes.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/validate-repo-maintenance.yml (1)

15-15: macos-26 runner label is available; no availability-driven failure risk

macos-26 is a currently generally available GitHub-hosted runner label, so the validate job should start normally. If you don’t need to pin a specific macOS/Xcode version, prefer macos-latest (which currently tracks the macos-26 image).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/validate-repo-maintenance.yml at line 15, The workflow
uses a pinned runner label "macos-26" which is available but unnecessary; update
the validate job's runs-on value (the "runs-on" entry) from "macos-26" to
"macos-latest" unless you intentionally need a fixed macOS/Xcode image, so the
job tracks the latest macOS runner instead of a specific image.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/validate-repo-maintenance.yml:
- Line 18: Update the checkout step that currently uses
"actions/checkout@v6.0.2" to pin the action to the specific commit
"de0fac2e4500dabe0009e67214ff5f5447ce83dd" (use
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd) and add a with block
setting "persist-credentials: false" to limit token scope for subsequent steps;
modify the step that references actions/checkout@v6.0.2 accordingly (replace the
uses line and add the with: persist-credentials: false entry).

In `@docs/maintainers/thread-plan-goal-companion-plan.md`:
- Around line 61-63: Tighten the sentence that reads "whether or not plan
collaboration mode is active" by replacing "whether or not" with "whether" for
cleaner phrasing; locate the sentence containing "A Codex Plan is the current
working checklist..." (the paragraph mentioning goal vs plan and plan
collaboration mode) and update that phrase to "whether plan collaboration mode
is active."

---

Nitpick comments:
In @.github/workflows/validate-repo-maintenance.yml:
- Line 15: The workflow uses a pinned runner label "macos-26" which is available
but unnecessary; update the validate job's runs-on value (the "runs-on" entry)
from "macos-26" to "macos-latest" unless you intentionally need a fixed
macOS/Xcode image, so the job tracks the latest macOS runner instead of a
specific image.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5ee617f5-d824-4f70-8daa-5902a44eeebf

📥 Commits

Reviewing files that changed from the base of the PR and between 2e8ccfd and ef67c89.

📒 Files selected for processing (10)
  • .codex/environments/swift-package.toml
  • .github/workflows/validate-repo-maintenance.yml
  • AGENTS.md
  • Sources/SwiftASB/SwiftASB.docc/CodexThread.md
  • docs/maintainers/thread-plan-goal-companion-plan.md
  • scripts/repo-maintenance/config/release.env
  • scripts/repo-maintenance/lib/common.sh
  • scripts/repo-maintenance/release.sh
  • scripts/repo-maintenance/release/30-push-release.sh
  • scripts/repo-maintenance/release/40-github-release.sh

Comment thread .github/workflows/validate-repo-maintenance.yml Outdated
Comment thread docs/maintainers/thread-plan-goal-companion-plan.md Outdated
@gaelic-ghost gaelic-ghost merged commit 20ebe92 into main Jun 6, 2026
2 checks passed
@gaelic-ghost gaelic-ghost deleted the docs/clarify-goals-plans branch June 6, 2026 20:24

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0119d5869

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AGENTS.md
- Use `swift-package-testing-workflow` for Swift Testing, XCTest holdouts, `.xctestplan`, fixtures, and package test diagnosis.
- Use `scripts/repo-maintenance/validate-all.sh` for local maintainer validation and `scripts/repo-maintenance/sync-shared.sh` for repo-local sync steps.
- Use `scripts/repo-maintenance/release.sh --mode standard --version vX.Y.Z` from a feature branch or worktree only when the task is actually a protected-main release, publish, merge, tag, or release-PR preparation.
- Do not run the standard release workflow from `main`; when a protected-main release is explicitly requested, let it validate, bump versions, tag, push the branch and tag, open the release PR, watch CI, address valid PR comments or record out-of-scope concerns in `ROADMAP.md`, merge to protected `main`, fast-forward local `main`, and clean up stale branches.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Align the agent release steps with release.sh

This newly added guidance tells agents to tag and push the tag before opening the release PR, but the same commit changed scripts/repo-maintenance/release.sh so standard releases create and push the tag only after CI/review, merge, and local fast-forward (run_standard_release now calls merge_pr, fast_forward_base_branch, then create_release_tag/push_release_tag). For protected-main releases where an agent follows AGENTS.md instead of just invoking the script, this reintroduces pre-review tags that the script is explicitly avoiding; update this sequence to match the post-merge tagging flow.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot mentioned this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant