feat(templates): /trellis-template command + web-app template#16
Merged
Conversation
Replace the `/trellis-install --template <name>` flag with a dedicated `/trellis-template` command (list with no arg, apply with a name). Applying an opt-in, per-repo bundle is a distinct action from the one-time base install; the flag conflated the two. The owned/seed split, the registry (.trellis-templates / .trellis-owned-<name>), and `/trellis-update` maintenance are unchanged - only the apply entry point moves. Add the web-app template: Next.js 16 (App Router), TypeScript strict, Tailwind CSS v4, and the @rogueoak/canopy design system. The conventions doc is owned (refreshed on update); the starter config is seed (copied once), so updates never clobber the consumer's app. Removing a shipped flag is breaking; this ships as 1.0.0. Refs docs/specs/0006-web-app-template.md, docs/plans/0006-web-app-template.md Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mattmaynes
commented
Jun 28, 2026
mattmaynes
commented
Jun 28, 2026
mattmaynes
commented
Jun 28, 2026
mattmaynes
commented
Jun 28, 2026
mattmaynes
commented
Jun 28, 2026
mattmaynes
commented
Jun 28, 2026
mattmaynes
commented
Jun 28, 2026
…oots Address PR #16 review: - tester (major): the apply/list logic lived as prose in SKILL.md, untestable by CI. Extract it to a shipped script, trellis/scripts/template.sh (list/apply/refresh), called by both /trellis-template and /trellis-update so the copy/registry logic has one tested home and cannot drift. Add template.test.sh (22 cases) and wire it into CI. - security (minor): guard the template name charset ([A-Za-z0-9_-]) before any path use, closing a ../-traversal write. - engineer/architect/tester (minor): remove the dead `before=$(find ...)` and implement a real "seed kept" report; restore the dropped touch of .trellis-templates. - portability bug found while testing: BSD cp -Rn exits non-zero when it skips an existing file, failing apply under set -e on a re-apply (macOS). Replace with a portable per-file seed copy. Also add the @rogueoak/roots design foundation to the web-app template (imported before canopy in globals.css; deps, conventions, and READMEs updated). Capture the lessons in docs/feedback/0007 and docs/overview/learnings.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
Review addressed (4cb1656)All seven persona comments resolved:
Also found and fixed while writing the test: BSD Separately, added the Local CI-equivalent: all four test suites green (compliance 20, bump-version 22, whats-new 10, template 22), compliance pass clean, |
Merged
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
/trellis-install --template <name>flag with a dedicated/trellis-templatecommand (list with no arg, apply with<name>). Applying an opt-in, per-repo bundle is a distinct action from the one-time base install; the flag conflated the two.owned//seed/split, the registry (.trellis-templates/.trellis-owned-<name>), and/trellis-updatemaintenance are unchanged - only the apply entry point moves. No backward-compat path for the old flag (clean break).@rogueoak/canopy. The conventions doc isowned/(refreshed on update); the starter config isseed/(copied once), so updates never clobber the consumer's app.Removing a shipped flag is breaking, so this ships as 1.0.0 after merge.
Verification
/trellis-templateapplies both web-app and plugin-release into a scratch repo (owned clobbers, seedcp -Rnnever clobbers, registry dedupes);/trellis-updaterefreshes owned and leaves seed untouched.check-compliance.test.sh(20),bump-version.test.sh(22),whats-new.test.sh(10);bump-version.sh --checkin sync; plugin-release dogfood diff clean; compliance pass clean; all JSON valid.--templatereferences remain in shipped code/docs (only historical spec/plan/0.4.0-note).Spec / Plan
docs/specs/0006-web-app-template.mddocs/plans/0006-web-app-template.md🤖 Generated with Claude Code