mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-11 19:47:12 +03:00
* feat: add ascii-city-engine skill New skill teaching portable first-person colored-ASCII city engines and small GIS-derived city packs: - references/engine-architecture.md: terrain height function, ground- attached pedestrian physics (feet_z=terrain(x,y), step/slope limits, building-footprint collision with wall sliding), fisheye-corrected raycast-to-ASCII pipeline, glyph density ladder, deterministic color. - references/city-provider-contract.md: manifest + world-tile semantics, single-height-per-column v1 limit, reserved surface-graph extension. - references/gis-ingestion.md: USGS 3DEP/OSM/municipal source classes, meter-CRS reprojection, unit checks, 3.2 m/floor height fallback, provenance/confidence recording. - references/raleigh-poc.md: numeric downtown bbox, named sources with URLs, acquire/convert/validate commands, 4 human acceptance checks. - templates/: city-pack-manifest + world JSON Schemas. - scripts/validate-city-pack.py: pure-stdlib offline validator (78 rules). - assets/raleigh-downtown-sample/: committed coarse pack (30 real OSM buildings, 25 road/path surfaces, 78x64 10 m terrain) <= 64K. - assets/ascii-city-engine.html: dependency-free Canvas 2D engine. - evals/evals.json: 6 schema-valid cases incl. runtime-specificity and large-GIS-commit refusal boundaries. - README.md catalog entry. AI-assisted contribution (Hermes Agent, spec-driven-development pipeline). * chore: regenerate claude marketplace for ascii-city-engine * chore: regenerate codex plugin and llms.txt for ascii-city-engine * fix(ascii-city-engine): address droid-review findings on PR #321 1. [P2] Engine scaffold now reads manifest.json for spawn + first tile instead of hardcoding (315,385) — restores pack interchangeability. 2. [P2] Validator all_points() guards isinstance(dict) so structurally invalid tiles report FAIL instead of crashing with AttributeError. 3. [P2] raleigh-poc acceptance walk: correct duration/elevation math (~25s/~100m to ~100.9m at (315,505); ~95s to north edge ~103.0m). 4. [P3] known-limitations: match committed data — 5/30 explicit OSM height (0.88), 25 floor-estimated (0.72), not ~26%/0.55/0.35. 5. [P3] bbox: document tangent-plane 632x779m vs normalized 630x770m working extent instead of asserting 630x770 as the conversion result. 6. [P3][security] cap polygon vertices (2000), elevation cells (4M), feature count to prevent O(n^2) CPU-exhaustion on crafted packs. Verified: sample pack 79/79 PASS exit 0; broken fixture exit 1; droid AttributeError repro now FAILs cleanly; 5000-vertex footprint rejected in 58ms; node --check OK; validate-skills.rb 154 green; blocklist clean.
43 lines
2.8 KiB
Markdown
43 lines
2.8 KiB
Markdown
---
|
|
name: ascii-city-engine
|
|
description: Build portable, first-person colored ASCII city engines and small GIS-derived city packs. Use when designing terrain-following walking, raycast character rendering, city-provider schemas, or reproducible public-GIS ingestion. Do not use for conventional 3D/WebGL games, multi-level interiors, general GIS analysis, or committing full-resolution GIS archives.
|
|
---
|
|
|
|
# ASCII City Engine
|
|
|
|
Build a portable city experience in three layers: an engine, a city-provider contract, and a city pack. Keep city-specific facts out of engine code.
|
|
|
|
## Workflow
|
|
|
|
1. Define the pack boundary and local meter-based CRS.
|
|
2. Acquire elevation, building, and road/path data from public sources.
|
|
3. Verify downloads, licenses, units, and provenance before conversion.
|
|
4. Reproject all geometry to local meters and emit the manifest plus world tiles.
|
|
5. Validate the pack offline:
|
|
```sh
|
|
python3 scripts/validate-city-pack.py path/to/city-pack
|
|
```
|
|
6. Load the pack's first tile in `assets/ascii-city-engine.html` and test movement, grade following, and solid footprints.
|
|
7. Record data limitations and human acceptance evidence.
|
|
|
|
## Required invariants
|
|
|
|
- Compute `feet_z` from terrain and `eye_z` from feet plus eye height.
|
|
- Reject null terrain, over-steep steps, and movement touching a solid footprint.
|
|
- Use deterministic building colors and clear missed rays every frame.
|
|
- Treat v1 as one ground height per `(x, y)` column; reserve, but do not implement, a surface graph.
|
|
- Keep the engine independent of any city, vendor, agent harness, or private infrastructure.
|
|
- Do not commit large or full-resolution source data. Commit only a small redistributable sample; document acquisition for the rest.
|
|
|
|
## Reference routing
|
|
|
|
- Read [references/engine-architecture.md](references/engine-architecture.md) for world math, rendering, collisions, and the scaffold contract.
|
|
- Read [references/city-provider-contract.md](references/city-provider-contract.md) when creating or validating a provider.
|
|
- Read [references/gis-ingestion.md](references/gis-ingestion.md) before downloading or converting GIS sources.
|
|
- Read [references/raleigh-poc.md](references/raleigh-poc.md) for the reproducible Raleigh proof of concept.
|
|
- Use [templates/city-pack-manifest.schema.json](templates/city-pack-manifest.schema.json) and [templates/world.schema.json](templates/world.schema.json) as authoritative data contracts.
|
|
|
|
## Boundaries
|
|
|
|
Use a different skill or implementation approach for WebGL/GPU rendering, mobile controls, combat, interiors, bridges with traversable space below, tunnels, or general-purpose geospatial analysis. If asked to specialize this skill for one agent runtime, preserve the portable core and put runtime integration outside this skill. If asked to commit large GIS binaries, refuse and provide reproducible download/conversion commands instead.
|