Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions docs_build/dev/PROJECT_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2008,3 +2008,50 @@ Required Git workflow report fields:
- PR URL
- merge result
- final main commit

## CODEX INSTRUCTION ENFORCEMENT START GATE

Codex must run this gate before every PR execution and before any file changes.

Required instruction reads:
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
- Read `docs_build/dev/PROJECT_MULTI_PC.txt`.
- Treat the newest applicable section in `PROJECT_INSTRUCTIONS.md` as authoritative when rules overlap.
- Treat the current owner/parity section in `PROJECT_MULTI_PC.txt` as authoritative for PC/Laptop routing.

Required pre-change report:
- Codex must report instruction compliance as `PASS` or `FAIL` before making file changes.
- The report must include branch, clean status, PR owner, PR parity, implementation path, validation scope, required report list, and ZIP requirement.
- Any `FAIL` is a hard stop unless the PR explicitly scopes branch audit or recovery documentation without implementation.

Hard stops before changes:
- If the current branch is not `main`, HARD STOP.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Allow checkout back to main before hard-stopping

When a Codex session starts on a leftover PR branch, this new gate is evaluated before every PR and the preceding rule makes the newest section authoritative, so this HARD STOP fires before the existing required workflow can perform step 2, Checkout main. That makes normal recovery from a previous branch impossible; either permit the documented checkout-to-main step before this check or scope the hard stop to non-main states that cannot be safely recovered.

Useful? React with 👍 / 👎.

- If the repository is not clean before the PR branch is created, HARD STOP.
- If the PR owner does not match the PC/Laptop ownership map in `PROJECT_MULTI_PC.txt`, HARD STOP.
- If the PR number parity does not match the assigned machine in `PROJECT_MULTI_PC.txt`, HARD STOP.
- If the PR asks for implementation and the implementation path is wrong, HARD STOP.
- If a PR asks for functional parity and only placeholder-only work is possible, HARD STOP and report the missing source or blocker.
- If scoped validation is skipped without a documented reason, HARD STOP.

Path enforcement:
- Use the active path named by the PR and verified in the repository.
- Do not create wrong replacement paths.
- For Text To Speech work, the active toolbox path is `toolbox/text-to-speech/`.
- Do not create `tools/text2speech/` for new work.
- If a PR names archived tools, games, or samples as a functionality sample, treat the archive as a read-only reference sample, not as a reason to skip implementation.

Completion hard stops:
- If the required repo ZIP is missing, HARD STOP.
- If the required repo ZIP is empty or not under `tmp/`, HARD STOP.
- If required reports are missing, HARD STOP.
- If `docs_build/dev/reports/codex_review.diff` is missing, HARD STOP.
- If `docs_build/dev/reports/codex_changed_files.txt` is missing, HARD STOP.
- If manual validation notes are missing, HARD STOP.
- If the PR-specific report is missing, HARD STOP.
- If an instruction compliance checklist is required and missing, HARD STOP.
- If requested scoped validation did not run and no explicit skip reason is recorded, HARD STOP.

Functional parity rule:
- A PR that asks to restore or rebuild working functionality must produce functional parity with the approved sample or source.
- Placeholder shells, dead controls, static mockups, and nonfunctional UI are not acceptable completion states for functional parity PRs.
- If functional parity cannot be reached in scope, Codex must stop and report the exact blocker instead of packaging placeholder-only work.
58 changes: 58 additions & 0 deletions docs_build/dev/PROJECT_MULTI_PC.txt
Original file line number Diff line number Diff line change
Expand Up @@ -448,3 +448,61 @@ Queue next PR
```

That is probably the fastest path to doubling throughput without creating chaos.

----------------------------------------------------------------------------------------

Current Authoritative Multi-PC Gate

Codex must read this file before every PR execution.

Machine parity:

PC / Environment 1:
- Uses even-numbered PR sequence values.
- Example: `PR_26171_064-*`.

Laptop / Environment 2:
- Uses odd-numbered PR sequence values.
- Example: `PR_26171_063-*`.

Owner map:

PC / Environment 1 owns Creator Journey work:
- Game Journey
- Game Hub
- Idea
- Design
- Objects
- Worlds
- Interface
- Controls
- Rules
- Progression
- Play Test
- Progress Tracking
- Game Design
- Game Crew

Laptop / Environment 2 owns Content Creation and asset/publishing work:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore Events to the owner map

For any Events-scoped PR, the new hard-stop rules require the PR owner to match this authoritative owner map, but this Laptop list omits the existing Events workstream even though toolbox/events/ exists and the earlier map in this file assigned Events to Laptop. After this change an Events PR has no matching owner and would be forced to stop before changes; include Events in the current map or state its new owner explicitly.

Useful? React with 👍 / 👎.

- Graphics
- Toolbox images
- Audio
- MIDI
- Messages
- Text To Speech
- TTS
- Publishing
- Marketplace
- Community
- Arcade

Governance, recovery, diagnostics, and instruction-hardening PRs:
- Follow PR number parity unless Master Control explicitly assigns an owner.
- Must not implement tool/runtime work from the opposite owner.
- Must document owner/parity compliance in the PR report.

Hard stop rules:
- If the PR number parity does not match the current machine, stop before changes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor Master Control owner overrides

For governance/recovery/diagnostics/instruction-hardening PRs where Master Control explicitly assigns the opposite environment, the rule just above says parity need not be followed, but this unconditional hard stop still stops whenever PR number parity differs from the current machine. That makes the documented override unusable; add the same exception to this hard stop.

Useful? React with 👍 / 👎.

- If the PR scope belongs to the other machine owner, stop before changes.
- If the PR crosses PC and Laptop ownership, stop and require Master Control to split or assign the work.
- If the requested implementation path conflicts with the active owner path, stop before changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# PR_26171_063 Codex Instruction Enforcement Hardening

## Purpose

Make Codex explicitly obey `docs_build/dev/PROJECT_INSTRUCTIONS.md` and `docs_build/dev/PROJECT_MULTI_PC.txt` before every PR.

## Scope

- Added a Codex instruction enforcement start gate to `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
- Added current authoritative PC/Laptop owner and PR parity rules to `docs_build/dev/PROJECT_MULTI_PC.txt`.
- Documented hard stops for branch state, clean status, owner mismatch, parity mismatch, wrong implementation paths, missing reports, missing ZIPs, skipped validation, and placeholder-only functional parity work.

