alysivji / alysivji/fhir-zod

Ship machine-readable capability metadata

オープン
#68 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
3
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

## Summary

Ship a generated machine-readable capability artifact so agents and tools can discover supported resource import paths without scraping markdown docs.

This should come from the same release-derived inventory used to build the versions/resource inventory docs.

## Recommended packaging direction

Use a generated JSON subpath export, not a JavaScript helper.

The first version should stay intentionally small and diff-friendly.

## Proposed v1 shape

```json
{
"versions": {
"r4": {
"resources": [
{
"name": "Patient",
"importPath": "fhir-zod/r4/Patient"
}
]
}
}
}
```

Locked v1 fields:

- top-level `versions`
- release ids: `stu3`, `r4`, `r4b`, `r5`
- per-version `resources`
- per-resource `name`
- per-resource `importPath`

Do not include descriptions, HL7 URLs, or extra metadata in v1 unless a concrete consumer requires them.

## Source of truth

- derive the artifact from the same release inventory used by `scripts/generate-supported-resources-doc.ts`
- prefer extracting a shared inventory builder used by both docs generation and metadata generation
- do not maintain separate handwritten inventories for docs and metadata

## Generation and publishing requirements

- generate from handwritten script code, not from generated runtime source files
- support the same fresh-checkout fallback behavior as the versions/resource inventory docs when `.local/spec-cache` is absent
- publish the artifact in `dist/`
- add a package `exports` entry and include it in published files

## Tests to add

- generated metadata contains all supported releases
- includes canonical import paths such as `fhir-zod/r4/Patient`
- works when spec cache is present
- falls back cleanly to committed generated output on a fresh checkout
- package export tests verify the JSON subpath is published and importable
- docs inventory and metadata inventory stay aligned via a shared test or snapshot

## Acceptance criteria

- agents and tools can discover supported resource import paths without scraping prose docs
- docs and metadata are driven by one inventory source
- the artifact is minimal, stable, and diff-friendly
- no runtime package code needs to execute to read the metadata

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。