Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ebcabf8
Feat: Show the Agent Install Command Beside npm on the Homepage
jlukic Nov 21, 2026
c6bceb1
Build: Ship Skills at skills/<name>/SKILL.md in the Published Package
jlukic Nov 21, 2026
d8702c1
Docs: Add Skills Discovery Index
jlukic Nov 21, 2026
c345c14
Feat: Add Agent Setup Command
jlukic Nov 21, 2026
99fe8da
Feat: Give the Agent Setup Command the House Terminal Voice and a Che…
jlukic Nov 21, 2026
90bdc28
Feat: Let the Homepage Install Line Switch Between npm and Agent Setup
jlukic Nov 21, 2026
2a7d729
Feat: Ask in the Agent Setup Command One Question at a Time
jlukic Nov 22, 2026
9a1602a
Bug: Step Back From the Checklist With Esc and Exit 0 When Declined
jlukic Nov 22, 2026
a7a1255
Bug: Offer an Update When an Older Version Is Installed and Keep Skil…
jlukic Nov 22, 2026
afa8d91
Chore: Reword the Agent Setup Command's Prose
jlukic Nov 22, 2026
2b69b19
Test: Match the Setup Command's Usage Line in Either Case
jlukic Nov 22, 2026
d84c5e9
Chore: Tighten Four Lines of the Agent Setup Command's Prose
jlukic Nov 22, 2026
37c3343
Test: Assert What the Setup Command Does, Not Its Wording
jlukic Nov 22, 2026
0b8dcda
Test: Read the Setup Command's Messages From Its Copy Table
jlukic Nov 22, 2026
1f601ae
Feat: Ask Whether to Install Skills in This Project or Everywhere
jlukic Nov 22, 2026
62e0c05
Chore: Call the Machine-Wide Skill Install Global
jlukic Nov 23, 2026
70427a8
Feat: Ink Commands and Paths in the Setup Command's Output
jlukic Nov 23, 2026
65f4920
Feat: Name the Agents Each Skills Folder Is For and Grey Out Deselect…
jlukic Nov 23, 2026
9e7ae48
Chore: Tighten Global and Plugin Setup Prose
jlukic Nov 23, 2026
eddbcfa
Test: Let the Marketplace Version Gate Fail When the File Is Stale
jlukic Nov 23, 2026
b956737
Bug: Fix Repeat Runs, Workspaces, Lost Note Content, and Unwritable F…
jlukic Nov 23, 2026
62f694c
Bug: Link Through Linked Skill Folders, Follow the Installed Copy's S…
jlukic Nov 23, 2026
1e562a7
Bug: Name the Latest Version in the Homepage Line and the Setup Comma…
jlukic Nov 23, 2026
5e8e54b
Bug: Find the Package Beside a Linked Alias on Windows
jlukic Nov 23, 2026
b92c081
Docs: Rewrite P1 and P2 Project Decision Entries
jlukic Nov 23, 2026
fe12f43
Feat: Say in the Project Note That Its Skill Matches the Installed Ve…
jlukic Nov 23, 2026
de13826
Chore: Merge main into feat/agent-install
jlukic Nov 23, 2026
5ede770
Chore: Tighten the Project Note's Last Sentence
jlukic Nov 23, 2026
631525f
Bug: Fix Junction Targets on Windows, Turn Stale Copies Into Links, a…
jlukic Nov 23, 2026
dca28da
Docs: Say How the Marketplace File Is Updated After a Version Bump
jlukic Nov 23, 2026
7a028b9
Harness: Remove the Confidence Line From P2
jlukic Nov 23, 2026
b1757b4
Bug: Claim a Skill Matches the Installed Version Only Where It Is the…
jlukic Nov 23, 2026
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
18 changes: 18 additions & 0 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "native-dates",
"owner": {
"name": "Jack Lukic"
},
"plugins": [
{
"name": "native-dates",
"description": "Natural-language dates, times, durations, and ranges built on the browser's Temporal and Intl APIs",
"version": "0.0.6",
"source": {
"source": "npm",
"package": "native-dates",
"version": "0.0.6"
}
}
]
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ dist
# scratch files for agents and the maintainer, never committed
ai/workspace/

