Skip to content

Commit 36e6283

Browse files
committed
Lock ProjectInstructions single source
1 parent 520199c commit 36e6283

30 files changed

Lines changed: 1913 additions & 533 deletions

docs_build/dev/BUILD_PR.md

Lines changed: 26 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,52 @@
1-
# PR_26177_006-shared-time-foundation
1+
# PR_26177_OWNER_007-project-instructions-single-source-eod-lock
22

33
## Purpose
44

5-
Add a small shared time foundation.
5+
Make `docs_build/dev/ProjectInstructions/` the only active Project Instructions source and add EOD main lock plus next-day reset governance.
66

77
## Source Of Truth
88

9-
This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_006-shared-time-foundation`.
10-
11-
## Stack
12-
13-
- Base branch: `PR_26177_005-shared-text-foundation`
9+
This `BUILD_PR.md`, `PLAN_PR.md`, and the user request are the source of truth for `PR_26177_OWNER_007-project-instructions-single-source-eod-lock`.
1410

1511
## Exact Scope
1612

17-
- Add `src/shared/time/` foundation.
18-
- Include duration formatting, timestamp helpers, debounce/throttle/sleep helpers where safe for shared runtime.
19-
- Add targeted tests for the shared time area.
20-
- No scheduler/runtime behavior changes.
21-
- Create required Codex reports under `docs_build/dev/reports/`.
22-
- Create repo-structured delta ZIP under `tmp/`.
13+
- Audit repo for ProjectInstructions / project instructions duplicates.
14+
- Establish `docs_build/dev/ProjectInstructions/` as the only active source.
15+
- Mark all other ProjectInstructions-style sources changed by this PR as deprecated references.
16+
- Update active team start/governance docs to reference only `docs_build/dev/ProjectInstructions/`.
17+
- Add EOD main lock and next-day reset governance.
18+
- Add required reports under `docs_build/dev/reports/`.
2319

2420
## Exact Targets
2521

2622
- `docs_build/dev/PLAN_PR.md`
2723
- `docs_build/dev/BUILD_PR.md`
28-
- `src/shared/time/time.js`
29-
- `tests/shared/TimeFoundation.test.mjs`
30-
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation.md`
31-
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_branch-validation.md`
32-
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_requirement-checklist.md`
33-
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_validation-lane.md`
34-
- `docs_build/dev/reports/PR_26177_006-shared-time-foundation_manual-validation-notes.md`
24+
- `docs_build/dev/PROJECT_INSTRUCTIONS.md`
25+
- `docs_build/dev/ProjectInstructions/README.txt`
26+
- `docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md`
27+
- `docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md`
28+
- `docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md`
29+
- `docs_build/dev/ProjectInstructions/addendums/*.md`
30+
- `project-instructions/README.md`
31+
- `project-instructions/addendums/*.md`
32+
- `docs_build/dev/reports/PR_26177_OWNER_007-project-instructions-single-source-eod-lock*.md`
3533
- `docs_build/dev/reports/codex_review.diff`
3634
- `docs_build/dev/reports/codex_changed_files.txt`
3735

3836
## Out Of Scope
3937

40-
- No scheduler/runtime behavior changes.
41-
- No browser-owned product data.
42-
- No runtime UI changes.
43-
- No browser storage changes.
44-
- No API/database changes.
45-
- No `start_of_day` folder changes.
46-
- No unrelated cleanup.
47-
- No full samples smoke by default.
38+
- No product/runtime changes.
39+
- No feature work.
40+
- No `start_of_day` changes.
41+
- No legacy SQLite file changes.
4842

4943
## Validation
5044

51-
Run exactly:
45+
Run:
5246

5347
```powershell
54-
node ./scripts/run-node-test-files.mjs tests/shared/TimeFoundation.test.mjs
55-
node --check src/shared/time/time.js
56-
node --check tests/shared/TimeFoundation.test.mjs
48+
rg -n 'project-instructions/addendums|docs_build/dev/PROJECT_INSTRUCTIONS.md.*source of truth|Codex must always read `docs_build/dev/PROJECT_INSTRUCTIONS.md`|Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`' docs_build/dev/ProjectInstructions docs_build/dev/PROJECT_INSTRUCTIONS.md project-instructions
49+
rg -n "End of Day:|Next Day Start:|HEAD.*published EOD SHA|only active Project Instructions source" docs_build/dev/ProjectInstructions
50+
git diff --name-only -- src assets toolbox games api serverside package.json package-lock.json docs_build/dev/start_of_day
5751
git diff --check
5852
```
59-
60-
## Artifact
61-
62-
Create repo-structured delta ZIP:
63-
64-
```text
65-
tmp/PR_26177_006-shared-time-foundation_delta.zip
66-
```

docs_build/dev/PLAN_PR.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1-
# PLAN_PR: PR_26177_006-shared-time-foundation
1+
# PLAN_PR: PR_26177_OWNER_007-project-instructions-single-source-eod-lock
22

33
## Purpose
44

5-
Add a small shared time foundation.
5+
Make `docs_build/dev/ProjectInstructions/` the only active Project Instructions source and add EOD main lock plus next-day reset governance.
66

77
## Scope
88

9-
- Add `src/shared/time/` foundation.
10-
- Include duration formatting, timestamp helpers, sleep, debounce, and throttle helpers.
11-
- Add targeted tests.
12-
- No scheduler/runtime behavior changes.
13-
- No browser-owned product data.
14-
- No runtime UI changes.
15-
- No unrelated cleanup.
9+
- Audit ProjectInstructions and project instructions duplicates.
10+
- Mark legacy ProjectInstructions-style sources as deprecated reference material.
11+
- Move active legacy addendums into `docs_build/dev/ProjectInstructions/addendums/`.
12+
- Update active team start and governance docs to reference only `docs_build/dev/ProjectInstructions/`.
13+
- Add EOD main lock, next-day reset, and team PR branch creation gate.
14+
- Add required Codex reports under `docs_build/dev/reports/`.
1615

17-
## Implementation Plan
16+
## Out Of Scope
1817

19-
1. Add `src/shared/time/time.js`.
20-
2. Add `tests/shared/TimeFoundation.test.mjs`.
21-
3. Validate duration, timestamp, sleep, debounce, and throttle helpers.
22-
4. Produce required Codex reports and repo-structured ZIP.
18+
- No product/runtime changes.
19+
- No feature work.
20+
- No `start_of_day` changes.
21+
- No legacy SQLite file changes.
22+
23+
## Validation Plan
24+
25+
1. Run targeted grep/search proving no active duplicate ProjectInstructions source remains.
26+
2. Confirm EOD/Next Day rule appears in active governance docs.
27+
3. Confirm no product/runtime files changed.
28+
4. Run `git diff --check`.

docs_build/dev/PROJECT_INSTRUCTIONS.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# PROJECT INSTRUCTIONS
22

3+
> Deprecated active-source notice: this file is preserved as historical reference only. The only active Project Instructions source is `docs_build/dev/ProjectInstructions/`. If this file conflicts with `docs_build/dev/ProjectInstructions/`, the active folder wins unless OWNER explicitly approves a newer governance change.
4+
35
You are working in a docs-first repo workflow.
46

57
Workflow:
@@ -864,7 +866,7 @@ Controls must remain copy-friendly and human-readable.
864866

865867
### ChatGPT Workflow Governance Consistency
866868

867-
ChatGPT repo workflow responses are governed by `docs_build/dev/PROJECT_INSTRUCTIONS.md` as the source of truth.
869+
Deprecated note: this historical section no longer defines the active source of truth. ChatGPT repo workflow responses are governed by `docs_build/dev/ProjectInstructions/`.
868870

869871
ChatGPT must not drift from the required response ordering.
870872

@@ -1716,13 +1718,13 @@ Do not compact:
17161718

17171719
Do not change JSON contracts or semantics while applying array formatting.
17181720

1719-
## PROJECT INSTRUCTIONS LOCATION
1721+
## DEPRECATED PROJECT INSTRUCTIONS LOCATION
17201722

1721-
PROJECT_INSTRUCTIONS.md lives at:
1723+
Historical PROJECT_INSTRUCTIONS.md is preserved at:
17221724

17231725
`docs_build/dev/PROJECT_INSTRUCTIONS.md`
17241726

1725-
Codex must always read `docs_build/dev/PROJECT_INSTRUCTIONS.md` from this path as the source of truth before executing repository workflow instructions.
1727+
This file is not the active source of truth. Codex must read `docs_build/dev/ProjectInstructions/README.txt` first and use `docs_build/dev/ProjectInstructions/` as the active Project Instructions source before executing repository workflow instructions.
17261728

17271729
## CODEX COMMAND FORMATTING RULE
17281730

@@ -2384,9 +2386,9 @@ Treat these files the same as existing instruction documents for read-set, revie
23842386
Codex must run this gate before every PR execution and before any file changes.
23852387

23862388
Required instruction reads:
2387-
- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
2389+
- Read `docs_build/dev/ProjectInstructions/README.txt`.
23882390
- Read `docs_build/dev/PROJECT_MULTI_PC.txt`.
2389-
- Treat the newest applicable section in `PROJECT_INSTRUCTIONS.md` as authoritative when rules overlap.
2391+
- Treat the newest applicable section in `docs_build/dev/ProjectInstructions/` as authoritative when rules overlap.
23902392
- Treat the current team ownership section in `PROJECT_MULTI_PC.txt` as authoritative for TEAM routing.
23912393

23922394
Required pre-change report:

docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Read `README.txt` first.
44

55
This file is the root index for the append-first Project Instructions operating system under `docs_build/dev/ProjectInstructions/`.
66

7+
## Active Source
8+
9+
`docs_build/dev/ProjectInstructions/` is the only active Project Instructions source.
10+
11+
Historical Project Instructions material outside this folder is deprecated reference material only and must not be used as an active source of governance.
12+
713
## Purpose
814

915
The Project Instructions operating system provides additive governance for:
@@ -20,7 +26,7 @@ The Project Instructions operating system provides additive governance for:
2026

2127
## Preservation
2228

23-
Existing Project Instructions remain preserved in their current locations. This operating system adds structure without deleting or rewriting existing documentation.
29+
Existing Project Instructions outside `docs_build/dev/ProjectInstructions/` remain preserved only as deprecated reference material. When guidance conflicts, active files under `docs_build/dev/ProjectInstructions/` win unless OWNER explicitly approves a newer governance change.
2430

2531
## Folders
2632

@@ -41,6 +47,10 @@ Existing Project Instructions remain preserved in their current locations. This
4147

4248
`docs_build/dev/ProjectInstructions/addendums/environment_configuration_standards.md` defines official `.env` file names, environment variable values, host/domain configuration, API URL configuration, R2 prefix configuration, and feature flag governance.
4349

50+
## Single Source and Main Lock Governance
51+
52+
`docs_build/dev/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md` defines the single active Project Instructions source, EOD main lock, next-day reset, and team branch creation gate.
53+
4454
## Merge Control
4555

4656
No PR in this operating system is merged without explicit owner approval.

docs_build/dev/ProjectInstructions/README.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Read this file first.
22

33
Folder purpose:
4-
This folder is the append-first Project Instructions operating system for Game Foundry Studio. It organizes active governance, backlog, team assignment, deprecation, and history material without deleting or rewriting the existing Project Instructions files elsewhere in the repository.
4+
This folder is the only active Project Instructions source for Game Foundry Studio. It organizes active governance, backlog, team assignment, deprecation, and history material under `docs_build/dev/ProjectInstructions/`.
55

66
Preservation rules:
7-
Preserve all existing documentation. Add new files or append explicit references unless the owner explicitly approves deletion or rewrite. When a conflict appears, stop, explain the conflict, and request owner approval before changing existing instruction text.
7+
Preserve historical Project Instructions material as deprecated reference only. Do not treat `docs_build/dev/PROJECT_INSTRUCTIONS.md`, `project-instructions/`, or archived snapshots as active instruction sources. When a conflict appears, `docs_build/dev/ProjectInstructions/` wins unless OWNER explicitly approves a newer governance change.
88

99
Backlog workflow:
1010
Backlog work is tracked under backlog/. BACKLOG_MASTER.md is the planned source for backlog item status, notes, and references. Backlog item text is treated as immutable once created; status and notes may change under the governance addendums.
@@ -29,9 +29,9 @@ Do not rewrite history snapshots after creation unless the owner explicitly appr
2929

3030
READ THIS FIRST
3131

32-
1. Read Project Instructions before making changes.
33-
2. Project Instructions are append-only.
34-
3. Existing approved guidance may not be removed.
32+
1. Read `docs_build/dev/ProjectInstructions/README.txt` before making changes.
33+
2. Treat `docs_build/dev/ProjectInstructions/` as the only active Project Instructions source.
34+
3. Historical Project Instructions files outside this folder are deprecated references only.
3535
4. Team ownership must be respected.
3636
5. BACKLOG_MASTER.md is the authoritative backlog.
3737
6. Build Path status derives from backlog status.
@@ -42,12 +42,13 @@ READ THIS FIRST
4242
11. Batch Governance Mode is the default for governance, documentation, and administrative work.
4343

4444
Addendum index:
45-
- Canonical Repository Structure: project-instructions/addendums/canonical-repository-structure.md
46-
- Test Structure Standardization: project-instructions/addendums/test-structure-standardization.md
47-
- Legacy Migration Policy: project-instructions/addendums/legacy-migration-policy.md
48-
- Assistant Execution Modes: project-instructions/addendums/assistant-execution-modes.md
49-
- Codex Artifact and Reporting Standard: project-instructions/addendums/codex-artifact-and-reporting-standard.md
50-
- Codex Project Instructions Startup: project-instructions/addendums/codex-project-instructions-startup.md
45+
- Single Source and EOD Main Lock: docs_build/dev/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md
46+
- Canonical Repository Structure: docs_build/dev/ProjectInstructions/addendums/canonical_repository_structure.md
47+
- Test Structure Standardization: docs_build/dev/ProjectInstructions/addendums/test_structure_standardization.md
48+
- Legacy Migration Policy: docs_build/dev/ProjectInstructions/addendums/legacy_migration_policy.md
49+
- Assistant Execution Modes: docs_build/dev/ProjectInstructions/addendums/assistant_execution_modes.md
50+
- Codex Artifact and Reporting Standard: docs_build/dev/ProjectInstructions/addendums/codex_artifact_and_reporting_standard.md
51+
- Codex Project Instructions Startup: docs_build/dev/ProjectInstructions/addendums/codex_project_instructions_startup.md
5152
- Project Reference Files Governance: docs_build/dev/ProjectInstructions/addendums/project_reference_files.md
5253
- Environment Governance Model: docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md
5354
- Environment Configuration Standards: docs_build/dev/ProjectInstructions/addendums/environment_configuration_standards.md

docs_build/dev/ProjectInstructions/TEAM_START_COMMANDS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# TEAM_START_COMMANDS
22

3+
## Required Main Reset Gate For Every Team
4+
5+
No team creates a PR branch until all checks pass:
6+
7+
- Current branch: `main`
8+
- Worktree: clean
9+
- `main...origin/main`: `0 0`
10+
- `HEAD` SHA matches the published EOD SHA
11+
12+
Use `docs_build/dev/ProjectInstructions/` as the only active Project Instructions source.
13+
314
## Start Team Alfa
415

516
Ready-to-copy command:
@@ -123,4 +134,24 @@ Merge to main is EOD-only and owner-approved, unless the owner explicitly says:
123134
"Merge this PR now."
124135
125136
Do not treat sequential PR completion as merge approval.
137+
138+
End of Day:
139+
git checkout main
140+
git fetch origin
141+
git pull --ff-only origin main
142+
git status
143+
git rev-list --left-right --count main...origin/main
144+
145+
Required:
146+
On branch main
147+
nothing to commit, working tree clean
148+
0 0
149+
150+
Next Day Start:
151+
git checkout main
152+
git fetch origin
153+
git pull --ff-only origin main
154+
git status
155+
git rev-list --left-right --count main...origin/main
156+
git rev-parse HEAD
126157
```

0 commit comments

Comments
 (0)