@mars-stack/core 3.0.2 → 4.0.1
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.
package/cursor/manifest.json
CHANGED
|
@@ -305,6 +305,12 @@
|
|
|
305
305
|
"triggers": ["address PR comments", "reply to PR comments", "fix review feedback", "respond to PR review", "reply to comments with fixes", "remedial changes"],
|
|
306
306
|
"dependencies": [],
|
|
307
307
|
"capabilities": ["file-edit", "terminal"]
|
|
308
|
+
},
|
|
309
|
+
"upgrade-scaffold": {
|
|
310
|
+
"file": "skills/mars-upgrade-scaffold/SKILL.md",
|
|
311
|
+
"triggers": ["upgrade mars template", "sync scaffold with upstream", "sync template", "apply template fixes", "pull in ensure-db fix", "upgrade scaffold", "template sync"],
|
|
312
|
+
"dependencies": [],
|
|
313
|
+
"capabilities": ["file-edit", "terminal"]
|
|
308
314
|
}
|
|
309
315
|
}
|
|
310
316
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Skill: Upgrade Mars scaffold (template sync)
|
|
2
|
+
|
|
3
|
+
Apply upstream template fixes to an existing Mars project without regenerating the app. Use when the user wants to pull in fixes for ensure-db, auth verify page, signup route, or other scaffold plumbing.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
Use this skill when:
|
|
8
|
+
- The user asks to **upgrade mars template**, **sync scaffold with upstream**, **apply template fixes**, or **pull in ensure-db / verify page / signup fixes**
|
|
9
|
+
- The project was scaffolded earlier and is missing fixes that landed in the Mars template (e.g. Strict Mode verify page, AUTO_VERIFY_EMAIL for localhost, ensure-db portable DB check)
|
|
10
|
+
- The user says they cannot upgrade via CLI because `mars upgrade` only updates npm packages
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
- Confirm the project is a Mars scaffold: `package.json` has `"mars": true` and dependencies on `@mars-stack/core` and/or `@mars-stack/ui`.
|
|
15
|
+
- **Source of truth for the plan:** [docs/exec-plans/active/scaffold-template-sync-upgrade.md](https://github.com/greaveselliott/mars/blob/main/docs/exec-plans/active/scaffold-template-sync-upgrade.md) (or the same path in the Mars monorepo if you have it).
|
|
16
|
+
|
|
17
|
+
## Allowlisted “plumbing” paths (safe to overwrite with template version)
|
|
18
|
+
|
|
19
|
+
Only these paths are candidates for **verbatim replace** from the upstream template. Do **not** overwrite user-owned files (e.g. `src/config/app.config.ts`, feature code the user added, or files outside this list) without explicit user approval.
|
|
20
|
+
|
|
21
|
+
| Path (relative to project root) | Purpose |
|
|
22
|
+
|---------------------------------|---------|
|
|
23
|
+
| `scripts/ensure-db.mjs` | Dev DB provisioning; portable DB ping, prisma generate + push |
|
|
24
|
+
| `src/app/(auth)/verify/page.tsx` | Verify email page; dev link must survive Strict Mode |
|
|
25
|
+
| `src/app/api/auth/signup/route.ts` | Signup; AUTO_VERIFY_EMAIL + authLogger |
|
|
26
|
+
|
|
27
|
+
If the exec plan or a future manifest adds more paths, follow that list. When in doubt, **propose a diff** and let the user approve before writing.
|
|
28
|
+
|
|
29
|
+
## Step-by-Step
|
|
30
|
+
|
|
31
|
+
1. **Confirm Mars project** — Check `package.json` for `"mars": true` and `@mars-stack/*` deps. If not present, stop and tell the user this skill applies only to Mars scaffolds.
|
|
32
|
+
|
|
33
|
+
2. **Obtain upstream template** — User must provide the source:
|
|
34
|
+
- **Option A:** Path to the Mars monorepo `template/` (e.g. `../mars/template` or a branch they have checked out).
|
|
35
|
+
- **Option B:** They run `npx @mars-stack/cli create temp-sync --skip-install` in a temp dir and you copy from `temp-sync/` (then they can delete it).
|
|
36
|
+
- Do not assume a path; ask or use the path they give.
|
|
37
|
+
|
|
38
|
+
3. **For each allowlisted path:**
|
|
39
|
+
- If the file does not exist in the project, copy from template.
|
|
40
|
+
- If the file exists, **diff** template version vs project version. If the project file has only template-like content (or user has not clearly customized it), propose replacing with the template version. If the project file has substantial customizations, **show the diff** and ask the user whether to overwrite or merge manually.
|
|
41
|
+
|
|
42
|
+
4. **Never overwrite without user approval** when:
|
|
43
|
+
- The file is not in the allowlist above.
|
|
44
|
+
- The file contains user-specific config (e.g. `app.config.ts` feature flags, theme, URLs).
|
|
45
|
+
- You are unsure; in that case, output the diff and ask.
|
|
46
|
+
|
|
47
|
+
5. **After applying changes:**
|
|
48
|
+
- Run `yarn db:push` (or `npm run db:push`) if `scripts/ensure-db.mjs` or any Prisma-related path was updated.
|
|
49
|
+
- Suggest running `yarn dev` to confirm the app starts and auth flow works.
|
|
50
|
+
|
|
51
|
+
## Verification
|
|
52
|
+
|
|
53
|
+
- [ ] Project is a Mars scaffold
|
|
54
|
+
- [ ] Only allowlisted plumbing paths were modified (or user explicitly approved others)
|
|
55
|
+
- [ ] Diff was shown for any overwrite of an existing file
|
|
56
|
+
- [ ] `yarn build` or at least `yarn dev` runs after changes (user can confirm)
|
|
57
|
+
- [ ] If ensure-db was updated, user knows to use `yarn dev` (not raw `next dev`) so the script runs
|
|
58
|
+
|
|
59
|
+
## Checklist
|
|
60
|
+
|
|
61
|
+
- [ ] Confirmed `package.json` has `mars: true` and `@mars-stack/*` deps
|
|
62
|
+
- [ ] Obtained template source path from user or instructions
|
|
63
|
+
- [ ] For each allowlisted file: compared, proposed replace or left as-is with reason
|
|
64
|
+
- [ ] No overwrite of app.config, user features, or unlisted paths without approval
|
|
65
|
+
- [ ] Post-change: suggested `yarn db:push` if needed and `yarn dev` smoke test
|
|
66
|
+
|
|
67
|
+
## Related
|
|
68
|
+
|
|
69
|
+
- **Exec plan:** [scaffold-template-sync-upgrade](https://github.com/greaveselliott/mars/blob/main/docs/exec-plans/active/scaffold-template-sync-upgrade.md) — full problem statement, CLI track (future), and task list. In the Mars monorepo the path is `docs/exec-plans/active/scaffold-template-sync-upgrade.md`.
|
|
70
|
+
- **Local-first dev:** Template `AGENTS.md` and [local-first-development](https://github.com/greaveselliott/mars/blob/main/docs/design-docs/local-first-development.md): embedded DB, ensure-db, AUTO_VERIFY_EMAIL.
|