Skip to content

Commit 1edcfa5

Browse files
committed
Convert scripts to TypeScript, add @types/node
- Renamed `scripts/check-readme-version.mjs` to `.ts` and added TypeScript type annotation - Updated `check:version-sync` npm script to use `node --experimental-strip-types` with the new `.ts` file - Added `@types/node ^26.0.1` as a devDependency for proper Node.js type checking - Updated AGENTS.md to document that all scripts must be TypeScript - Updated dev dependencies (eslint, typescript-eslint, prettier, and others)
1 parent cd859c7 commit 1edcfa5

5 files changed

Lines changed: 241 additions & 190 deletions

File tree

AGENTS.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,29 @@ is release-relevant.
4545

4646
---
4747

48+
## Upstream Requests and Roadmap Self-Expansion
49+
50+
Full directive: project-team [AGENTS.md](../AGENTS.md) "Upstream Requests and
51+
Roadmap Self-Expansion." Applied to this repo:
52+
53+
- This repo is an independent peer package — it has no upstream dependency
54+
within this workspace; do not invent one.
55+
- Downstream repos `spectre-shell` (composes this router) and `spectre-init`
56+
(scaffolds against it) may append routing-contract requests (e.g. a new
57+
`subscribe()` event, navigation helper, or `Route`/`Router` type) to this
58+
repo's own `TODO.md` under `## Requested by Downstream`, dated and linked
59+
back to the requesting repo's TODO.md/ROADMAP.md. Keep that section visible
60+
and separate from self-planned routing work.
61+
- This repo's own [ROADMAP.md](ROADMAP.md) may be proactively expanded with new
62+
or reordered phases by the agent's own analysis — but never mark a phase
63+
delivered without `npm run check` passing, and never contradict the
64+
deliberate app-layer router/signals separation documented in
65+
`project-shell/CLAUDE.md` (router does not import
66+
`spectre-shell-signals`, and vice versa).
67+
- Surface any new TODO request or roadmap expansion in the handoff for Bradley
68+
Potts in the same change it was made, and reflect cross-repo-relevant
69+
changes in the project-team's own ROADMAP.md/TODO.md.
70+
4871
## Shared Source Rules
4972

5073
These rules apply to every agent without exception.
@@ -199,6 +222,8 @@ for Spectre applications. It maps URL paths to lazy page modules and enforces th
199222
4. **Async loaders** — dynamic `import()` pattern for page loading
200223
5. **Native History API**`pushState` / `popstate`; no hash routing by default (hash mode is a planned opt-in)
201224
6. **Race-condition safe**`currentNavId` monotonic counter guards stale renders
225+
7. **Scripts are TypeScript** — all `scripts/` tooling is `.ts`, run via
226+
`node --experimental-strip-types`; never add a new `.js`/`.mjs` script.
202227

203228
## Verification Gate
204229

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented here. The format follows
44

55
## [Unreleased]
66

7+
### Fixed
8+
9+
- Added `@types/node` as a devDependency so `scripts/check-readme-version.ts`
10+
resolves Node globals correctly (no functional impact — script already ran
11+
fine via `node --experimental-strip-types`, this only affects editor/IDE
12+
type-checking and any future widening of `tsconfig.json`'s `include`).
13+
714
### Added
815

916
- Added `@phcdevworks/spectre-manifest` as a devDependency. `spectre.manifest.json`

0 commit comments

Comments
 (0)