## Requirement Checklist

- PASS: Codex must read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before execution.
- PASS: Codex must read `docs_build/dev/PROJECT_MULTI_PC.txt` before execution.
- PASS: Codex must report instruction compliance PASS/FAIL before changes.
- PASS: Codex must hard stop when not on `main` before starting.
- PASS: Codex must hard stop when the repo is not clean before starting.
- PASS: Codex must hard stop when PR owner does not match PC/Laptop ownership.
- PASS: Codex must hard stop when PR number parity does not match assigned machine.
- PASS: Codex must hard stop when required ZIP is missing.
- PASS: Codex must hard stop when required reports are missing.
- PASS: Codex must hard stop when implementation path is wrong.
- PASS: Codex must hard stop when scoped validation was skipped without reason.
- PASS: Codex must not continue with placeholder-only work when the PR asks for functional parity.
- PASS: Codex must not create wrong paths such as `tools/text2speech` when active path is `toolbox/text-to-speech`.
- PASS: Codex must not treat archived tools as "do not implement" when the PR says they are the functionality sample.

## Owner And Parity Evidence

- Current PR: `PR_26171_063-codex-instruction-enforcement-hardening`.
- Sequence: `063`.
- Sequence parity: odd.
- Assigned machine under the new authoritative gate: Laptop / Environment 2.
- Scope type: governance, recovery, diagnostics, and instruction-hardening.
- Result: PASS because governance/instruction-hardening PRs follow PR number parity unless Master Control explicitly assigns another owner.

## Validation Scope

- Playwright impacted: No.
- No Playwright impact. This PR is docs/workflow only.
- Validation is docs/static only.
- Runtime, tool, engine, samples, and Game Hub validation are skipped because no runtime, UI, toolState, engine, or sample behavior changed.

## ZIP

- Required ZIP path: `tmp/PR_26171_063-codex-instruction-enforcement-hardening_delta.zip`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# PR_26171_063 Instruction Compliance Checklist

## Pre-Change Gate

- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` before file changes.
- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt` before file changes.
- PASS: Reported instruction compliance PASS/FAIL before file changes.
- PASS: Starting branch was `main`.
- PASS: Starting repository status was clean.
- PASS: Created scoped branch `pr/26171-063-codex-instruction-enforcement-hardening` after the clean `main` check.

## Current PR Routing

- PASS: PR number `063` is odd.
- PASS: Odd PR parity maps to Laptop / Environment 2 under the new authoritative Multi-PC gate.
- PASS: PR scope is instruction/governance hardening and follows parity because no Master Control owner override was provided.
- PASS: No PC-owned tool implementation was changed.
- PASS: No Laptop-owned tool implementation was changed.

## Path And Functional Parity Gate

- PASS: No implementation path was changed by this docs-only PR.
- PASS: `toolbox/text-to-speech/` is documented as the active Text To Speech path.
- PASS: `tools/text2speech/` is documented as a wrong new-work path.
- PASS: Placeholder-only functional parity work is prohibited.
- PASS: Archived functionality samples are documented as read-only reference samples when explicitly named by a PR.

