@timelesscms-com/mcp-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: tcms-redesign-branch
3
+ description: Use when the user asks to redesign, modernize, or restructure a TimelessCMS site (or a section of it). Forces branch-isolated work so the live site stays untouched until the redesign is approved.
4
+ ---
5
+
6
+ # Redesign a site without breaking the live one
7
+
8
+ Site-wide changes are exactly where copy-on-write branches earn their
9
+ keep. This skill enforces the discipline: every redesign happens on a
10
+ branch, preview-checked end-to-end, merged only after user sign-off.
11
+
12
+ ## Recipe
13
+
14
+ ### 1. Discover (always)
15
+
16
+ ```
17
+ get_site
18
+ read_site_settings
19
+ read_partial partial_id="header"
20
+ read_partial partial_id="footer"
21
+ list_pages limit=20
22
+ batch_read_pages page_ids=[<top 3-5 pages>] # see actual conventions
23
+ list_partials # what free blocks exist
24
+ list_collections # any data we need to consider
25
+ ```
26
+
27
+ Write the user a short read-back: *"This is a 12-page agency site
28
+ using CSS variables, primary color #1e40af, Inter heading + Source
29
+ Sans body. Existing pages are content-dense, single-column. Main nav
30
+ has 5 items including a CTA. I'd suggest..."*
31
+
32
+ Confirm direction before touching anything.
33
+
34
+ ### 2. Create a branch
35
+
36
+ ```
37
+ create_branch name="<descriptive name>"
38
+ ```
39
+
40
+ Save the response's `id` — pass it as `version=<id>` on every
41
+ subsequent call. Branches default `robots_blocked: true` so a
42
+ half-finished redesign won't be indexed.
43
+
44
+ ### 3. Iterate on the branch
45
+
46
+ For each redesign step:
47
+
48
+ a. Make the change with `?version=<branch-id>`. Updates here don't
49
+ touch main:
50
+
51
+ ```
52
+ update_partial partial_id="header" patch={...} version="<branch>"
53
+ update_page page_id=home patch={...} version="<branch>"
54
+ ```
55
+
56
+ b. Preview after every meaningful change:
57
+
58
+ ```
59
+ get_preview_link page_id=home version="<branch>"
60
+ ```
61
+
62
+ Send the URL to the user. The preview navigates the whole branch
63
+ from one mint.
64
+
65
+ c. Iterate on feedback. Common rounds: headline tightening, color
66
+ tweaks, swapping hero images.
67
+
68
+ ### 4. Site-wide changes through partials, not pages
69
+
70
+ If the redesign touches every page (e.g. new global header, new
71
+ footer, new CTA bar) — edit a partial, not 23 pages. Before editing a
72
+ shared block, check the blast radius:
73
+
74
+ ```
75
+ find_pages_using_block partial_id="header" version="<branch>"
76
+ ```
77
+
78
+ This returns every page that would show the change. Communicate that
79
+ to the user before the save.
80
+
81
+ ### 5. Bulk content cleanups via dry-run first
82
+
83
+ If the redesign requires content rewrites (e.g. "remove every mention
84
+ of the old company name"), use the bulk tool with dry-run:
85
+
86
+ ```
87
+ search_pages contains="OldCo" version="<branch>"
88
+ bulk_replace_text pattern="OldCo" replacement="NewCo" dry_run=true version="<branch>"
89
+ # Show the user the sample_diffs
90
+ bulk_replace_text pattern="OldCo" replacement="NewCo" dry_run=false version="<branch>"
91
+ ```
92
+
93
+ ### 6. Approval round
94
+
95
+ Send the user a final preview link:
96
+
97
+ ```
98
+ get_preview_link page_id=home version="<branch>" ttl_seconds=86400
99
+ ```
100
+
101
+ The 24h TTL gives them time to share with stakeholders. Wait for an
102
+ explicit "looks good, ship it."
103
+
104
+ ### 7. Merge + deploy
105
+
106
+ ```
107
+ merge_branch version_id="<branch>" # branch's diffs land on main
108
+ trigger_deploy
109
+ get_deploy_status job_id=<id> # poll until succeeded
110
+ ```
111
+
112
+ Optionally, after a successful deploy:
113
+
114
+ ```
115
+ delete_branch version_id="<branch>" # tidy up
116
+ ```
117
+
118
+ (You can also leave the branch around as a record of the redesign;
119
+ disk cost is tiny.)
120
+
121
+ ## Pitfalls
122
+
123
+ - **Forgetting `version=` on writes.** Every call you make on the
124
+ branch must include `version=<branch-id>`. A missing one writes
125
+ straight to main — silent and bad.
126
+ - **Skipping discovery.** "Modernize" without first reading the site
127
+ produces a confidently-out-of-place result. Always sample existing
128
+ pages.
129
+ - **Editing the in-portal preview URL by mistake.** That's the user's
130
+ own preview, not yours. `get_preview_link` returns a signed
131
+ external URL — always use that for sharing.
132
+ - **Auto-merge.** Don't `merge_branch` without explicit user sign-off.
133
+ Once merged, the only undo is another branch + reverse edits.
134
+ - **Header rewrites that drop the brand block.** Even when the
135
+ redesign is dramatic, preserve the brand mark + the nav skeleton
136
+ unless the user said to redo them.
137
+
138
+ ## When to NOT use a branch
139
+
140
+ Tiny edits — "fix the typo on the About page" — don't need a branch.
141
+ The in-portal chat handles those directly on main. This skill is for
142
+ work where:
143
+
144
+ - The user might want to walk away mid-redesign and come back later
145
+ - Multiple changes need to ship together
146
+ - The site is high-traffic and "broken for an hour" is unacceptable
147
+ - Stakeholder review across multiple pages is expected
148
+
149
+ If none of those apply, edit main directly and move on.