|
| 1 | +# Intent Release Readiness |
| 2 | + |
| 3 | +## Status |
| 4 | + |
| 5 | +Intent is in early experimental development. No packages have been published to npm. No GitHub Releases have been created. |
| 6 | + |
| 7 | +The repository has five workspace packages under `packages/*`, all at version `0.1.0`, all using `workspace:*` dependency references. The codebase is functional and validated by CI, but several metadata and workflow steps are missing before a first alpha release. |
| 8 | + |
| 9 | +## Intended publishable packages |
| 10 | + |
| 11 | +All five packages under `packages/*` are intended to be published: |
| 12 | + |
| 13 | +| Package | npm name | Purpose | |
| 14 | +|---|---|---| |
| 15 | +| `packages/core` | `@intent/core` | Platformless semantic graph and runtime | |
| 16 | +| `packages/dom` | `@intent/dom` | DOM materializer for screens and router | |
| 17 | +| `packages/router` | `@intent/router` | Typed route definitions and navigation | |
| 18 | +| `packages/testing` | `@intent/testing` | Semantic test harness | |
| 19 | +| `packages/server` | `@intent/server` | Early server-side package | |
| 20 | + |
| 21 | +Packages under `examples/` (e.g., `web-basic`) are private and must not be published. |
| 22 | + |
| 23 | +## Package audit |
| 24 | + |
| 25 | +### `@intent/core` |
| 26 | + |
| 27 | +| Field | Value | Status | |
| 28 | +|---|---|---| |
| 29 | +| Current version | `0.1.0` | Acceptable for alpha | |
| 30 | +| `main` | `./dist/index.js` | Exists after build | |
| 31 | +| `module` | `./dist/index.js` | Exists after build | |
| 32 | +| `types` | `./dist/index.d.ts` | Exists after build | |
| 33 | +| `exports` | `{ ".": { types, import, default } }` | Correct | |
| 34 | +| `files` | `["dist"]` | Correct — only `dist/` and `package.json` included in tarball | |
| 35 | +| `description` | Present | Added in this audit | |
| 36 | +| `license` | MIT field present | Root LICENSE file present | |
| 37 | +| `repository` | Missing | Recommended for npm listing | |
| 38 | +| `engines` | Missing | Should document minimum Node version | |
| 39 | +| `dependencies` | None | Good — core is platformless | |
| 40 | +| Build tool | `tsdown` | Bundles ESM + `.d.ts` | |
| 41 | +| Test harness | `vitest` | Tests pass | |
| 42 | + |
| 43 | +### `@intent/dom` |
| 44 | + |
| 45 | +| Field | Value | Status | |
| 46 | +|---|---|---| |
| 47 | +| Current version | `0.1.0` | Acceptable for alpha | |
| 48 | +| `main` | `./dist/index.js` | Exists after build | |
| 49 | +| `module` | `./dist/index.js` | Exists after build | |
| 50 | +| `types` | `./dist/index.d.ts` | Exists after build | |
| 51 | +| `exports` | `{ ".": { types, import, default } }` | Correct | |
| 52 | +| `files` | `["dist"]` | Correct | |
| 53 | +| `description` | Present | Added in this audit | |
| 54 | +| `license` | MIT field present | Root LICENSE file present | |
| 55 | +| `repository` | Missing | Recommended | |
| 56 | +| `dependencies` | `@intent/core`, `@intent/router` | Uses `workspace:*` — correct for monorepo | |
| 57 | +| Build tool | `tsdown` | Bundles ESM + `.d.ts` | |
| 58 | + |
| 59 | +### `@intent/router` |
| 60 | + |
| 61 | +| Field | Value | Status | |
| 62 | +|---|---|---| |
| 63 | +| Current version | `0.1.0` | Acceptable for alpha | |
| 64 | +| `main` | `./dist/index.js` | Exists after build | |
| 65 | +| `module` | `./dist/index.js` | Exists after build | |
| 66 | +| `types` | `./dist/index.d.ts` | Exists after build | |
| 67 | +| `exports` | `{ ".": { types, import, default } }` | Correct | |
| 68 | +| `files` | `["dist"]` | Correct | |
| 69 | +| `description` | Present | Added in this audit | |
| 70 | +| `license` | MIT field present | Root LICENSE file present | |
| 71 | +| `repository` | Missing | Recommended | |
| 72 | +| `dependencies` | `@intent/core` | Uses `workspace:*` | |
| 73 | +| Build tool | `tsdown` | Bundles ESM + `.d.ts` | |
| 74 | + |
| 75 | +### `@intent/testing` |
| 76 | + |
| 77 | +| Field | Value | Status | |
| 78 | +|---|---|---| |
| 79 | +| Current version | `0.1.0` | Acceptable for alpha | |
| 80 | +| `main` | `./dist/index.js` | Exists after build | |
| 81 | +| `module` | `./dist/index.js` | Exists after build | |
| 82 | +| `types` | `./dist/index.d.ts` | Exists after build | |
| 83 | +| `exports` | `{ ".": { types, import, default } }` | Correct | |
| 84 | +| `files` | `["dist"]` | Correct | |
| 85 | +| `description` | Present | Added in this audit | |
| 86 | +| `license` | MIT field present | Root LICENSE file present | |
| 87 | +| `repository` | Missing | Recommended | |
| 88 | +| `dependencies` | `@intent/core` | Uses `workspace:*` | |
| 89 | +| Build tool | `tsdown` | Bundles ESM + `.d.ts` | |
| 90 | + |
| 91 | +### `@intent/server` |
| 92 | + |
| 93 | +| Field | Value | Status | |
| 94 | +|---|---|---| |
| 95 | +| Current version | `0.1.0` | Acceptable for alpha | |
| 96 | +| `main` | `./dist/index.js` | Exists after build | |
| 97 | +| `module` | `./dist/index.js` | Exists after build | |
| 98 | +| `types` | `./dist/index.d.ts` | Exists after build | |
| 99 | +| `exports` | `{ ".": { types, import, default } }` | Correct | |
| 100 | +| `files` | `["dist"]` | Correct | |
| 101 | +| `description` | Present | Added in this audit | |
| 102 | +| `license` | MIT field present | Root LICENSE file present | |
| 103 | +| `repository` | Missing | Recommended | |
| 104 | +| `dependencies` | `@intent/core` | Uses `workspace:*` | |
| 105 | +| Build tool | `tsdown` | Bundles ESM + `.d.ts` | |
| 106 | +| Note | Early stage | Server package has global registries and basic action/resource/policy types. Not yet production-ready. | |
| 107 | + |
| 108 | +## Package naming and npm scope risk |
| 109 | + |
| 110 | +All five packages use the `@intent/*` npm scope. |
| 111 | + |
| 112 | +**Before publishing, confirm ownership or availability of the `@intent` npm organization/scope.** |
| 113 | + |
| 114 | +If `@intent` is unavailable, choose a different public scope (e.g., `@intent-framework/*`, `@intentjs/*`, or another unique name) before first release. Changing the scope after publishing is disruptive. |
| 115 | + |
| 116 | +Current package names: |
| 117 | + |
| 118 | +- `@intent/core` |
| 119 | +- `@intent/dom` |
| 120 | +- `@intent/router` |
| 121 | +- `@intent/testing` |
| 122 | +- `@intent/server` |
| 123 | + |
| 124 | +These names are descriptive and low-risk if the `@intent` scope is available. Scope availability has not been verified. |
| 125 | + |
| 126 | +## Build outputs |
| 127 | + |
| 128 | +All packages use `tsdown` with the same configuration: |
| 129 | + |
| 130 | +```ts |
| 131 | +defineConfig({ |
| 132 | + entry: ["src/index.ts"], |
| 133 | + format: "esm", |
| 134 | + dts: true, |
| 135 | + clean: true, |
| 136 | +}) |
| 137 | +``` |
| 138 | + |
| 139 | +This produces: |
| 140 | +- `dist/index.js` — ESM bundle |
| 141 | +- `dist/index.d.ts` — bundled type declarations |
| 142 | +- Individual `.d.ts` files for each module (tsdown re-exports) |
| 143 | + |
| 144 | +Build outputs exist and are correct after running `pnpm build`. |
| 145 | + |
| 146 | +## Export maps |
| 147 | + |
| 148 | +All packages expose a single entry point `"."` with three conditions: |
| 149 | + |
| 150 | +```json |
| 151 | +{ |
| 152 | + ".": { |
| 153 | + "types": "./dist/index.d.ts", |
| 154 | + "import": "./dist/index.js", |
| 155 | + "default": "./dist/index.js" |
| 156 | + } |
| 157 | +} |
| 158 | +``` |
| 159 | + |
| 160 | +This is correct for ESM-only packages. No package currently exposes sub-path exports (e.g., `@intent/core/internal`), which is fine for alpha. |
| 161 | + |
| 162 | +## Type declarations |
| 163 | + |
| 164 | +All packages produce `dist/index.d.ts` with correct type declarations. |
| 165 | + |
| 166 | +The root `tsconfig.typecheck.json` maps `@intent/*` workspace packages to their source directories for type-checking without reading stale `dist/` output. |
| 167 | + |
| 168 | +Package-level `tsconfig.json` files use `composite: true` (except `@intent/server`, which lacks it) and extend the root config. |
| 169 | + |
| 170 | +## Files included in npm packages |
| 171 | + |
| 172 | +The `files` field in every package is `["dist"]`. Based on `npm pack --dry-run` output: |
| 173 | + |
| 174 | +| Package | Files in tarball | Size | |
| 175 | +|---|---|---| |
| 176 | +| `@intent/core` | 13 `dist/*` files + `package.json` (14 total) | 38.5 kB unpacked | |
| 177 | +| `@intent/dom` | 4 `dist/*` files + `package.json` (4 total) | 10.9 kB unpacked | |
| 178 | +| `@intent/router` | 3 `dist/*` files + `package.json` (4 total) | 6.5 kB unpacked | |
| 179 | +| `@intent/testing` | 2 `dist/*` files + `package.json` (3 total) | 4.5 kB unpacked | |
| 180 | +| `@intent/server` | 2 `dist/*` files + `package.json` (3 total) | 4.2 kB unpacked | |
| 181 | + |
| 182 | +No unnecessary files (source maps, config files, tests, node_modules) leak into the tarball. The `files` policy is correct. |
| 183 | + |
| 184 | +## Release workflow recommendation |
| 185 | + |
| 186 | +### Use Changesets |
| 187 | + |
| 188 | +[Changesets](https://github.com/changesets/changesets) is recommended for: |
| 189 | + |
| 190 | +- Version bumping (independent versioning per package) |
| 191 | +- Changelog generation per package |
| 192 | +- Coordinated publishing across the workspace |
| 193 | + |
| 194 | +### Recommended GitHub Action |
| 195 | + |
| 196 | +Add a Changeset-based GitHub Action (e.g., `changesets/action`) that: |
| 197 | + |
| 198 | +1. Runs on pushes to `main` |
| 199 | +2. Opens or updates a "Version Packages" PR when changeset files are present |
| 200 | +3. Publishes to npm when the version PR is merged |
| 201 | + |
| 202 | +### Publish cadence |
| 203 | + |
| 204 | +- Start with an **alpha release** (`0.1.0-alpha.0`) |
| 205 | +- Use `Changesets` pre-release mode for alpha/beta |
| 206 | +- Graduate to stable after API surface is settled and real-world usage begins |
| 207 | + |
| 208 | +### Validation gates |
| 209 | + |
| 210 | +Publishing should only happen after: |
| 211 | + |
| 212 | +- CI passes with clean-dist validation |
| 213 | +- `pnpm pack:check` passes |
| 214 | +- At least one maintainer reviews the version PR |
| 215 | + |
| 216 | +## GitHub Releases recommendation |
| 217 | + |
| 218 | +Use GitHub Releases generated from Changesets release notes. |
| 219 | + |
| 220 | +After a successful npm publish: |
| 221 | + |
| 222 | +1. Changesets creates a GitHub Release with auto-generated notes |
| 223 | +2. Tag the release with a semver version (e.g., `v0.1.0-alpha.0`) |
| 224 | +3. Include the changelog summary in the release body |
| 225 | + |
| 226 | +Do not manually create GitHub Releases. |
| 227 | + |
| 228 | +## First alpha release checklist |
| 229 | + |
| 230 | +- [ ] Confirm npm scope/package names (verify `@intent` org ownership) |
| 231 | +- [ ] Reconfirm MIT is the intended public license before publishing |
| 232 | +- [ ] Confirm package metadata (`repository` field in all packages) |
| 233 | +- [ ] Confirm package exports (all point to correct `dist/` paths — already correct) |
| 234 | +- [ ] Confirm package files (`files: ["dist"]` — already correct) |
| 235 | +- [ ] Confirm declaration files (`dist/index.d.ts` exists — already correct) |
| 236 | +- [ ] Run clean-dist validation (`rm -rf packages/*/dist examples/*/dist && pnpm test && pnpm typecheck && pnpm build && pnpm lint`) |
| 237 | +- [ ] Run `pnpm pack:check` |
| 238 | +- [ ] Add Changesets (`pnpm add -Dw @changesets/cli && pnpm changeset init`) |
| 239 | +- [ ] Add release workflow (GitHub Action for Changesets) |
| 240 | +- [ ] Publish first alpha (`pnpm changeset publish`) |
| 241 | +- [ ] Create GitHub Release (automatic via Changesets, or manual) |
| 242 | + |
| 243 | +## Current blockers |
| 244 | + |
| 245 | +Before first alpha release, the following must be resolved: |
| 246 | + |
| 247 | +1. **Missing `repository` fields** — Recommended for npm listing and source links. |
| 248 | +2. **`@intent` npm scope availability** — Must be verified. If unavailable, a fallback scope must be chosen before first release. |
| 249 | +3. **No release workflow** — Changesets and a GitHub Action must be added before publishing. |
| 250 | +4. **Server package is very early** — `@intent/server` has global registries and minimal API surface. Consider whether to publish it or mark it as private until more mature. |
| 251 | +5. **Version is `0.1.0` across all packages** — Consistent, but no pre-release tag (e.g., `0.1.0-alpha.0`) for the first publish. |
| 252 | + |
| 253 | +## Do not do yet |
| 254 | + |
| 255 | +- Do not publish any package to npm. |
| 256 | +- Do not create a GitHub Release. |
| 257 | +- Do not add Changesets yet — wait until the audit blockers are resolved. |
| 258 | +- Do not add a release GitHub Action yet. |
| 259 | +- Do not change package names, versions, or public APIs. |
| 260 | +- Do not add new dependencies unless required for a specific task. |
| 261 | + |
| 262 | +## Pack check command |
| 263 | + |
| 264 | +This PR adds a root pack-check command: |
| 265 | + |
| 266 | +```sh |
| 267 | +pnpm pack:check |
| 268 | +``` |
| 269 | + |
| 270 | +It dry-runs `npm pack` for all five workspace packages after build. It does not publish, does not require network access, and does not create committed tarballs. |
0 commit comments