@se-studio/skills 1.7.4 → 1.7.5
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/references/agent-session/customer-agents-block.md +1 -0
- package/references/agent-session/local-env.md +82 -0
- package/references/agent-session/projects.registry.json +22 -0
- package/references/deps-update/projects.registry.json +10 -0
- package/skills/site-workflows-agent-session/SKILL.md +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.7.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6b53e51: Document worktree `.env.local` handling: canonical store at `~/source/local-env`, no-clobber seed after `git worktree add`, 1Password as backup only (never overwrite). Seed catalogs the store, never writes through dest symlinks, and is invoked with `pnpm --dir ~/source/se/se-core-product`.
|
|
8
|
+
|
|
3
9
|
## 1.7.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -53,6 +53,7 @@ Never hand-edit `package.json` dependency versions.
|
|
|
53
53
|
- **Git worktree required** for all feature work — do not implement on the primary `develop` checkout
|
|
54
54
|
- Path: registry `worktreesRoot` / `<feature-slug>` (see se-core-product `packages/skills/references/agent-session/projects.registry.json`)
|
|
55
55
|
- Create: `git worktree add <worktreesRoot>/<feature-slug> -b feature/<scope>/<slug> origin/develop`
|
|
56
|
+
- Then seed env: `pnpm --dir ~/source/se/se-core-product local-env seed --project <key>` (no-clobber copy of `.env.local`; never invent a stub or symlink at develop)
|
|
56
57
|
- Manifest must set `worktree:`; opt out only if the user says “work in place” / “no worktree” (`worktree_opt_out: true`)
|
|
57
58
|
- CMS edits: `--session <feature-slug>` (isolate cms-edit sessions)
|
|
58
59
|
- Track in-flight work: manifest at `~/source/se/se-core-product/work/active/<feature>.yaml` (or `work/active/` in this repo if core checkout unavailable)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Local env files and git worktrees
|
|
2
|
+
|
|
3
|
+
Gitignored `.env.local` files do **not** copy into a new worktree. Agents then invent a stub file (two keys, missing Contentful, etc.) or symlink at develop and overwrite the canonical secrets.
|
|
4
|
+
|
|
5
|
+
**Canonical doc** for this workflow. Also indexed from `docs/WORKFLOW.md`, `docs/DEVELOPMENT.md`, `AGENTS.md`, and skill `site-workflows-agent-session`.
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
|
|
9
|
+
| Layer | Path | Role |
|
|
10
|
+
|-------|------|------|
|
|
11
|
+
| Canonical | `~/source/local-env/<project-key>/<relative-path>` | Source of truth on disk. Not a git repo. |
|
|
12
|
+
| Develop checkout | registry `path` | Always-on integration branch. `init` copies from here into the store. |
|
|
13
|
+
| Feature worktrees | `worktreesRoot/<slug>` | Independent **copies**. Never a symlink at develop or the store. |
|
|
14
|
+
| 1Password | documents titled `local-env/<project-key>/<relative-path>` | Backup only. Create if missing. Never overwrite an existing item or checkout file. |
|
|
15
|
+
|
|
16
|
+
`localEnvRoot` is set on `projects.registry.json` (`~/source/local-env`).
|
|
17
|
+
|
|
18
|
+
Tracked files are whatever `.env.local` / `.env.*.local` exist on the **develop** checkout (`apps/*/.env.local` and `cms-edit/host/.env.local` included). Nested `experiments/` trees are ignored.
|
|
19
|
+
|
|
20
|
+
The live Highlander repo (`highlander-health-website`, not the 2026 port) is `localEnvExtras` key `highlander-live` in the registry (not the `highlander` 2026 project). `pnpm local-env` catalogs it with the other sites.
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
The script lives in **se-core-product**. From that repo, `pnpm local-env …` is enough. From a customer worktree, always pass `--dir`:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm --dir ~/source/se/se-core-product local-env audit
|
|
28
|
+
pnpm --dir ~/source/se/se-core-product local-env init
|
|
29
|
+
pnpm --dir ~/source/se/se-core-product local-env seed
|
|
30
|
+
pnpm --dir ~/source/se/se-core-product local-env seed --repair-subset --replace-symlinks
|
|
31
|
+
pnpm --dir ~/source/se/se-core-product local-env bootstrap
|
|
32
|
+
pnpm --dir ~/source/se/se-core-product local-env backup
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`--project pointme` limits to one registry key. `--dry-run` prints actions.
|
|
36
|
+
|
|
37
|
+
### After `git worktree add`
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm --dir ~/source/se/se-core-product local-env seed --project <key>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If the worktree file is a **subset** of canonical keys (typical stub), repair:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm --dir ~/source/se/se-core-product local-env seed --project <key> --repair-subset --replace-symlinks
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Subset repair copies the old file to `~/source/local-env/.bak/<project>/<relative-path>` (not next to the checkout file), then writes canonical. It does **not** touch a file that has extra keys (diverged). Production checkouts (`productionPath`) are audited only — never seeded. Default `seed` prints leftover `symlink` / `stub` / `subset` skips so a develop-symlink is not silent.
|
|
50
|
+
|
|
51
|
+
### First-time machine (or after cloning develop)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pnpm --dir ~/source/se/se-core-product local-env bootstrap
|
|
55
|
+
pnpm --dir ~/source/se/se-core-product local-env backup
|
|
56
|
+
pnpm --dir ~/source/se/se-core-product local-env audit
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Rotate a token
|
|
60
|
+
|
|
61
|
+
1. Edit the file in `~/source/local-env/<project>/…` (or edit develop, then `pnpm local-env init` — init will not overwrite an existing store file, so delete or rename the store file first if you mean to refresh it).
|
|
62
|
+
2. `pnpm --dir ~/source/se/se-core-product local-env seed --project <key> --repair-subset` for worktrees that are a subset of the new key set.
|
|
63
|
+
3. `pnpm --dir ~/source/se/se-core-product local-env backup` only creates a **new** 1Password title if missing. To refresh the backup, create a new document or edit the existing one in 1Password by hand — the command will not overwrite.
|
|
64
|
+
|
|
65
|
+
## Agent rules
|
|
66
|
+
|
|
67
|
+
1. After creating a worktree, seed env. Do not hand-write `.env.local`.
|
|
68
|
+
2. If `.env.local` is missing, copy from `~/source/local-env/...` (or run `seed`). Never generate a two-key stub.
|
|
69
|
+
3. If a file exists, leave it. Report `audit` status (`stub` / `subset` / `diverged` / `symlink`) instead of overwriting unless the user asks for `--repair-subset`.
|
|
70
|
+
4. Do not symlink worktree env at develop or `~/source/local-env`.
|
|
71
|
+
5. Do not `op inject` or `op document get` onto an existing checkout file. Restore to a temp path, `diff`, then copy only if the user confirms.
|
|
72
|
+
6. `git worktree remove` deletes that tree’s copy. Canonical + 1Password remain.
|
|
73
|
+
|
|
74
|
+
## Restore from 1Password (manual)
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
op document get --vault Private "local-env/pointme/.env.local" --out-file /tmp/pointme.env.local
|
|
78
|
+
diff -u ~/source/local-env/pointme/.env.local /tmp/pointme.env.local
|
|
79
|
+
# copy only if you intend to replace canonical, then seed
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Older documents titled `Point.me env.local` (and similar, ~2026-03) are **stale** (fewer keys than develop). Do not restore those onto disk.
|
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
"pathPattern": "<worktreesRoot>/<feature-slug>",
|
|
11
11
|
"notes": "Feature work (feature/*) must use a git worktree under the project's worktreesRoot. Primary checkouts stay on integration branches only. Opt out only if the user explicitly says work in place / no worktree in the current conversation."
|
|
12
12
|
},
|
|
13
|
+
"localEnvRoot": "~/source/local-env",
|
|
14
|
+
"localEnvExtras": [
|
|
15
|
+
{
|
|
16
|
+
"key": "highlander-live",
|
|
17
|
+
"displayName": "Highlander Health (live Bond/Netlify)",
|
|
18
|
+
"path": "~/source/customers/highlander/highlander-health-website",
|
|
19
|
+
"worktreesRoot": "~/source/customers/highlander/worktrees",
|
|
20
|
+
"notes": "Live highlander-health-website, not the 2026 port. local-env only; agents still use registry key highlander for 2026 feature work."
|
|
21
|
+
}
|
|
22
|
+
],
|
|
13
23
|
"projects": [
|
|
14
24
|
{
|
|
15
25
|
"key": "se-core-product",
|
|
@@ -91,6 +101,18 @@
|
|
|
91
101
|
"hostedMcp": "cms-edit-hsd",
|
|
92
102
|
"validate": "pnpm validate",
|
|
93
103
|
"notes": "Agents work only in path (develop) + feature worktrees under worktreesRoot. productionPath is human-only — never push production from agents."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"key": "highlander",
|
|
107
|
+
"displayName": "Highlander Health",
|
|
108
|
+
"path": "~/source/customers/highlander/highlander-health-website-2026",
|
|
109
|
+
"worktreesRoot": "~/source/customers/highlander/worktrees",
|
|
110
|
+
"branch": "port-2026",
|
|
111
|
+
"type": "customer",
|
|
112
|
+
"contentfulSpaceId": "bkkox68g99rn",
|
|
113
|
+
"hostedMcp": "cms-edit-highlander",
|
|
114
|
+
"validate": "pnpm check && pnpm type-check && pnpm validate:routes",
|
|
115
|
+
"notes": "New 2026 stack. Integration branch is port-2026 until go-live, then develop/main. Live Bond/Netlify site remains highlander-health-website. cms-edit DNS/OAuth for highlander.content.se.studio is a human gate."
|
|
94
116
|
}
|
|
95
117
|
]
|
|
96
118
|
}
|
|
@@ -78,6 +78,16 @@
|
|
|
78
78
|
"workspace": false,
|
|
79
79
|
"hasPinOverrides": false,
|
|
80
80
|
"notes": "Deps updates run on develop checkout only. Never push production branch; human promotes production-hsd-website."
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"key": "highlander",
|
|
84
|
+
"displayName": "Highlander Health",
|
|
85
|
+
"path": "~/source/customers/highlander/highlander-health-website-2026",
|
|
86
|
+
"branch": "port-2026",
|
|
87
|
+
"validate": "pnpm check && pnpm type-check && pnpm validate:routes",
|
|
88
|
+
"workspace": true,
|
|
89
|
+
"hasPinOverrides": false,
|
|
90
|
+
"notes": "2026 port. Integration branch port-2026 until live; then develop/main."
|
|
81
91
|
}
|
|
82
92
|
]
|
|
83
93
|
}
|
|
@@ -7,7 +7,9 @@ description: "Start and manage agent work sessions across se-core-product and cu
|
|
|
7
7
|
|
|
8
8
|
Orchestrates **where** to work, **where code belongs**, and **how to isolate parallel features**. **Humans only** merge marketing production and core `main` — except **cms-edit-only** customer merges (reference `cms-edit-prod-merge.md`).
|
|
9
9
|
|
|
10
|
-
**Registry:** [`packages/skills/references/agent-session/projects.registry.json`](../../references/agent-session/projects.registry.json) — repo paths, `worktreesRoot`, `productionPath` / `productionBranch`, integration branches, hosted MCP keys
|
|
10
|
+
**Registry:** [`packages/skills/references/agent-session/projects.registry.json`](../../references/agent-session/projects.registry.json) — repo paths, `worktreesRoot`, `productionPath` / `productionBranch`, integration branches, hosted MCP keys, `localEnvRoot`.
|
|
11
|
+
|
|
12
|
+
**Local env / worktrees:** [`local-env.md`](../../references/agent-session/local-env.md) — canonical `~/source/local-env`, no-clobber seed, 1Password backup only.
|
|
11
13
|
|
|
12
14
|
**Manifest template:** [`packages/skills/references/agent-session/manifest.template.yaml`](../../references/agent-session/manifest.template.yaml)
|
|
13
15
|
|
|
@@ -151,9 +153,13 @@ cd <primary_repo> # registry path — develop/dev checkout
|
|
|
151
153
|
git fetch origin
|
|
152
154
|
mkdir -p <worktreesRoot> # from registry, e.g. ~/source/customers/hopskipdrive/worktrees
|
|
153
155
|
git worktree add <worktreesRoot>/<feature-slug> -b <branch> origin/<integration-branch>
|
|
156
|
+
# Script lives in se-core-product — do not run this from a customer worktree
|
|
157
|
+
pnpm --dir ~/source/se/se-core-product local-env seed --project <project_key>
|
|
154
158
|
cd <worktreesRoot>/<feature-slug>
|
|
155
159
|
```
|
|
156
160
|
|
|
161
|
+
`.env.local` is gitignored and does **not** appear in a new worktree. Seed with `pnpm --dir ~/source/se/se-core-product local-env` — do not hand-write a stub and do not symlink at develop. Full rules: [`local-env.md`](../../references/agent-session/local-env.md).
|
|
162
|
+
|
|
157
163
|
| Project key | worktreesRoot |
|
|
158
164
|
|-------------|---------------|
|
|
159
165
|
| `se-core-product` | `~/source/se/worktrees` |
|
|
@@ -163,6 +169,7 @@ cd <worktreesRoot>/<feature-slug>
|
|
|
163
169
|
| `pointme` | `~/source/customers/pointme/worktrees` |
|
|
164
170
|
| `pedestal` | `~/source/customers/pedestal/worktrees` |
|
|
165
171
|
| `hsd` | `~/source/customers/hopskipdrive/worktrees` |
|
|
172
|
+
| `highlander` | `~/source/customers/highlander/worktrees` |
|
|
166
173
|
|
|
167
174
|
**Manifest gate:** set `worktree:` to the worktree path before coding. Do all edits, installs, tests, and commits from that path. Do not leave the primary checkout on a feature branch.
|
|
168
175
|
|
|
@@ -359,5 +366,6 @@ Agent must load this skill, write manifest (with `worktree` path), run placement
|
|
|
359
366
|
| `pointme` | `develop` | `main` | customer |
|
|
360
367
|
| `pedestal` | `develop` | `main` | customer monorepo |
|
|
361
368
|
| `hsd` | `develop` (`develop-hsd-website`) | `production` (`production-hsd-website`) | customer |
|
|
369
|
+
| `highlander` | `port-2026` until live, then `develop` | `main` after cutover | customer |
|
|
362
370
|
|
|
363
371
|
Full paths (`path`, `worktreesRoot`, `productionPath`), MCP keys: `projects.registry.json`.
|