# ai/skills laid out for the npm tarball, written by prepack and removed by postpack
/skills/
/plugin.json
/.claude-plugin/plugin.json

# worktrees and local state an agent keeps beside the repo, never committed
.claude/
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ Ask the maintainer rather than inventing conventions for:
- `npm run types`: Type-check `.d.ts` declarations via `tsc --noEmit` under NodeNext and `bundler` resolution (`test/types.ts`)
- `npm run errors`: Check error and log prose register (`tools/gates/errors.js`)
- `npm run comments`: Check comment density, overlap, and banned jargon (`tools/gates/comments.js`)
- `npm run ai`: Validate markdown links, `#anchors`, GFM tables, `ai/` paths, `decisions.md`, and `AGENTS.md` symlinks (`tools/gates/ai.js`)
- `npm run ai`: Validate markdown links, `#anchors`, GFM tables, `ai/` paths, skill frontmatter, `decisions.md`, and `AGENTS.md` symlinks (`tools/gates/ai.js`)
- `npm run ai:index`: Regenerate `ai/contributing/decisions.md` from `ai/contributing/decisions/package.md` (`tools/gates/decisions-index.js`)
- `npm run size`: Measure minified and Brotli-11 sizes for `native-dates` and every plugin in `@native-dates/plugins`, and check `ai/contributing/budget.md` ([`tools/ci/bundle/README.md`](tools/ci/bundle/README.md))
- `npm run bench`: Run headless Chrome benchmarks in `bench/` via `tachometer` ([`tools/ci/bench/README.md`](tools/ci/bench/README.md))
- `npm run setup:demo`: Run `npx native-dates` from this checkout in a throwaway project, served by a registry on loopback (`tools/setup-demo.js`)
- `npm run docs`: Start the Astro docs dev server (`docs/`, see [`docs/README.md`](docs/README.md))
- `npm run format`: Format files with `dprint`
- `npm run setup`: Install git hooks from `tools/hooks/`
2 changes: 1 addition & 1 deletion ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

## Skills

Files in [skills](skills/) ([`native-dates.md`](skills/native-dates.md) and [`native-dates-plugins.md`](skills/native-dates-plugins.md)) are included in the npm package for coding agents reading from installed dependencies, served by the docs site at `/skills/<skill>.md`, and listed in `/llms.txt` and `/llms-full.txt`.
Files in [skills](skills/) ([`native-dates.md`](skills/native-dates.md) and [`native-dates-plugins.md`](skills/native-dates-plugins.md)) ship in the npm package as `skills/<name>/SKILL.md`, the layout pnpm and skill installers read from an installed dependency (`prepack` writes it with `tools/skills.js`). The docs site serves the same files at `/skills/<skill>.md` and lists them in `/llms.txt` and `/llms-full.txt`.

Agents receive a skill on its own without the rest of this repository. Read the [authoring standard](contributing/standards/ai-author-context.md) and the [skill workflow](contributing/workflows/author-skill.md) before writing or editing one.

Expand Down
12 changes: 12 additions & 0 deletions ai/contributing/decisions/project.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Project Decisions

> Append-only log (`P1`..`Pn`) governing repository process, CI gates, documentation workflow, and releases. Read [`README.md`](README.md) before adding an entry; package API and runtime behavior belong in [`package.md`](package.md), never here.

## P1: Keep skills in `ai/skills/` and generate `skills/<name>/SKILL.md` only at pack time (2026-11-21)

Skill installers (`pnpm`, `skills experimental_sync`, and TanStack Intent) expect `skills/<name>/SKILL.md` at the root of an installed package and ignore `ai/skills/<name>.md`. Committing a top-level `skills/` directory would also allow `npx skills add` and `gh skill install` directly from GitHub, but it would split agent files across two top-level directories instead of keeping them under `ai/`. Instead, `tools/skills.js` generates `skills/<name>/SKILL.md` during `prepack` and cleans it up in `postpack`.

Reopen: direct GitHub installs (`npx skills add`, `gh skill install`) become worth supporting; both require committed `SKILL.md` files (which they can discover at `ai/skills/<name>/SKILL.md` without a root `skills/` directory).

