Skip to content

Commit 7204449

Browse files
committed
refactor(lockstep): rename xport → lockstep
Cascades the rename from socket-repo-template (xport namespace becomes lockstep) to disambiguate from the TypeScript export keyword and align with the fleet's three-axis convention: update / sync / lockstep. Renamed: - xport.json → lockstep.json - xport.schema.json → lockstep.schema.json - scripts/xport*.mts → scripts/lockstep*.mts - .claude/skills/updating-xport/ → .claude/skills/updating-lockstep/ Updated: - package.json scripts (xport, xport:emit-schema) - CLAUDE.md fleet references - .claude/skills/updating/SKILL.md (synced to fleet canonical) - scripts/socket-repo-template-emit-schema.mts header - repo-specific xport mentions in workflows / per-repo skills / docs
1 parent 2f70a98 commit 7204449

10 files changed

Lines changed: 106 additions & 106 deletions

File tree

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
name: updating-xport
3-
description: Acts on `xport.json` drift for repos that carry the xport lock-step manifest. Reads `pnpm run xport --json`, then for each row acts per-kind — auto-bump `version-pin` rows (low-risk mechanical updates), advisory-only for `file-fork` / `feature-parity` / `spec-conformance` / `lang-parity` (upstream semantics need human judgment). Invoked by the `updating` umbrella skill; can also be invoked standalone.
2+
name: updating-lockstep
3+
description: Acts on `lockstep.json` drift for repos that carry the lockstep manifest. Reads `pnpm run lockstep --json`, then for each row acts per-kind — auto-bump `version-pin` rows (low-risk mechanical updates), advisory-only for `file-fork` / `feature-parity` / `spec-conformance` / `lang-parity` (upstream semantics need human judgment). Invoked by the `updating` umbrella skill; can also be invoked standalone.
44
user-invocable: true
55
allowed-tools: Bash(pnpm:*), Bash(npm:*), Bash(git:*), Bash(node:*), Bash(rg:*), Bash(grep:*), Bash(find:*), Bash(ls:*), Bash(cat:*), Bash(head:*), Bash(tail:*), Bash(wc:*), Bash(diff:*), Read, Edit, Grep, Glob---
66

7-
# updating-xport
7+
# updating-lockstep
88

99
<task>
10-
Act on drift findings in `xport.json`. Auto-apply mechanical version-pin bumps; surface everything else as advisory notes for human review. Commit each actioned row as its own atomic commit so the PR reviewer can accept/reject per-row.
10+
Act on drift findings in `lockstep.json`. Auto-apply mechanical version-pin bumps; surface everything else as advisory notes for human review. Commit each actioned row as its own atomic commit so the PR reviewer can accept/reject per-row.
1111
</task>
1212

1313
<context>
14-
**xport** is a cross-project lock-step manifest. Not every repo has one; this skill exits cleanly when `xport.json` is absent. See `xport.schema.json` (deployed via `socket-repo-template/sync-scaffolding.mjs`) for the five row kinds.
14+
**lockstep** is a cross-project lock-step manifest. Not every repo has one; this skill exits cleanly when `lockstep.json` is absent. See `lockstep.schema.json` (deployed via `socket-repo-template/sync-scaffolding.mjs`) for the five row kinds.
1515

16-
The harness at `scripts/xport.mts` emits JSON reports with `severity ∈ {ok, drift, error}` per row. This skill consumes that JSON.
16+
The harness at `scripts/lockstep.mts` emits JSON reports with `severity ∈ {ok, drift, error}` per row. This skill consumes that JSON.
1717

1818
**Per-kind action policy:**
1919

