LearnNewsExamplesServices
Frontmatter
id13098
titleGuard: top-level examples/ is Body-only — prevent AI/non-Body example misplacement (build-all breakage)
stateClosed
labels
enhancementaibuild
assigneesneo-opus-ada
createdAtJun 13, 2026, 4:01 PM
updatedAtJun 13, 2026, 5:26 PM
githubUrlhttps://github.com/neomjs/neo/issues/13098
authorneo-opus-vega
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 13, 2026, 5:26 PM

Guard: top-level examples/ is Body-only — prevent AI/non-Body example misplacement (build-all breakage)

Closed v13.1.0/archive-v13-1-0-chunk-2 enhancementaibuild
neo-opus-vega
neo-opus-vega commented on Jun 13, 2026, 4:01 PM

Problem

Top-level examples/ is reserved for Body (frontend) examples consumed by webpack build-all. When AI / harness / test examples are placed there, build-all breaks — it builds every examples/* subdir as a Neo app, and non-Neo / vanilla / app-less structures choke it.

This is a repeated friction item (operator-flagged 2026-06-13 on PR #13066: the harness-endurance benchmark — a falsifier with a vanilla single-main-thread comparator + an app-less shared/ dir — broke build-all there; explicitly "not a first time occurrence"). AI-domain examples belong under ai/examples/, which the dev-server's process.cwd() static root still serves (so browser e2e keeps working).

There is no mechanical guard preventing recurrence — it surfaces only when build-all breaks, or via human review.

Proposed Fix (two layers)

  1. CI guard (hard, PR-time): a check that scans top-level examples/ and FAILS with an actionable message — "examples/ is Body-only; AI / non-Body examples go under ai/examples/" — when a subdir is non-conforming (lacks the standard Neo-app layout app.mjs + index.html + neo-config.json, OR imports from ai/, OR is a non-Neo/vanilla app). Mirror the existing CI-lint pattern (e.g. lint-pr-body / retired-primitives).
  2. structural-pre-flight rule (soft, authoring-time): extend .agents/skills/structural-pre-flight (fires on new .mjs placement) to flag examples/-vs-ai/examples/ placement, so misplacement is caught before the file is written — closing the gap at the same 0th-level discipline point the skill already owns.

Acceptance Criteria

  • A CI check fails on a non-Body subdir under top-level examples/ with an actionable message pointing at ai/examples/.
  • structural-pre-flight flags an AI-domain example authored under top-level examples/.
  • The check passes for legitimate Body examples and for ai/examples/ content (no false positives).
  • A short note in the relevant doc (e.g. examples/ README or structural-pre-flight atlas) states the examples/ = Body-only / ai/examples/ = AI-domain convention.

Context

  • Immediate fix landed in PR #13066 (relocated the harness-endurance benchmark examples/ → ai/examples/, verified e2e 4/4 + units 16/16).
  • Operator framing (@tobiu, 2026-06-13): "reserved for body (frontend) only examples... this is not a first time occurrence, but repeated friction item. needs a solution to not happen again."

Authored by Claude Opus 4.8 (Claude Code, @neo-opus-vega / Vega).