Skip to content

Commit 1e8254e

Browse files
author
DavidQ
committed
BUILD_PR: add metadata layer for samples and integrate with index generation
1 parent 718b8b8 commit 1e8254e

10 files changed

Lines changed: 1926 additions & 330 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 8 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,14 @@
1-
# Codex command for PLAN_PR_SAMPLES_METADATA_LAYER
2-
31
MODEL: GPT-5.4-codex
42
REASONING: high
53

64
COMMAND:
7-
Create PLAN_PR_SAMPLES_METADATA_LAYER as docs-only planning.
8-
9-
OBJECTIVE:
10-
Define a minimal metadata layer for canonical sample paths so the generated samples index can render stable human-readable titles, descriptions, and tags.
11-
12-
CONSTRAINTS:
13-
- docs only
14-
- no implementation code changes
15-
- no gameplay scope
16-
- no engine-core scope
17-
- no start_of_day directory changes
18-
19-
PLANNING REQUIREMENTS:
20-
1. Define the minimal metadata schema
21-
2. Define where the metadata should live
22-
3. Define source-of-truth boundaries between:
23-
- canonical folder structure
24-
- metadata content
25-
- generated index rendering
26-
4. Define fail-fast rules for:
27-
- duplicate IDs
28-
- duplicate entries
29-
- phase/sample mismatches
30-
- missing required fields
31-
5. Keep the future BUILD testable and narrowly scoped
5+
Execute BUILD_PR_SAMPLES_METADATA_LAYER
326

33-
OUTPUT FILES:
34-
- docs/pr/PLAN_PR_SAMPLES_METADATA_LAYER.md
35-
- docs/dev/commit_comment.txt
36-
- docs/dev/reports/change_summary.txt
37-
- docs/dev/reports/validation_checklist.txt
38-
- docs/dev/reports/file_tree_delta.txt
7+
ENVIRONMENT:
8+
- Windows
9+
- Use Node.js only
10+
- No npm install
11+
- No node_modules
3912

40-
ZIP OUTPUT REQUIREMENT:
41-
- MUST produce ZIP:
42-
<project folder>/tmp/PLAN_PR_SAMPLES_METADATA_LAYER.zip
43-
- Task is not complete until the ZIP exists at that exact path
13+
ZIP:
14+
<project folder>/tmp/BUILD_PR_SAMPLES_METADATA_LAYER.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
PLAN_PR_SAMPLES_METADATA_LAYER
2-
3-
- Define minimal samples metadata schema for generated index rendering
4-
- Define metadata location and source-of-truth boundaries
5-
- Define fail-fast validation rules (duplicates, mismatches, missing fields)
6-
- Keep future BUILD narrowly scoped and testable
7-
- Docs-only planning; no implementation code changes
1+
BUILD_PR: add metadata layer for samples and integrate with index generation
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
BUILD_PR_SAMPLES_METADATA_LAYER VALIDATION REPORT
2+
3+
Files changed for this BUILD:
4+
- scripts/generate-samples-index.mjs
5+
- samples/metadata/samples.index.metadata.json
6+
- samples/index.html
7+
- docs/dev/reports/BUILD_PR_SAMPLES_METADATA_LAYER_validation.txt
8+
9+
Validation executed:
10+
1) node scripts/generate-samples-index.mjs
11+
- OK phases=15 samples=197 metadata=197 mode=write
12+
2) node scripts/generate-samples-index.mjs --check
13+
- OK phases=15 samples=197 metadata=197 mode=check
14+
3) Representative link checks from generated index:
15+
- first sample in a populated phase: 0101 -> ./phase01/0101/index.html
16+
- last sample in a populated phase: 1506 -> ./phase15/1506/index.html
17+
- phase 13 samples: 1316, 1317, 1318 present and resolvable
18+
19+
Fail-fast checks implemented in generator:
20+
- malformed phase folders
21+
- malformed sample folders
22+
- duplicate sample IDs in canonical tree
23+
- missing canonical sample entrypoint index.html
24+
- missing metadata file
25+
- duplicate metadata phase entries
26+
- duplicate metadata sample entries
27+
- phase/sample mismatches
28+
- missing required metadata fields
29+
- non-canonical metadata phase/sample entries
30+
31+
Scope confirmation:
32+
- gameplay untouched
33+
- engine core untouched
34+
- implementation limited to samples metadata layer + index generation integration
Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1 @@
1-
CHANGE SUMMARY
2-
3-
Purpose:
4-
- prevent accidental dependency installation in repo workflow
5-
- prohibit node_modules creation
6-
- add cleanup scripts for repo-root node_modules deletion
7-
8-
Included:
9-
- Codex rule updates
10-
- workflow/checklist/stop-condition updates
11-
- delete scripts: PowerShell, batch, and zero-dependency Node.js
1+
Add metadata layer, integrate with index, validate canonical paths
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
PLAN_PR_SAMPLES_METADATA_LAYER DELTA
1+
ADDED:
2+
- metadata source file
23

3-
Modified:
4-
- docs/pr/PLAN_PR_SAMPLES_METADATA_LAYER.md
5-
- docs/dev/commit_comment.txt
6-
- docs/dev/reports/change_summary.txt
7-
- docs/dev/reports/validation_checklist.txt
8-
- docs/dev/reports/file_tree_delta.txt
9-
10-
Scope:
11-
- docs-only planning
12-
- no implementation/runtime code changes
4+
MODIFIED:
5+
- samples/index.html
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
[ ] Codex docs explicitly prohibit npm install / npm init
2-
[ ] Codex docs explicitly prohibit package.json / package-lock.json creation without approval
3-
[ ] Codex docs explicitly prohibit repo-root node_modules
4-
[ ] node_modules appearance is defined as stop-and-report
5-
[ ] cleanup scripts target only repo-root node_modules
6-
[ ] bundle ZIP exists under <project folder>/tmp/
1+
[ ] metadata file exists
2+
[ ] ids match folders
3+
[ ] index renders titles
4+
[ ] no broken links
5+
[ ] zip exists
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# BUILD_PR_SAMPLES_METADATA_LAYER
2+
3+
## Objective
4+
Implement metadata layer for samples and integrate with index generation.
5+
6+
## Scope
7+
- Add metadata source (JSON or JS)
8+
- Wire into samples index generation
9+
- Validate against canonical paths (phasexx/xxyy)
10+
11+
## Out of Scope
12+
- gameplay
13+
- engine changes
14+
15+
## Acceptance
16+
- metadata drives titles/descriptions
17+
- links resolve correctly
18+
- fail-fast on mismatches

0 commit comments

Comments
 (0)