Beta.19 hot-fixes a regression in beta.18 that could overwrite a hand-authoredDocumentation Index
Fetch the complete documentation index at: https://docs.trytrellis.app/llms.txt
Use this file to discover all available pages before exploring further.
AGENTS.md during trellis update.
Bug Fixes
AGENTS.md content no longer clobbered when TRELLIS markers are absent
Beta.18 introduced a <!-- TRELLIS:START --> / <!-- TRELLIS:END --> managed-block replacement for AGENTS.md. The fallback path โ taken when the existing file does not contain the markers โ returned the bare Trellis template, which silently replaced the userโs content during trellis update.
Pre-existing AGENTS.md state | Beta.18 (regressed) | Beta.19 |
|---|---|---|
Has TRELLIS:START / TRELLIS:END | Replace block, keep outside content | Same (unchanged) |
| No markers, hand-authored or pre-beta.18 | Whole file overwritten | User content preserved; managed block appended at the end |
| File does not exist | Write fresh template | Same (unchanged) |
buildAgentsMdTemplate (packages/cli/src/commands/update.ts); the new fallback extracts the managed block from the canonical template via getTrellisManagedBlock and appends it after the existing content with a blank line separator. Recovery for projects that already lost content: git checkout <pre-update-commit> -- AGENTS.md and rerun trellis update on beta.19.
Test coverage
Added#4d preserves user AGENTS.md without TRELLIS markers by appending the managed block in packages/cli/test/commands/update.integration.test.ts. The previous suite covered the legacy-pristine (#4b) and user-modified-managed-block (#4c) cases but missed the no-markers-at-all case where the regression was hiding.
Upgrade
Existing projects:--migrate flag is required for this beta.