## P2: `@native-dates/core` references `native-dates` skills instead of shipping copies (2026-11-21)

Shipping duplicate `skills/` in both tarballs breaks projects that depend on both packages: `skills experimental_sync` drops conflicting names altogether, `pnpm` installs each skill twice under `pnpm-<package>-<skill>`, and TanStack Intent lists four skills for every `@native-dates/core` project. Declaring `"skills": ["npm:native-dates"]` in `@native-dates/core` fixes `skills experimental_sync` without duplication, and Intent already discovers skills through the `native-dates` dependency. The tradeoff is that `pnpm` only scans `skills/` in direct dependencies, so pnpm users who install only `@native-dates/core` do not get skills automatically.

Reopen: pnpm users of `@native-dates/core` report missing skills, or pnpm adds support for a `package.json` skills pointer or transitive skill discovery.
9 changes: 5 additions & 4 deletions ai/contributing/reference/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
| Path | Package | Contents |
|---|---|---|
| `src/` | `native-dates` | Core date library: `index.js` barrel, one noun class per file (`range.js` holds `Range` and its three subclasses), and category-grouped utilities in `helpers/` |
| `bin/` | `native-dates` | The `npx native-dates` setup command. `native-dates.js` holds this library's words, and `agent-setup/` is the command itself (`Setup`, `Project`, `Terminal`), written to be copied whole by sibling libraries: it installs the package, links its skills into `.agents/skills` and `.claude/skills`, and adds a note to `AGENTS.md`, asking first. Node built-ins only, never imported by `src/`. `npm run setup:demo` runs it against this checkout without publishing. With `--global`, or the answer "Globally", it runs each found agent's own plugin install instead of linking project folders (`Project.agents` is the table of agents, their binaries and commands) |
| `types/` | | Hand-authored TypeScript declarations mirroring `src/`. Their doc comments power editor hover/autocomplete (`@see` links follow [`types.md`](../standards/types.md)) |
| `ai/skills/` | `native-dates` | Agent skills (`native-dates.md`, `native-dates-plugins.md`), published in `package.json` `"files"` and served via `/skills/<skill>.md`, `/llms.txt`, and `/llms-full.txt` ([`ai-author-context.md`](../standards/ai-author-context.md)) |
| `ai/skills/` | `native-dates` | Agent skills (`native-dates.md`, `native-dates-plugins.md`), packed into the npm tarball as `skills/<name>/SKILL.md` by `tools/skills.js` and served via `/skills/<skill>.md`, `/llms.txt`, `/llms-full.txt`, and the discovery index `/.well-known/agent-skills/index.json` ([`author-skill.md`](../workflows/author-skill.md), [`ai-author-context.md`](../standards/ai-author-context.md)). `prepack` also stamps the package version into each packed skill's `metadata.version`, writes `plugin.json` and `.claude-plugin/plugin.json` into the tarball, while the committed `.claude-plugin/marketplace.json` points agents' plugin installs at the npm release. Packing leaves that file alone: after a version bump, `node tools/skills.js stamp` rewrites it, and a test fails until it matches `package.json` |
| `ai/contributing/` | private | Internal design decisions, bundle budget, project roadmap, upstream standards, and contributor workflows |
| `packages/core/` | `@native-dates/core` | Thin scoped re-export of `native-dates` |
| `packages/core/` | `@native-dates/core` | Thin scoped re-export of `native-dates`, with a `"skills"` field pointing agent tooling at the skills `native-dates` ships and a `bin.js` that hands `npx native-dates` to the same setup command |
| `packages/plugins/` | `@native-dates/plugins` | Opt-in side-effect plugins (`zones`, `loose`, `legacy-date`) in `src/`, with module-augmentation declarations in `types/` |
| `packages/polyfill/` | `@native-dates/polyfill` | Conditional `temporal-polyfill` loader that dynamically imports the polyfill only when `globalThis.Temporal` is absent |
| `docs/` | private | Astro documentation site (`nativedates.dev`, see [`docs/README.md`](../../../docs/README.md)) |
| `tools/` | private | Static gates (`gates/{ai,budget,prose,errors,comments}.js`), CI bundle size reporter (`ci/bundle/`), git hooks (`hooks/`), and `size.js` |
| `tools/` | private | Static gates (`gates/{ai,budget,prose,errors,comments}.js`), CI bundle size reporter (`ci/bundle/`), git hooks (`hooks/`), `size.js`, and the skill packer `skills.js` |