## Completion Gate

- PASS: Required PR-specific report exists.
- PASS: Required instruction compliance checklist exists.
- PASS: Required manual validation notes exist.
- PASS: Required `docs_build/dev/reports/codex_review.diff` exists after artifact generation.
- PASS: Required `docs_build/dev/reports/codex_changed_files.txt` exists after artifact generation.
- PASS: Required ZIP exists after packaging.
- PASS: Scoped validation was not skipped; docs/static validation was run.
- PASS: Playwright was not run because the PR explicitly requires no Playwright.
19 changes: 19 additions & 0 deletions docs_build/dev/reports/PR_26171_063-manual-validation-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# PR_26171_063 Manual Validation Notes

## Manual Review

- Confirmed the new start gate requires reading `PROJECT_INSTRUCTIONS.md` and `PROJECT_MULTI_PC.txt` before every PR.
- Confirmed the new gate requires visible PASS/FAIL instruction compliance before file changes.
- Confirmed the hard stop list covers branch, clean status, owner, parity, required ZIP, required reports, wrong paths, skipped validation, and placeholder-only functional parity work.
- Confirmed Text To Speech path enforcement names `toolbox/text-to-speech/` as active and rejects new `tools/text2speech/` work.
- Confirmed archived tools can be used as read-only functionality samples when a PR explicitly names them.

## Manual Runtime Checks

- No Playwright was run.
- No browser runtime checks were performed.
- No Project Workspace/Game Hub runtime checks were performed.
- No Local API checks were performed.
- No Text To Speech runtime checks were performed.

These checks are out of scope because this PR only changes documentation and governance reports.
32 changes: 32 additions & 0 deletions docs_build/dev/reports/PR_26171_063-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# PR_26171_063 Validation

## Scope

Docs/static validation only.

No Playwright was run because the PR explicitly says "No Playwright" and the changed files are governance docs and reports only.

## Commands

- `git diff --check`
- PASS: no whitespace errors.
- Targeted required-text validation for `docs_build/dev/PROJECT_INSTRUCTIONS.md`, `docs_build/dev/PROJECT_MULTI_PC.txt`, and PR_26171_063 reports.
- PASS: all required hardening anchors were found.
- Note: the first targeted text check found missing exact `No Playwright` wording in manual notes; the note was corrected and the validation was rerun successfully.

## Skipped

- `npm run test:workspace-v2`
- SKIP: legacy command name for Project Workspace/Game Hub validation; no workspace or toolState behavior changed.
- `npm run test:playwright:static`
- SKIP: command name is Playwright-scoped and this PR explicitly says no Playwright.
- Runtime, tool, engine, samples, and browser validation
- SKIP: docs/workflow-only change.

## Artifact Verification

- PASS: `docs_build/dev/reports/codex_review.diff` exists.
- PASS: `docs_build/dev/reports/codex_changed_files.txt` exists.
- PASS: `tmp/PR_26171_063-codex-instruction-enforcement-hardening_delta.zip` exists.
- PASS: ZIP size is greater than zero.
- PASS: ZIP contents preserve repo-relative paths.
81 changes: 28 additions & 53 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,37 @@
# Codex Changed Files - PR_26171_040-idea-board-production-copy-cleanup
# Codex Changed Files - PR_26171_063-codex-instruction-enforcement-hardening

## Git Workflow
- Current branch: `codex/pr-26171-040-idea-board-production-copy-cleanup`.
- Expected starting branch: `main` (PASS before branch creation).
- Created branch: `codex/pr-26171-040-idea-board-production-copy-cleanup`.
- Commit before conflict resolution: `acbc5b113e9e90a4051e810897415ea222040ddd`.
- Initial push result: PASS, branch pushed to `origin/codex/pr-26171-040-idea-board-production-copy-cleanup`.
- PR URL: `https://github.com/ToolboxAid/HTML-JavaScript-Gaming/pull/15`.
- Conflict resolution: merged `origin/main` at `7393b650228c84d266701cc3f4ce3696029dd47e`; conflicts were limited to `codex_changed_files.txt` and `codex_review.diff`.
- Conflict resolution push result: pending until after merge-validation commit.
- Merge result: pending until after PR validation/merge.
- Final main sync: pending until after merge and final pull.
## Conflict Resolution Note
- Merged latest `origin/main` into the PR branch after GitHub reported merge conflicts.
- Regenerated Codex artifacts from the PR_063 delta against updated `origin/main`.
- No implementation scope was changed while resolving conflicts.

