Skip to content

Install the agents template on curl and warn when missing - #46

Merged
leogdion merged 2 commits into
mainfrom
45-agents-file-isnt-being-imported
Jul 29, 2026
Merged

Install the agents template on curl and warn when missing#46
leogdion merged 2 commits into
mainfrom
45-agents-file-isnt-being-imported

Conversation

@leogdion

@leogdion leogdion commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Curl install now also fetches AGENTS.md.template into ~/.config/git-trees/AGENTS.md (non-clobbering), so init can seed the container.
  • _seed_agents warns on stderr when the template file is missing instead of silently skipping.
  • Smoke coverage for install.sh, missing-template warnings, and init seed content.

Closes #45.

Test plan

  • tests/smoke.sh
  • shellcheck -s bash git-trees install.sh tests/smoke.sh
  • Follow the README curl install on a clean machine and confirm ~/.config/git-trees/AGENTS.md appears
  • git trees init … writes container AGENTS.md after that install

Made with Cursor

Summary by CodeRabbit

  • New Features

    • Install instructions now include the agents template alongside the command-line tool.
    • Installation creates the required configuration directory and preserves existing template files.
  • Bug Fixes

    • Clear warnings are now shown when no agents template is configured, without preventing successful operation.
    • Template seeding behavior is more reliable and avoids overwriting existing files.
  • Documentation

    • Updated configuration guidance and installation examples to reflect the default template location.

Curl installs previously left TREES_AGENTS_TEMPLATE pointing at a nonexistent
file, so init silently skipped seeding AGENTS.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leogdion leogdion linked an issue Jul 29, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@leogdion, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e4d02e6f-2c0f-45da-b696-21890991e8b8

📥 Commits

Reviewing files that changed from the base of the PR and between 0031f82 and 139f7ee.

📒 Files selected for processing (2)
  • README.md
  • tests/smoke.sh
📝 Walkthrough

Walkthrough

The change makes missing agents templates explicit no-op warnings, verifies exact template seeding across CLI paths, adds install-time template coverage, and updates curl installation and configuration documentation to describe the default template location.

Changes

Agents template flow

Layer / File(s) Summary
Template seeding and missing-template handling
git-trees, tests/smoke.sh, AGENTS.md
Missing templates now produce stderr warnings while preserving successful no-op behavior; smoke guidance and tests verify exact seeding and root --agents behavior.
Installation template distribution
install.sh, README.md, tests/smoke.sh, AGENTS.md
Install and curl instructions seed the default template path, preserve existing templates, and validate executable installation and template contents.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main changes: installing the agents template and warning when it is missing.
Linked Issues check ✅ Passed The changes address the linked issue by importing the agents file during curl install and adding the missing-template warning behavior.
Out of Scope Changes check ✅ Passed The modified files and tests all support the agents template install and warning behavior, with no clear unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 45-agents-file-isnt-being-imported

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.

@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: 3

🤖 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 `@README.md`:
- Around line 125-129: Update the README installation commands for git-trees and
AGENTS.md to use curl -fsSL, guard existing paths with both -e and -L, and
download into temporary files before moving them into place only after a
successful transfer. Preserve occupied paths, including broken symlinks, and
avoid writing outside the intended home-directory destinations.

In `@tests/smoke.sh`:
- Around line 472-475: Update the second install invocation in the smoke test to
capture its exit status and assert that it is zero before validating the
existing AGENTS.md content remains CUSTOM. Keep the preservation assertion and
exact install command contract unchanged.
- Around line 198-206: Update the missing-template smoke tests around the init
and root --agents cases to capture stdout and stderr separately, record each
command’s exit status immediately, and assert the expected success status.
Verify init’s success message on stdout, its missing-template warning on stderr,
and no AGENTS.md output; for root --agents, ensure stdout remains path-only and
warnings are confined to stderr.
🪄 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: c58fe465-efb1-4cbb-a5c6-ddd1824b24b1

📥 Commits

Reviewing files that changed from the base of the PR and between d5902f9 and 0031f82.

📒 Files selected for processing (4)
  • AGENTS.md
  • README.md
  • git-trees
  • tests/smoke.sh

Comment thread README.md Outdated
Comment thread tests/smoke.sh Outdated
Comment thread tests/smoke.sh
Fail-closed curl install (fsSL + temp then mv, occupied-path guards), and
assert exit status with stdout/stderr captured separately in the new tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leogdion
leogdion merged commit ac0e112 into main Jul 29, 2026
4 checks passed
@leogdion
leogdion deleted the 45-agents-file-isnt-being-imported branch July 29, 2026 22:28
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.

Agents File isn't being imported

1 participant