diff --git a/AGENTS.md b/AGENTS.md index 047b4ed..d358fb5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,14 +16,17 @@ Static client-side yard mapping app. Core files: - `src/lib/geometry.js`: absolute points, local offsets, feet conversion, per-anchor rotation support. -- `src/lib/feature-types.js`: feature-kind style defaults. -- `src/lib/yard-features.js`: typed feature classes, stable ids, groups, parent-child relationships, GeoJSON export. +- `src/lib/feature-types.js`: feature-kind labels, geometry constraints, detail field schemas, and style defaults. +- `src/lib/yard-features.js`: typed feature classes, stable ids, groups, parent-child relationships, schema metadata, GeoJSON export. - `src/data/*.js`: yard content split by domain. - `src/main.js`: Leaflet map, legend, popup rendering. Top-level exported data shape from `src/data/yard.js`: - `type: "FeatureCollection"` +- `schemaVersion: 1` +- `lifecycleFields: { startDate: "date", endDate: "date" }` +- `featureTypes: [...]` - `features: [...]` - `groups: [...]` @@ -33,10 +36,11 @@ Each feature currently exports: - `properties.kind` - `properties.label` - `properties.name` +- `properties.startDate` +- `properties.endDate` - `properties.parentId` - `properties.groupIds` - `properties.details` -- `properties.style` ## Important decisions already made diff --git a/README.md b/README.md index 5a78759..9c093b0 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ The project currently has: - A static Leaflet map with OSM raster tiles. - Client-side JavaScript-authored yard geometry converted to GeoJSON at load time. - Typed feature classes with centralized styling. +- Schema-versioned yard data with a top-level feature type catalog. - Per-anchor local coordinate rotation for offset-based authoring. - Feature relationship metadata (`id`, `parentId`, `groupIds`) and a top-level group catalog for future visibility controls. - Example yard data mostly copied from `buildings.gpkg` and then preserved as JS modules. @@ -33,13 +34,13 @@ The example yard is now split by concern: - `src/data/plants.js` - `src/data/irrigation.js` -The typed feature registry lives in `src/lib/feature-types.js`, feature classes live in `src/lib/yard-features.js`, and shared coordinate helpers live in `src/lib/geometry.js`. +The typed feature registry lives in `src/lib/feature-types.js`, feature classes live in `src/lib/yard-features.js`, and shared coordinate helpers live in `src/lib/geometry.js`. Feature type definitions include the label, required geometry type, known detail fields, and default Leaflet style. Local `north`, `south`, `east`, and `west` offsets are rotated per anchor. In this example, `topLeftLotCorner` in `src/data/anchors.js` carries `assumedNorthClockwiseDegrees` from `src/data/settings.js`. A negative value means that anchor's local north is counterclockwise from true north, so local east drifts a bit toward true north. Most example geometry was copied from `buildings.gpkg` and preserved as JS-authored coordinates. Tree records also carry custom attributes like canopy diameter, height, and planted date for popup rendering. -Feature relationships are exported with each GeoJSON feature as stable `id`, `parentId`, and `groupIds` properties, and the collection also exposes a top-level `groups` array. The current sample marks the porch and deck as part of the house and groups the Medora junipers under `Juniper Trees`. +Feature relationships are exported with each GeoJSON feature as stable `id`, `parentId`, and `groupIds` properties. Each feature also exports universal `startDate` and `endDate` lifecycle fields for future time-slider filtering. The collection exposes `schemaVersion`, `lifecycleFields`, `featureTypes`, and `groups` at the top level. Style is resolved from the feature type registry at render time rather than stored on each exported feature. The current sample marks the porch and deck as part of the house and groups the Medora junipers under `Juniper Trees`. ## Project structure diff --git a/index.html b/index.html index cd2cb15..9d61ed1 100644 --- a/index.html +++ b/index.html @@ -4,12 +4,7 @@