## Changed Files
- docs_build/dev/reports/codex_changed_files.txt
- docs_build/dev/PROJECT_INSTRUCTIONS.md
- docs_build/dev/PROJECT_MULTI_PC.txt
- docs_build/dev/reports/PR_26171_063-codex-instruction-enforcement-hardening.md
- docs_build/dev/reports/PR_26171_063-instruction-compliance-checklist.md
- docs_build/dev/reports/PR_26171_063-validation.md
- docs_build/dev/reports/PR_26171_063-manual-validation-notes.md
- docs_build/dev/reports/codex_review.diff
- docs_build/dev/reports/coverage_changed_js_guardrail.txt
- docs_build/dev/reports/playwright_v8_coverage_report.txt
- src/dev-runtime/server/local-api-router.mjs
- src/shared/toolbox/tool-metadata-inventory.js
- tests/playwright/tools/IdeaBoardTableNotes.spec.mjs
- tests/playwright/tools/ToolboxRoutePages.spec.mjs
- toolbox/idea-board/index.html
- toolbox/idea-board/index.js
- docs_build/dev/reports/codex_changed_files.txt

## Requirement Evidence
- PASS: Creator-visible Idea Board page copy no longer uses DB-shaped, in-page data model, ID/flag/metadata/seed/debug/mock/test/internal wording.
- PASS: Shared Toolbox metadata for Idea Board now uses simple creator-facing language for short description, description, and progress checklist text.
- PASS: Existing persisted Toolbox metadata rows now source-sync Idea Board copy so the browser-visible registry summary updates from source-controlled text.
- PASS: Idea Board table workflow, Add Idea, Add Note, Edit/Delete, Save/Cancel, Status dropdown, accordion behavior, notes under idea rows, and existing in-page data structure were preserved.
- PASS: Targeted Playwright production-copy checks verify the Idea Board main surface does not expose the prohibited creator-visible wording.
- PASS: Copied/adapted files verified as not applicable for this copy-only PR; no Tool Template V2 file copy was required.
## Git Diff Stat Against Updated origin/main
```text
docs_build/dev/PROJECT_INSTRUCTIONS.md | 47 ++
docs_build/dev/PROJECT_MULTI_PC.txt | 58 ++
..._063-codex-instruction-enforcement-hardening.md | 48 ++
...R_26171_063-instruction-compliance-checklist.md | 37 ++
.../PR_26171_063-manual-validation-notes.md | 19 +
docs_build/dev/reports/PR_26171_063-validation.md | 32 +
docs_build/dev/reports/codex_changed_files.txt | 48 ++
docs_build/dev/reports/codex_review.diff | 699 +++++++++------------
8 files changed, 569 insertions(+), 419 deletions(-)
```

## Validation
- PASS: `node --check toolbox/idea-board/index.js`.
- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`.
- PASS: `node --check src/shared/toolbox/tool-metadata-inventory.js`.
- PASS: `node --check tests/playwright/tools/IdeaBoardTableNotes.spec.mjs`.
- PASS: `node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs`.
- PASS: `npx playwright test tests/playwright/tools/IdeaBoardTableNotes.spec.mjs --project=playwright --workers=1 --reporter=line`.
- PASS: `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs --project=playwright --workers=1 --reporter=line -g "Idea Board launches"`.
- PASS: `git diff --check`.
- PASS: Post-conflict rerun completed after merging `origin/main` at `7393b650228c84d266701cc3f4ce3696029dd47e`.
- PASS: Playwright V8 coverage report produced because runtime JavaScript changed.
- WARN: Coverage report marks `src/dev-runtime/server/local-api-router.mjs` and `src/shared/toolbox/tool-metadata-inventory.js` as not collected by browser V8 coverage; advisory only per project instructions.
- SKIPPED: Full samples smoke was not run per request.
- PASS: `git diff --check` after conflict resolution.
- PASS: targeted required instruction-anchor validation after conflict resolution.
- SKIP: Playwright, because the PR explicitly requires no Playwright and changes docs/workflow only.

## ZIP
- Path: `tmp/PR_26171_040-idea-board-production-copy-cleanup_delta.zip`.
- Size: final size reported in the delivery summary after conflict-resolution ZIP refresh.
- Contents:
- docs_build/dev/reports/codex_changed_files.txt
- docs_build/dev/reports/codex_review.diff
- docs_build/dev/reports/coverage_changed_js_guardrail.txt
- docs_build/dev/reports/playwright_v8_coverage_report.txt
- src/dev-runtime/server/local-api-router.mjs
- src/shared/toolbox/tool-metadata-inventory.js
- tests/playwright/tools/IdeaBoardTableNotes.spec.mjs
- tests/playwright/tools/ToolboxRoutePages.spec.mjs
- toolbox/idea-board/index.html
- toolbox/idea-board/index.js
- Path: `tmp/PR_26171_063-codex-instruction-enforcement-hardening_delta.zip`.
Loading
Loading