@@ -32,7 +32,7 @@ The common rule: **version-pin is mechanical** (safe to auto-apply with `track-l
3232
**Requirements:**
3333
- Start with clean working directory (check via `git status --porcelain`)
3434
- Run from repo root
35-
- Exit 0 cleanly if `xport.json` is absent (the repo doesn't use xport)
35+
- Exit 0 cleanly if `lockstep.json` is absent (the repo doesn't use lockstep)
3636
- Conventional commit format: `chore(deps): bump <upstream> to <tag>`
3737
- Update `.gitmodules` version comments when submodule tags change (pattern: `# <name>-<version>` on the line above the submodule block)
3838
- Target stable releases only (filter `-rc`, `-alpha`, `-beta`, `-dev`, `-snapshot`, `-nightly`, `-preview`)
@@ -53,9 +53,9 @@ The common rule: **version-pin is mechanical** (safe to auto-apply with `track-l
5353
## Phase 1 — Pre-flight
5454

5555
```bash
56-
test -f xport.json || { echo "no xport.json; skill n/a"; exit 0; }
57-
test -f xport.schema.json || { echo "xport.schema.json missing — malformed scaffolding"; exit 1; }
58-
test -f scripts/xport.mts || { echo "scripts/xport.mts missing — malformed scaffolding"; exit 1; }
56+
test -f lockstep.json || { echo "no lockstep.json; skill n/a"; exit 0; }
57+
test -f lockstep.schema.json || { echo "lockstep.schema.json missing — malformed scaffolding"; exit 1; }
58+
test -f scripts/lockstep.mts || { echo "scripts/lockstep.mts missing — malformed scaffolding"; exit 1; }
5959
6060
git status --porcelain | grep -v '^??' && { echo "dirty tree; aborting"; exit 1; } || true
6161
@@ -65,15 +65,15 @@ git status --porcelain | grep -v '^??' && { echo "dirty tree; aborting"; exit 1;
6565
## Phase 2 — Collect drift
6666

6767
```bash
68-
pnpm run xport --json > /tmp/xport-report.json
68+
pnpm run lockstep --json > /tmp/lockstep-report.json
6969
```
7070

7171
Parse `reports[]` from the JSON. Split into:
7272

7373
- **auto** — rows where `severity == "drift"` AND `kind == "version-pin"` AND `upgrade_policy` ∈ `{ "track-latest", "major-gate" }`
7474
- **advisory** — everything else with `severity != "ok"`
7575

76-
If both lists empty: exit 0 with "no xport drift".
76+
If both lists empty: exit 0 with "no lockstep drift".
7777

7878
## Phase 3 — Auto-bump version-pin rows
7979

@@ -82,7 +82,7 @@ For each row in **auto** list, in manifest declaration order:
8282
**3a. Resolve the upstream submodule + fetch tags**
8383

8484
```bash
85-
SUBMODULE=$(jq -r --arg a "$UPSTREAM_ALIAS" '.upstreams[$a].submodule' xport.json)
85+
SUBMODULE=$(jq -r --arg a "$UPSTREAM_ALIAS" '.upstreams[$a].submodule' lockstep.json)
8686
cd "$SUBMODULE"
8787
git fetch origin --tags --quiet
8888
OLD_SHA=$(git rev-parse HEAD)
@@ -109,36 +109,36 @@ NEW_SHA=$(git rev-parse HEAD)
109109
cd -
110110
```
111111

112-
**3d. Update `xport.json` + `.gitmodules`**
112+
**3d. Update `lockstep.json` + `.gitmodules`**
113113

114114
Use `jq` for structured edit:
115115

116116
```bash
117117
jq --arg id "$ROW_ID" --arg sha "$NEW_SHA" --arg tag "$LATEST" \
118118
'(.rows[] | select(.id == $id) | .pinned_sha) = $sha
119119
| (.rows[] | select(.id == $id) | .pinned_tag) = $tag' \
120-
xport.json > xport.json.tmp && mv xport.json.tmp xport.json
120+
lockstep.json > lockstep.json.tmp && mv lockstep.json.tmp lockstep.json
121121
```
122122

123123
Update `.gitmodules` version comment via Edit tool (NOT sed per CLAUDE.md) — replace `# <prefix>-<old>` with `# <prefix>-<new>` on the comment line above the submodule block.
124124

125125
**3e. Validate + commit**
126126

127127
```bash
128-
# Confirm xport harness accepts the new state
129-
pnpm run xport --json > /tmp/xport-post.json
130-
jq --arg id "$ROW_ID" '.reports[] | select(.id == $id) | .severity' /tmp/xport-post.json
128+
# Confirm lockstep harness accepts the new state
129+
pnpm run lockstep --json > /tmp/lockstep-post.json
130+
jq --arg id "$ROW_ID" '.reports[] | select(.id == $id) | .severity' /tmp/lockstep-post.json
131131
# expect "ok"
132132
133133
if [ "$CI_MODE" = "false" ]; then
134134
pnpm test || {
135135
echo "tests failed; rolling back $ROW_ID"
136-
git checkout xport.json .gitmodules "$SUBMODULE"
136+
git checkout lockstep.json .gitmodules "$SUBMODULE"
137137
continue
138138
}
139139
fi
140140
141-
git add xport.json .gitmodules "$SUBMODULE"
141+
git add lockstep.json .gitmodules "$SUBMODULE"
142142
git commit -m "chore(deps): bump $UPSTREAM_ALIAS to $LATEST"
143143
```
144144

@@ -162,7 +162,7 @@ For each row in **advisory**, accumulate a markdown line:
162162
Final human-readable report to stdout:
163163
164164
```
165-
## updating-xport report
165+
## updating-lockstep report
166166

167167
**Auto-bumped:** <N> row(s)
168168
<list>
@@ -171,18 +171,18 @@ Final human-readable report to stdout:
171171
<list>
172172
```
173173
174-
In CI mode, emit the advisory block to `$GITHUB_OUTPUT` (base64-encoded) under key `xport-advisory` so the weekly-update workflow can include it in the PR body:
174+
In CI mode, emit the advisory block to `$GITHUB_OUTPUT` (base64-encoded) under key `lockstep-advisory` so the weekly-update workflow can include it in the PR body:
175175

176176
```bash
177177
if [ -n "$GITHUB_OUTPUT" ]; then
178-
echo "xport-advisory=$(printf '%s' "$ADVISORY" | base64 | tr -d '\n')" >> "$GITHUB_OUTPUT"
178+
echo "lockstep-advisory=$(printf '%s' "$ADVISORY" | base64 | tr -d '\n')" >> "$GITHUB_OUTPUT"
179179
fi
180180
```
181181

182182
Emit a HANDOFF block per `_shared/report-format.md`:
183183

184184
```
185-
=== HANDOFF: updating-xport ===
185+
=== HANDOFF: updating-lockstep ===
186186
Status: {pass|fail}
187187
Findings: {auto_bumped: N, advisory: M}
188188
Summary: {one-line description}
@@ -196,17 +196,17 @@ Summary: {one-line description}
196196
- All actionable `version-pin` rows bumped atomically (one commit per row)
197197
- Advisory rows collected for PR body / workflow output
198198
- No edits to non-version-pin row state
199-
- `pnpm run xport` exits 0 or 2 at end (never 1 — no schema errors introduced)
199+
- `pnpm run lockstep` exits 0 or 2 at end (never 1 — no schema errors introduced)
200200
- `.gitmodules` version comments synchronized with `pinned_tag`
201201

202202
## Commands
203203

204-
- `pnpm run xport --json` — drift report (consumed by this skill)
205-
- `jq` — parse + edit `xport.json` (structured JSON edits)
204+
- `pnpm run lockstep --json` — drift report (consumed by this skill)
205+
- `jq` — parse + edit `lockstep.json` (structured JSON edits)
206206
- `git submodule status` — verify submodule state after bumps
207207

208208
## When to use
209209

210210
- Invoked by the `updating` umbrella skill (weekly-update workflow)
211-
- Standalone: `/updating-xport` when syncing just the xport manifest
212-
- After manual submodule bumps, to refresh `xport.json` metadata
211+
- Standalone: `/updating-lockstep` when syncing just the lockstep manifest
212+
- After manual submodule bumps, to refresh `lockstep.json` metadata

.claude/skills/updating/SKILL.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: updating
3-
description: Umbrella update skill for a Socket fleet repo. Runs `pnpm run update` (npm), validates `xport.json` via `pnpm run xport` (if present), optionally bumps submodules, and checks workflow SHA pins. Use when asked to update dependencies, sync upstreams, or prepare for a release.
3+
description: Umbrella update skill for a Socket fleet repo. Runs `pnpm run update` (npm), validates `lockstep.json` via `pnpm run lockstep` (if present), optionally bumps submodules, and checks workflow SHA pins. Use when asked to update dependencies, sync upstreams, or prepare for a release.
44
user-invocable: true
55
allowed-tools: Task, Skill, Read, Edit, Grep, Glob, Bash(pnpm run:*), Bash(pnpm test:*), Bash(pnpm install:*), Bash(git:*), Bash(claude --version)
66
---
@@ -9,7 +9,7 @@ allowed-tools: Task, Skill, Read, Edit, Grep, Glob, Bash(pnpm run:*), Bash(pnpm
99

1010
<task>
1111
Update all dependencies for this repo: npm packages first, then the
12-
xport-managed version pins (if `xport.json` exists), then any other
12+
lockstep-managed version pins (if `lockstep.json` exists), then any other
1313
submodules tracked via `.gitmodules`, and finally verify workflow
1414
SHA pins are current. Validate with the full check/test suite before
1515
committing. The sub-skill delegation mirrors the canonical
@@ -24,17 +24,17 @@ adapts to what the repo has:
2424

2525
**Update Targets:**
2626
- **npm packages** — via `pnpm run update` (every Socket repo has this script)
27-
- **xport-managed upstreams** — via `pnpm run xport` when `xport.json` exists
27+
- **lockstep-managed upstreams** — via `pnpm run lockstep` when `lockstep.json` exists
2828
(manifest-managed submodule pins + advisory drift on file-fork /
2929
feature-parity / spec-conformance / lang-parity rows)
3030
- **Other submodules** — via repo-specific `updating-*` sub-skills
31-
when `.gitmodules` has entries not claimed by xport version-pin rows
31+
when `.gitmodules` has entries not claimed by lockstep version-pin rows
3232
- **Workflow SHA pins** — check `_local-not-for-reuse-*.yml` against
3333
`origin/main`; run the `updating-workflows` skill when stale
3434

3535
**Key files this skill consults:**
36-
- `xport.json` — if present, drives version-pin bumps and surfaces drift
37-
- `.gitmodules` — listed submodules; xport's `version-pin` rows take precedence
36+
- `lockstep.json` — if present, drives version-pin bumps and surfaces drift
37+
- `.gitmodules` — listed submodules; lockstep's `version-pin` rows take precedence
3838
- `.github/workflows/_local-not-for-reuse-*.yml` — SHA pin sources
3939
- `package.json``pnpm run update` script
4040

@@ -56,7 +56,7 @@ state first to discover what to run.
5656

5757
**Actions:**
5858
- Update npm packages
59-
- Apply xport-driven bumps (if `xport.json` present)
59+
- Apply lockstep-driven bumps (if `lockstep.json` present)
6060
- Bump remaining submodules (if any)
6161
- Create atomic commits per category
6262
- Report summary of changes
@@ -91,30 +91,30 @@ fi
9191

9292
---
9393

94-
### Phase 3: Validate xport manifest (if applicable)
94+
### Phase 3: Validate lockstep manifest (if applicable)
9595

96-
If `xport.json` exists at repo root, run the harness in read-only mode
96+
If `lockstep.json` exists at repo root, run the harness in read-only mode
9797
to classify drift before acting on it:
9898

9999
```bash
100-
if [ -f xport.json ]; then
101-
pnpm run xport
102-
XPORT_EXIT=$?
103-
104-
case $XPORT_EXIT in
105-
0) echo "xport clean — manifest valid, no drift; skip Phase 4 xport step" ;;
106-
1) echo "xport schema/structural error — stopping"; exit 1 ;;
107-
2) echo "xport drift — Phase 4 will invoke updating-xport to act" ;;
100+
if [ -f lockstep.json ]; then
101+
pnpm run lockstep
102+
LOCKSTEP_EXIT=$?
103+
104+
case $LOCKSTEP_EXIT in
105+
0) echo "lockstep clean — manifest valid, no drift; skip Phase 4 lockstep step" ;;
106+
1) echo "lockstep schema/structural error — stopping"; exit 1 ;;
107+
2) echo "lockstep drift — Phase 4 will invoke updating-lockstep to act" ;;
108108
esac
109109
fi
110110
```
111111

112112
Exit code semantics:
113-
- **0** — manifest valid, no drift; nothing for `updating-xport` to do.
113+
- **0** — manifest valid, no drift; nothing for `updating-lockstep` to do.
114114
- **1** — schema violation, missing file, or unreachable baseline. Stop
115-
and investigate via `scripts/xport-schema.mts` and the failing row's
115+
and investigate via `scripts/lockstep-schema.mts` and the failing row's
116116
`local_*`/`upstream` fields. Do not auto-retry.
117-
- **2** — drift detected. Phase 4 invokes the `updating-xport` skill,
117+
- **2** — drift detected. Phase 4 invokes the `updating-lockstep` skill,
118118
which auto-bumps mechanical `version-pin` rows (per `upgrade_policy`)
119119
and surfaces everything else (`file-fork` / `feature-parity` /
120120
`spec-conformance` / `lang-parity` / `locked` version-pins) as
@@ -123,30 +123,30 @@ Exit code semantics:
123123
`temporal-rs` is `locked` because Node vendors it and bumping is
124124
gated on a Node bump landing first).
125125

126-
If `xport.json` does NOT exist, skip this phase.
126+
If `lockstep.json` does NOT exist, skip this phase.
127127

128128
---
129129

130-
### Phase 4: Apply xport drift + update other submodules (if applicable)
130+
### Phase 4: Apply lockstep drift + update other submodules (if applicable)
131131

132-
**4a. xport drift** — if Phase 3 reported exit 2 (drift), invoke the
133-
`updating-xport` skill. It auto-bumps `version-pin` rows whose
132+
**4a. lockstep drift** — if Phase 3 reported exit 2 (drift), invoke the
133+
`updating-lockstep` skill. It auto-bumps `version-pin` rows whose
134134
`upgrade_policy` is `track-latest` or `major-gate` (patch/minor only,
135135
majors → advisory), and emits an advisory block for everything else.
136136
Each auto-bumped row becomes its own atomic commit.
137137

138138
```bash
139-
if [ "$XPORT_EXIT" = "2" ]; then
139+
if [ "$LOCKSTEP_EXIT" = "2" ]; then
140140
# Invoke via the Skill tool / programmatic-claude flow used by the
141-
# weekly-update workflow. Standalone runs can do `/updating-xport`.
142-
echo "Invoking updating-xport for drift handling"
141+
# weekly-update workflow. Standalone runs can do `/updating-lockstep`.
142+
echo "Invoking updating-lockstep for drift handling"
143143
fi
144144
```
145145

146-
**4b. Non-xport submodules** — invoke each `updating-*` sub-skill this
146+
**4b. Non-lockstep submodules** — invoke each `updating-*` sub-skill this
147147
repo defines (e.g., `updating-node`, `updating-curl`) for submodules
148-
NOT claimed by an xport `version-pin` row. These sub-skills know about
149-
build inputs that aren't tracked in xport (cache-versions bumps,
148+
NOT claimed by a lockstep `version-pin` row. These sub-skills know about
149+
build inputs that aren't tracked in lockstep (cache-versions bumps,
150150
patch regeneration, etc.).
151151

152152
If no `.gitmodules` exists, skip 4b.
@@ -196,7 +196,7 @@ fi
196196
| Category | Status |
197197
|--------------------|--------------------------------------|
198198
| npm packages | Updated / Up to date |
199-
| xport manifest | <ok>/<total> ok, <drift> drift, <error> error (exit <code>) — or n/a |
199+
| lockstep manifest | <ok>/<total> ok, <drift> drift, <error> error (exit <code>) — or n/a |
200200
| Other submodules | K bumped — or n/a |
201201
| Workflow SHA pins | Up to date / Stale |
202202
@@ -223,7 +223,7 @@ fi
223223
## Success Criteria
224224

225225
- All npm packages checked for updates
226-
- xport manifest validated (when present); schema/structural errors block
226+
- lockstep manifest validated (when present); schema/structural errors block
227227
- Full build and tests pass (interactive mode)
228228
- Summary report generated
229229

@@ -236,5 +236,5 @@ This skill is useful for:
236236
- Pre-release preparation
237237

238238
**Safety:** Updates are validated before committing. Schema errors
239-
(xport exit 1) stop the process; drift (xport exit 2) is advisory
239+
(lockstep exit 1) stop the process; drift (lockstep exit 2) is advisory
240240
and does not block.

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Where drift commonly hides:
8787
- `socket-registry/.github/actions/*` — composite-action SHAs pinned in consumer workflows
8888
- `template/CLAUDE.md` `<!-- BEGIN FLEET-CANONICAL -->` block — must be byte-identical across the fleet
8989
- `template/.claude/hooks/*` — same hook, same code
90-
- xport.json `pinned_sha` rows — upstream submodules tracked by socket-btm
90+
- lockstep.json `pinned_sha` rows — upstream submodules tracked by socket-btm
9191
- `.gitmodules` `# name-version` annotations
9292
- pnpm/Node `packageManager`/`engines` fields
9393

@@ -178,14 +178,14 @@ Full hook spec in [`.claude/hooks/token-guard/README.md`](.claude/hooks/token-gu
178178
Every skill under `.claude/skills/` falls into one of three tiers — surface this distinction when adding a new skill so it lands in the right place:
179179

180180
- **Fleet skill** — present in every fleet repo, identical contract everywhere. Examples: `guarding-paths`, `scanning-quality`, `scanning-security`, `updating`, `locking-down-programmatic-claude`, `plug-leaking-promise-race`. New fleet skills land in `socket-repo-template/template/.claude/skills/<name>/` and cascade via `node socket-repo-template/scripts/sync-scaffolding.mts --all --fix`. Track them in `SHARED_SKILL_FILES` in the sync manifest.
181-
- **Partial skill** — present in the subset of repos that need it, identical contract within that subset. Examples: `driving-cursor-bugbot` (every repo with PR review), `updating-xport` (every repo with `xport.json`), `squashing-history` (repos with the squash workflow). Live in each adopting repo's `.claude/skills/<name>/`. When you change one, propagate to the others.
181+
- **Partial skill** — present in the subset of repos that need it, identical contract within that subset. Examples: `driving-cursor-bugbot` (every repo with PR review), `updating-lockstep` (every repo with `lockstep.json`), `squashing-history` (repos with the squash workflow). Live in each adopting repo's `.claude/skills/<name>/`. When you change one, propagate to the others.
182182
- **Unique skill** — one repo only, bespoke to that repo's domain. Examples: `updating-cdxgen` (sdxgen), `updating-yoga` (socket-btm), `release` (socket-registry). Never canonical-tracked; the host repo owns it end-to-end.
183183

184184
Audit the current classification with `node socket-repo-template/scripts/run-skill-fleet.mts --list-skills`.
185185

186186
#### `updating` umbrella + `updating-*` siblings
187187

188-
`updating` is the canonical fleet umbrella that runs `pnpm run update` then discovers and runs every `updating-*` sibling skill the host repo registers. The umbrella is fleet-shared; the siblings are per-repo (or partial — e.g. `updating-xport` lives in every repo with `xport.json`). To add a new repo-specific update step, drop a new `.claude/skills/updating-<domain>/SKILL.md` and the umbrella picks it up automatically — no edits to `updating` itself.
188+
`updating` is the canonical fleet umbrella that runs `pnpm run update` then discovers and runs every `updating-*` sibling skill the host repo registers. The umbrella is fleet-shared; the siblings are per-repo (or partial — e.g. `updating-lockstep` lives in every repo with `lockstep.json`). To add a new repo-specific update step, drop a new `.claude/skills/updating-<domain>/SKILL.md` and the umbrella picks it up automatically — no edits to `updating` itself.
189189

190190
#### Running skills across the fleet
191191

0 commit comments

Comments
 (0)