How `src/` is laid out and how a class is structured follow [`folders-and-filenames.md`](../standards/legibility/folders-and-filenames.md), [`code-structures.md`](../standards/legibility/code-structures.md), and [`coding-standards.md`](../standards/coding-standards.md).

Expand Down Expand Up @@ -68,7 +69,7 @@ Opt-in plugins live in `packages/plugins/src/` (`@native-dates/plugins`, `"sideE
- `npm run types`: `tsc --noEmit` (under both NodeNext and `bundler` resolution) over `test/types.ts` against hand-authored `.d.ts` declarations.
- `npm run errors`: `tools/gates/errors.js` checking `. Capital` splits, punctuation, structured error helpers, and error code vocabulary.
- `npm run comments`: `tools/gates/comments.js` checking comment ratios, run length, word overlap, and banned process jargon.
- `npm run ai`: `tools/gates/ai.js` checking Markdown links, `#heading` anchors, GFM tables, `ai/` paths, and `AGENTS.md` symlinks.
- `npm run ai`: `tools/gates/ai.js` checking Markdown links, `#heading` anchors, GFM tables, `ai/` paths, skill frontmatter, and `AGENTS.md` symlinks.
- `npm run size`: `tools/gates/budget.js` over the rows of `tools/size.js`.

## Bundle Size Measurement
Expand Down
19 changes: 10 additions & 9 deletions ai/contributing/workflows/author-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Read the [authoring standard](../standards/ai-author-context.md) before writing

## Delivery and Layout

Skills in `ai/skills/` are published with the `native-dates` npm package (`"files"` in `package.json`) and served by the docs site through `/skills/<skill>.md` and `/llms.txt`. An optional MCP server can expose the same files to tool-calling agents.
Skills in `ai/skills/` are published with the `native-dates` npm package, where `prepack` lays each one out as `skills/<name>/SKILL.md` (`tools/skills.js`), the folder pnpm and skill installers read from an installed dependency. The docs site serves the same files through `/skills/<skill>.md` and `/llms.txt`. An optional MCP server can expose the same files to tool-calling agents.

| Layout | Path pattern | When to use |
|---|---|---|
Expand All @@ -34,7 +34,7 @@ Keep contributor records and docs workflows in `ai/contributing/` so they stay o
1. Discuss goals, non-goals, and edge cases with the author before drafting if no outline exists yet.
2. Read the implementation across `src/`, `types/`, `packages/plugins/`, and `packages/polyfill/`, along with the user docs and examples in `docs/src/content/`. Ignore old skills being replaced so their framing does not carry over.
3. Treat each skill as self-contained. Downstream agents load one file without repository access, so the survey shows what to distill into the skill rather than what to leave out.
4. Confirm the title, `skill` identifier, audience, and consumption subtype with the author:
4. Confirm the title, `name` identifier, audience, and consumption subtype with the author:

| Subtype | How agents read it | Length budget |
|---|---|---|
Expand All @@ -56,16 +56,17 @@ Split along user intents rather than arbitrary line counts. If Skill B is unusab

## Phase 2: Writing

Create each file in `ai/skills/` with the frontmatter required by the [authoring standard](../standards/ai-author-context.md):
Create each file in `ai/skills/` with [Agent Skills](https://agentskills.io/specification) frontmatter. The format requires `name` and `description`, and its reference validator rejects any key the format does not define, so the fields from the [authoring standard](../standards/ai-author-context.md) sit under `metadata` as strings (checked by `npm run ai`):

```yaml
---
title: Action-Oriented Title
description: Concise scope statement of what the skill covers and what belongs in companion skills.
keywords: [search, terms, beyond, title, "@native-dates/plugins"]
audience: usage # essentials | usage | authoring
skill: kebab-case-id
type: skill # skill | workflow | ref
name: kebab-case-id # the file name, and the folder in skills/<name>/SKILL.md
description: "Concise scope statement of what the skill covers, when to load it, and what belongs in companion skills (1024 characters at most)."
metadata:
title: Action-Oriented Title
keywords: "search, terms, beyond, title, @native-dates/plugins"
audience: usage # essentials | usage | authoring
type: skill # skill | workflow | ref
---
```

Expand Down
11 changes: 6 additions & 5 deletions ai/skills/native-dates-plugins.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Plugins, Loose Parsing, Zone Aliases, and Polyfill for native-dates
name: native-dates-plugins
description: "Companion guide for @native-dates/plugins (zones, loose, legacy-date), @native-dates/polyfill, and authoring custom native-dates prototype plugins. Use whenever code parses localized, non-ISO, or slash/dot dates and times ('06/11/2026', '17 octobre 2026', '오후 2:30', non-ASCII digits, { loose: true, dayFirst }), resolves city names ('Berlin', 'Beijing', 'Mumbai') or locale-aware timezone abbreviations ('CST', 'IST', 'EST', 'PT', zoneAliases), shims legacy Date.prototype getters (getFullYear, getMonth, getDay), polyfills Temporal on Safari, older browsers, or Node <26, or extends native-dates class prototypes."
keywords: ["@native-dates/plugins", "@native-dates/polyfill", "temporal-polyfill", zones, loose, legacy-date, dayFirst, zoneAliases, timezones, getFullYear, getTimezoneOffset, sideEffects, missingPlugin]
audience: usage
skill: native-dates-plugins
type: skill
metadata:
title: Plugins, Loose Parsing, Zone Aliases, and Polyfill for native-dates
keywords: "@native-dates/plugins, @native-dates/polyfill, temporal-polyfill, zones, loose, legacy-date, dayFirst, zoneAliases, timezones, getFullYear, getTimezoneOffset, sideEffects, missingPlugin"
audience: usage
type: skill
---

# Plugins, Loose Parsing, Zone Aliases, and Polyfill for native-dates
Expand Down
11 changes: 6 additions & 5 deletions ai/skills/native-dates.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Dates, Times, Zones, Durations, and Ranges with native-dates
name: native-dates
description: "Core guide for building with native-dates (and @native-dates/core). Use whenever code creates, parses, shifts, rounds, compares, ranges over, or formats dates, clock times, zoned timestamps, durations, billing months, or recurring month-days, handles DST or HTTP Accept-Language locales, or migrates off Date, Moment, Day.js, date-fns, Luxon, or raw Temporal. For city/abbreviation zones, { loose: true } parsing, legacy Date getters, or the Temporal polyfill on Safari and Node <26, also load native-dates-plugins."
keywords: [native-dates, "@native-dates/core", datetime, date, time, duration, monthDay, yearMonth, dateRange, datetimeRange, timeRange, today, now, dayOfWeek, epochSeconds, epochMilliseconds, configure, Accept-Language, Temporal, Intl, DST]
audience: usage
skill: native-dates
type: skill
metadata:
title: Dates, Times, Zones, Durations, and Ranges with native-dates
keywords: "native-dates, @native-dates/core, datetime, date, time, duration, monthDay, yearMonth, dateRange, datetimeRange, timeRange, today, now, dayOfWeek, epochSeconds, epochMilliseconds, configure, Accept-Language, Temporal, Intl, DST"
audience: usage
type: skill
---

# Dates, Times, Zones, Durations, and Ranges with native-dates
Expand Down
9 changes: 9 additions & 0 deletions bin/agent-setup/helpers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// the two @semantic-ui/utils string helpers this command reaches, trimmed to the branches it uses

// fills {name} placeholders, and keeps one it has no value for so a typo in the copy shows itself
export const fill = (template, values = {}) =>
template.replace(/\{(\w+)\}/g, (placeholder, key) => (values[key] === undefined ? placeholder : String(values[key])));

// 'a', 'a and b', 'a, b, and c'
export const joinWords = (words) =>
words.length < 3 ? words.join(' and ') : `${words.slice(0, -1).join(', ')}, and ${words[words.length - 1]}`;
Loading