Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions docs/trajectories/typescript-bun-migration/RESUME.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Trajectory — TypeScript / Bun migration

**Status**: Active (Lane B slice 10 merged — [#883](https://github.com/Lucent-Financial-Group/Zeta/pull/883), commit `271bc38`)
**Milestone**: 30 ported + 2 in-flight = 32 total (2 from #849 + 3 from #866 + 3 from #868 + 3 from #870 + 2 from #872 + 3 from #874 + 3 from #876 + 3 from #878 + 3 from #880 + 3 from #882 + 2 from #883 = 30 merged; +2 in-flight in slice-11). Slice-11 opens **skill-catalog cluster + nuget audit** (backfill_dv2_frontmatter + audit-packages). 12 Bucket B files remain.
**Status**: Active (Lane B slice 11 merged — [#884](https://github.com/Lucent-Financial-Group/Zeta/pull/884), commit `9237756`)
**Milestone**: 32 ported + 1 in-flight = 33 total (2 from #849 + 3 from #866 + 3 from #868 + 3 from #870 + 2 from #872 + 3 from #874 + 3 from #876 + 3 from #878 + 3 from #880 + 3 from #882 + 2 from #883 + 2 from #884 = 32 merged; +1 in-flight in slice-12). Slice-12 opens **backlog index regenerator** (backlog/generate-index). 10 Bucket B files remain.
**Current blocker**: None.
**Next concrete action**: Pick a coherent next slice from Bucket B (12 files remaining). Per Gate B: read-only scope first, then re-verify the layered baseline currency before first mutating action.
**Next concrete action**: Pick a coherent next slice from Bucket B (10 files remaining). Per Gate B: read-only scope first, then re-verify the layered baseline currency before first mutating action.
**Last updated**: 2026-04-30

## Why this trajectory exists
Expand All @@ -25,6 +25,11 @@ Per the maintainer-channel correction via the multi-AI review surface (2026-04-2
| [#872](https://github.com/Lucent-Financial-Group/Zeta/pull/872) | 2026-04-30 (commit `2f3275a`) | `tools/alignment/audit_skills.{sh→ts}`, `tools/alignment/citations.{sh→ts}` | Merged |
| [#874](https://github.com/Lucent-Financial-Group/Zeta/pull/874) | 2026-04-30 (commit `3f33b51`) | `tools/hygiene/audit-tick-history-bounded-growth.{sh→ts}`, `tools/hygiene/audit-post-setup-script-stack.{sh→ts}`, `tools/hygiene/audit-missing-prevention-layers.{sh→ts}` | Merged |
| [#876](https://github.com/Lucent-Financial-Group/Zeta/pull/876) | 2026-04-30 (commit `02baabc`) | `tools/hygiene/check-no-conflict-markers.{sh→ts}`, `tools/hygiene/check-archive-header-section33.{sh→ts}`, `tools/hygiene/check-tick-history-order.{sh→ts}` | Merged |
| [#878](https://github.com/Lucent-Financial-Group/Zeta/pull/878) | 2026-04-30 | `tools/lint/no-empty-dirs.{sh→ts}`, `tools/lint/safety-clause-audit.{sh→ts}`, `tools/lint/doc-comment-history-audit.{sh→ts}` | Merged |
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 (xref): In the RESUME PR table, the #878 row is missing the merged commit hash, but slice-audits.md records Slice 7 as merged with commit 4dac957. This table appears to include commits for merged slices; please add the commit for #878 (or reconcile if the recorded commit is wrong).

Suggested change
| [#878](https://github.com/Lucent-Financial-Group/Zeta/pull/878) | 2026-04-30 | `tools/lint/no-empty-dirs.{sh→ts}`, `tools/lint/safety-clause-audit.{sh→ts}`, `tools/lint/doc-comment-history-audit.{sh→ts}` | Merged |
| [#878](https://github.com/Lucent-Financial-Group/Zeta/pull/878) | 2026-04-30 (commit `4dac957`) | `tools/lint/no-empty-dirs.{sh→ts}`, `tools/lint/safety-clause-audit.{sh→ts}`, `tools/lint/doc-comment-history-audit.{sh→ts}` | Merged |

Copilot uses AI. Check for mistakes.
| [#880](https://github.com/Lucent-Financial-Group/Zeta/pull/880) | 2026-04-30 (commit `988de70`) | `tools/lint/runner-version-freshness.{sh→ts}`, `tools/lint/no-directives-otto-prose.{sh→ts}`, `tools/audit/live-lock-audit.{sh→ts}` | Merged |
| [#882](https://github.com/Lucent-Financial-Group/Zeta/pull/882) | 2026-04-30 (commit `02266a7`) | `tools/hygiene/validate-agencysignature-pr-body.{sh→ts}`, `tools/hygiene/audit-agencysignature-main-tip.{sh→ts}`, `tools/hygiene/capture-tick-snapshot.{sh→ts}` | Merged |
| [#883](https://github.com/Lucent-Financial-Group/Zeta/pull/883) | 2026-04-30 (commit `271bc38`) | `tools/hygiene/counterweight-audit.{sh→ts}`, `tools/hygiene/append-tick-history-row.{sh→ts}` | Merged |
| [#884](https://github.com/Lucent-Financial-Group/Zeta/pull/884) | 2026-04-30 (commit `9237756`) | `tools/skill-catalog/backfill_dv2_frontmatter.{sh→ts}`, `tools/audit-packages.{sh→ts}` | Merged |

## Inventory — Python (tools/, Zeta-authored)

Expand Down Expand Up @@ -59,28 +64,21 @@ tools/profile.sh

Rationale: TS/Bun is itself one of the things `install.sh` installs. These scripts cannot depend on Bun.

### Bucket B — Should become TypeScript (19 files remaining)
### Bucket B — Should become TypeScript (10 files remaining)

Post-install scripts that operate on the repo (lints, audits, hygiene checks, peer-call wrappers, budget reports, git ops). Same shape as the scripts ported in #849, #866, #868, #870, #872, #874, #876, #878. Twenty-three originally-listed audit/lint scripts are now ported to TS and removed from this list (3 in slice-8 in flight); the bash originals remain in-tree as the equivalence reference and will retire once the TS ports have soaked.
Post-install scripts that operate on the repo (lints, audits, hygiene checks, peer-call wrappers, budget reports, git ops). Same shape as the scripts ported in #849, #866, #868, #870, #872, #874, #876, #878, #880, #882, #883, #884. The originally-listed audit/lint scripts have progressively ported (1 in slice-12 in flight); the bash originals remain in-tree as the equivalence reference and will retire once the TS ports have soaked.

```text
tools/audit-packages.sh
tools/backlog/generate-index.sh
tools/backlog/generate-index.sh # in flight (slice 12)
tools/budget/daily-cost-report.sh
tools/budget/project-runway.sh
tools/budget/snapshot-burn.sh
tools/git/batch-resolve-pr-threads.sh
tools/git/push-with-retry.sh
tools/hygiene/append-tick-history-row.sh
tools/hygiene/audit-agencysignature-main-tip.sh
tools/hygiene/capture-tick-snapshot.sh
tools/hygiene/counterweight-audit.sh
tools/hygiene/validate-agencysignature-pr-body.sh
tools/peer-call/codex.sh
tools/peer-call/gemini.sh
tools/peer-call/grok.sh
tools/pr-preservation/archive-pr.sh
tools/skill-catalog/backfill_dv2_frontmatter.sh
```

Rationale: type safety, structured error handling, easier testing, jq/awk/grep replaced by JS object operations, gh CLI shell-out replaced by Octokit when valuable.
Expand All @@ -100,9 +98,9 @@ tools/lint/safety-clause-audit.sh

Rationale: borderline — depends on whether the lint can be expressed as cleanly in TS as it currently is in shell. Worth a small comparison before committing the port.

### Bucket D — Ported, bash retained (23 files)
### Bucket D — Ported, bash retained (32 files)

The TS ports landed in #866 + #868 + #870 + #872 + #874 + #876 + #878 (3 more in slice-8 PR in flight); the bash originals stay in-tree as equivalence references and will retire once the TS ports have soaked.
The TS ports landed in #866 + #868 + #870 + #872 + #874 + #876 + #878 + #880 + #882 + #883 + #884; the bash originals stay in-tree as equivalence references and will retire once the TS ports have soaked.

```text
tools/hygiene/audit-md032-plus-linestart.sh # ported in #866
Expand All @@ -125,9 +123,16 @@ tools/hygiene/check-tick-history-order.sh # ported in #876
tools/lint/no-empty-dirs.sh # ported in #878
tools/lint/safety-clause-audit.sh # ported in #878
tools/lint/doc-comment-history-audit.sh # ported in #878
tools/lint/runner-version-freshness.sh # ported in slice-8 PR (in flight)
tools/lint/no-directives-otto-prose.sh # ported in slice-8 PR (in flight)
tools/audit/live-lock-audit.sh # ported in slice-8 PR (in flight)
tools/lint/runner-version-freshness.sh # ported in #880
tools/lint/no-directives-otto-prose.sh # ported in #880
tools/audit/live-lock-audit.sh # ported in #880
tools/hygiene/validate-agencysignature-pr-body.sh # ported in #882
tools/hygiene/audit-agencysignature-main-tip.sh # ported in #882
tools/hygiene/capture-tick-snapshot.sh # ported in #882
tools/hygiene/counterweight-audit.sh # ported in #883
tools/hygiene/append-tick-history-row.sh # ported in #883
tools/skill-catalog/backfill_dv2_frontmatter.sh # ported in #884
tools/audit-packages.sh # ported in #884
```

## Recommended next slice
Expand Down
28 changes: 24 additions & 4 deletions docs/trajectories/typescript-bun-migration/slice-audits.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,27 @@ Per-port pattern checklist:

Slice 6 passes audit. No new patterns recorded — all reused from prior slices.

## Slice 11 — 2 ports (skill-catalog cluster + nuget audit) (PR pending — `lane-b/ts-bun-slice-11-dv2-frontmatter-backfill-2026-04-30`)
## Slice 12 — 1 port (backlog index regenerator) (PR pending — `lane-b/ts-bun-slice-12-backlog-generate-index-2026-04-30`)

**Slice files**:

- `tools/backlog/generate-index.{sh→ts}` (regenerates `docs/BACKLOG.md` from per-row `docs/backlog/P<tier>/B-<NNNN>-<slug>.md` files)

**Comparison points**: identical to slice 11/10/9. Within Gate B 30-day window.

### Code-pattern audit (per-port)

- **`generate-index.ts`** (217 → 282 lines): bash awk frontmatter parser (state machine + `gsub` for quote-stripping) → `extractField` + `stripQuotes` helpers; one `RegExp.exec` per known field; bash `find -name 'B-*.md' -type f -print0 | sort -z` → `readdirSync` filter + `localeCompare` by basename. Bash `mktemp` + atomic `mv` rename → `readFileSync` compare + conditional `writeFileSync` (no rewrite when content identical, mirroring bash's "only write if different"). Bash `diff -q` + `diff` invocation in `--check` mode → in-memory line-by-line comparison emitting `<` / `>` diff markers. Phase-1a 50-line safety guard preserved (refuses to overwrite shorter files unless `BACKLOG_WRITE_FORCE=1`). Three modes preserved: write (default) / `--check` / `--stdout`.
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This slice audit entry claims the port uses RegExp.exec per field and does a readFileSync compare + conditional writeFileSync, and it describes the Phase-1a guard as "refuses to overwrite shorter files". The current tools/backlog/generate-index.ts uses startsWith (no regex), always writeFileSyncs, and the guard refuses overwrite when the existing file is longer than 50 lines unless forced. Please update this sentence to match the actual implementation and guard behavior.

Suggested change
- **`generate-index.ts`** (217 → 282 lines): bash awk frontmatter parser (state machine + `gsub` for quote-stripping) → `extractField` + `stripQuotes` helpers; one `RegExp.exec` per known field; bash `find -name 'B-*.md' -type f -print0 | sort -z``readdirSync` filter + `localeCompare` by basename. Bash `mktemp` + atomic `mv` rename → `readFileSync` compare + conditional `writeFileSync` (no rewrite when content identical, mirroring bash's "only write if different"). Bash `diff -q` + `diff` invocation in `--check` mode → in-memory line-by-line comparison emitting `<` / `>` diff markers. Phase-1a 50-line safety guard preserved (refuses to overwrite shorter files unless `BACKLOG_WRITE_FORCE=1`). Three modes preserved: write (default) / `--check` / `--stdout`.
- **`generate-index.ts`** (217 → 282 lines): bash awk frontmatter parser (state machine + `gsub` for quote-stripping) → `extractField` + `stripQuotes` helpers using `startsWith` checks for the known fields; bash `find -name 'B-*.md' -type f -print0 | sort -z``readdirSync` filter + `localeCompare` by basename. Bash `mktemp` + atomic `mv` rename → direct `writeFileSync` after the TypeScript-side safety checks. Bash `diff -q` + `diff` invocation in `--check` mode → in-memory line-by-line comparison emitting `<` / `>` diff markers. Phase-1a 50-line safety guard preserved (refuses to overwrite when the existing file is longer than 50 lines unless `BACKLOG_WRITE_FORCE=1`). Three modes preserved: write (default) / `--check` / `--stdout`.

Copilot uses AI. Check for mistakes.

### Equivalence audit

- **`generate-index`**: byte-equivalent against bash original on `--stdout` mode for the current `docs/backlog/` tree (4 priority tiers × ~70 rows). `--check` produces matching exit codes. Write-mode tested via temp-copy snapshot.

### Outcome

Slice 12 passes audit. **Backlog-cluster opened** — first script in this cluster ports cleanly with the in-memory diff pattern (replaces shell-out to `diff`). Bucket B 11 → 10.

## Slice 11 — 2 ports (skill-catalog cluster + nuget audit) (PR #884, merged 2026-04-30, commit `9237756`)

**Slice files**:

Expand All @@ -434,7 +454,7 @@ Slice 6 passes audit. No new patterns recorded — all reused from prior slices.

Slice 11 passes audit. Skill-catalog cluster opened + NuGet audit added. Bucket B 14 → 12.

## Slice 10 — 2 ports (counterweight-cluster + first write-side) (PR pending — `lane-b/ts-bun-slice-10-counterweight-audit-2026-04-30`)
## Slice 10 — 2 ports (counterweight-cluster + first write-side) (PR #883, merged 2026-04-30, commit `271bc38`)

**Slice files**:

Expand All @@ -457,7 +477,7 @@ Slice 11 passes audit. Skill-catalog cluster opened + NuGet audit added. Bucket

Slice 10 passes audit. **Counterweight-cluster opened** (Otto-278 cadenced inspect). **First write-side script ported** (append-tick-history-row) — confirms write-side equivalence-test pattern works. Bucket B 16 → 14.

## Slice 9 — 3 ports (agency-signature-pair cluster + snapshot-pinning) (PR pending — `lane-b/ts-bun-slice-9-agencysignature-pair-2026-04-30`)
## Slice 9 — 3 ports (agency-signature-pair cluster + snapshot-pinning) (PR #882, merged 2026-04-30, commit `02266a7`)

**Slice files**:

Expand Down Expand Up @@ -491,7 +511,7 @@ Slice 10 passes audit. **Counterweight-cluster opened** (Otto-278 cadenced inspe

Slice 9 passes audit. **Agency-signature-pair cluster opened**: validate-pr-body (pre-merge) + audit-main-tip (post-merge) form Amara's ferry-7 enforcement-instrument set. Bucket B 19 → 16.

## Slice 8 — 3 ports (Cluster H finish + audit-cluster start) (PR pending — `lane-b/ts-bun-slice-8-runner-version-freshness-2026-04-30`)
## Slice 8 — 3 ports (Cluster H finish + audit-cluster start) (PR #880, merged 2026-04-30, commit `988de70`)

**Slice files**:

Expand Down
Loading
Loading