Repository navigation
Implement REQ-MIGRATION-003: canonical TypeScript Config/Domain/Simulation/Diagnostics scaffolding #27
Copy link
Copy link
Closed
Labels
area:simulation-coreTick loop, ordering, determinism, configurationTick loop, ordering, determinism, configurationpriority:highImportant and time-sensitive; schedule ahead of normal workImportant and time-sensitive; schedule ahead of normal worktype:architectureArchitecture, boundaries, contracts, or consequential design decisionsArchitecture, boundaries, contracts, or consequential design decisions
Description
Goal
Add the canonical TypeScript scaffolding required by REQ-MIGRATION-003 —
distinct Config, Domain, Simulation and Diagnostics module areas under src/ —
with no canonical economics/behavior and no changes to the legacy C# project.
Evidence
docs/spec/mirror/REQUIREMENTS_REGISTRY.csvrow:REQ-MIGRATION-003, area
MIGRATION,FILE=06 - Handoff/11 — REPOSITORY_MIGRATION_AND_MILESTONE_GATES.md,
ANCHOR=Milestone 0 — Baseline lock and migration scaffolding,STATUS=READY,
PRIORITY=P0,DEPENDS_ON=REQ-MIGRATION-001(alreadyIMPLEMENTED).
Statement: "Add canonical TypeScript/Vite-capable Config, Domain, Simulation and
Diagnostics scaffolding without moving legacy C# classes or adding canonical
economics yet." Acceptance: "Legacy .NET build/tests remain green; canonical
TypeScript scaffolding builds/tests independently; no canonical subsystem
behavior is introduced in M0."- The same mirrored document's Milestone 0 section: "Add folders/namespaces for
Config, Domain, Simulation and Diagnostics without moving legacy classes yet"
and "Add a migration marker documenting which classes are legacy." docs/adr/0002-typescript-canonical-engine.md(Accepted, 2026-09-03): "Canonical
simulation behavior is implemented in TypeScript, undersrc/. From M1 onward
every canonical subsystem lands there. M0 puts the scaffolding in place
(REQ-MIGRATION-003)." This is the researcher-recorded resolution
(SPEC_CHANGELOG.mdrowRUNTIME-001) of the mirrored document's own
conflicting C#-vs-browser wording elsewhere in the same file (its "Runtime
implementation resolution" section says M0 "remains entirely inside the
existing .NET 9 baseline"). Treating the ADR as authoritative over the stale
wording is itself an assumption carried from the ADR's framing, not a fact this
Issue re-derives — a claiming run should not need to re-litigate it, but should
say so if it finds the ADR insufficient.- Issue Give canonical TypeScript work a required check #14 (closed; merged as PRs Add the canonical TypeScript toolchain #15/Make canonical TypeScript work verifiable #16) built the npm/TypeScript/Vite/Vitest
toolchain and its required CI check, but explicitly listed "the canonical
scaffolding itself" as a non-goal: "REQ-MIGRATION-003is work for an author
run, not for setup. Nothing economic belongs insrc/yet." src/index.tsalready carries the breadcrumb for this Issue:toolchainStatus()
returnscanonicalScaffolding: falsewith the comment "Flips to true in
REQ-MIGRATION-003, which is where the scaffolding belongs," and
src/index.test.tsasserts thatfalsetoday.- Current repository state:
src/contains onlyindex.tsandindex.test.ts;
noconfig/,domain/,simulation/ordiagnostics/module areas exist yet.
Scope
- Under
src/, add four module areas matching the scaffolding named by
REQ-MIGRATION-003:config/,domain/,simulation/,diagnostics/. Each
gets a minimal placeholder module (e.g. anindex.tsstating its responsibility
boundary in a short comment) sufficient to prove the structure exists, compiles
and is exercised by a test — no entity/ID/money types, no tick logic, no
configuration schema, no economics. - Add a migration marker (location is an implementer decision — record it as a
Decision comment on this Issue) documenting whichTradeCraftSimulation
classes are still legacy, per the Milestone 0 bullet and the mirrored
document's "Legacy-to-canonical responsibility map" section. - Flip
toolchainStatus().canonicalScaffoldinginsrc/index.tstotrueand
updatesrc/index.test.tsto match. - Add at least one test per new module area proving it builds/typechecks under
Vitest.
Non-goals
- No canonical economic behavior of any subsystem: no tick orchestrator, no
registries, no keyed RNG, no config validation logic. Gate M0 requires that "no
canonical subsystem behavior has been introduced yet." - No changes to
TradeCraftSimulation/**orTradeCraftSimulation.Tests/**—
legacy classes are not moved, renamed or deleted. - No M1 work (
REQ-CORE-001,REQ-CONFIG-001..005, keyed RNG, world genesis) —
those are separate, later requirements gated behind this one. - Does not reopen or re-resolve the mirrored document's internal wording tension
beyond citing the researcher's existing ADR 0002 /RUNTIME-001resolution.
Acceptance criteria
-
src/contains distinctconfig/,domain/,simulation/,diagnostics/
module areas, each with a minimal placeholder and no economic behavior. - A migration marker documents which legacy C# classes remain legacy.
-
toolchainStatus().canonicalScaffoldingistrueand its test reflects
that. -
npm ci,npm run typecheck,npm testandnpm run buildall succeed. -
dotnet build --configuration Releaseand
dotnet test --configuration Releaseremain green and unchanged in
behavior (legacy build/tests untouched). - No
TradeCraftSimulation/**orTradeCraftSimulation.Tests/**files are
modified. -
docs/spec/IMPLEMENTATION_STATUS.mdgains/updates theREQ-MIGRATION-003
row in the same pull request, naming the merge commit and the proving
test(s), perAUTHOR_RUNBOOK.mdsection on feedback to the researcher.
Verification
npm ci
npm run typecheck
npm test
npm run build
dotnet restore
dotnet build --configuration Release --no-restore
dotnet test --configuration Release --no-buildDependencies, authority, and risks
REQ-MIGRATION-001 (dependency) is already IMPLEMENTED. No additional
authority needed beyond the standing AUTHOR grants in AGENTS.md. Main risk:
picking scaffolding contents specific enough to look like early canonical
economics — keep every placeholder deliberately empty of behavior.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:simulation-coreTick loop, ordering, determinism, configurationTick loop, ordering, determinism, configurationpriority:highImportant and time-sensitive; schedule ahead of normal workImportant and time-sensitive; schedule ahead of normal worktype:architectureArchitecture, boundaries, contracts, or consequential design decisionsArchitecture, boundaries, contracts, or consequential design decisions
Activity
drevendev commentedon Sep 3, 2026
QA correction before implementation: the final acceptance bullet currently asks the same pull request to record its own merge commit in
docs/spec/IMPLEMENTATION_STATUS.md. That commit does not exist until after merge, and the repository already established the bounded reconciliation flow inAUTHOR_RUNBOOK.md/ PR #21.For this Issue, treat the acceptance as:
REQ-MIGRATION-003asIN_PROGRESS, naming Issue Implement REQ-MIGRATION-003: canonical TypeScript Config/Domain/Simulation/Diagnostics scaffolding #27 and the proving tests, withMerged in = pending(or the repository's equivalent pre-merge marker);IMPLEMENTEDand records the actual merge commit;IMPLEMENTEDis closing evidence.No product or economic requirement changes. This is a process/evidence correction so the task is achievable without inventing a nonexistent future commit.
drevendev commentedon Sep 3, 2026
AUTHOR claim
REQ-MIGRATION-003per this Issue — addsrc/config/,src/domain/,src/simulation/,src/diagnostics/placeholder module areas, a legacy migration marker, fliptoolchainStatus().canonicalScaffoldingtotrue, and updatedocs/spec/IMPLEMENTATION_STATUS.mdwith theREQ-MIGRATION-003row asIN_PROGRESS(per the QA correction comment above —Merged in = pendinguntil reconciliation).claude/issue-27-canonical-scaffoldingdrevendev commentedon Sep 3, 2026
Decision: the Milestone 0 migration marker lives at `docs/migration/LEGACY_MARKER.md` rather than inside `TradeCraftSimulation/`, because the Issue's acceptance criteria and non-goals require that no `TradeCraftSimulation/` file be modified in this change. The marker lists all nine current legacy classes and file paths, states the one-authoritative-owner-per-stock rule from the mirrored document's non-negotiable migration rules, and points to ADR 0002 for where canonical replacements land.
drevendev commentedon Sep 3, 2026
AUTHOR handoff
claude/issue-27-canonical-scaffolding7944bc0c71032ef61af597dcf4298e0bd0c379e6Closes #27)npm cipassed,npm run typecheckpassed,npm testpassed (5 files/6 tests),npm run buildpassed,dotnet restorepassed,dotnet build --configuration Releasepassed (0/0 warnings/errors),dotnet test --configuration Releasepassed (44/44, unchanged) — full evidence in the PR body.docs/migration/LEGACY_MARKER.md(commented above);REQ-MIGRATION-003row added todocs/spec/IMPLEMENTATION_STATUS.mdasIN_PROGRESSwithMerged in = pending, per the QA-correction comment above — reconciliation toIMPLEMENTEDis follow-up work for a later run, not this PR.Status set to
status:needs-review.drevendev commentedon Sep 4, 2026
AUTHOR run — recording why no new Issue was opened (2026-09-04)
This run's selection pass found no eligible item under
AUTHOR_RUNBOOK.mdsection 2, items 1–5 (see comments on #30 and #31 for the Issue-level detail). That leaves item 6: read the specification navigation files and create one new ready Issue for the next unimplemented requirement.Checked
REQUIREMENTS_REGISTRY.csv+SPEC_CHANGELOG.md+EXECUTION_ORDER.mdagainst current M0 state:REQ-MIGRATION-001—IMPLEMENTED.REQ-MIGRATION-002—IMPLEMENTEDonmastertoday (its adequacy is separately disputed by Reconcile IMPLEMENTATION_STATUS with the current mirrored registry #30, unrelated to this run's selection).REQ-MIGRATION-003—IN_PROGRESS, already has this Issue (Implement REQ-MIGRATION-003: canonical TypeScript Config/Domain/Simulation/Diagnostics scaffolding #27) and open PR Implement REQ-MIGRATION-003: canonical TypeScript scaffolding #29 (no changes requested, no failing checks) — not something a new Issue should duplicate.REQ-MIGRATION-004— depends onREQ-MIGRATION-003, which is not yetIMPLEMENTED(PR Implement REQ-MIGRATION-003: canonical TypeScript scaffolding #29 unmerged). Dependency not satisfied, so not eligible perEXECUTION_ORDER.mdsection 4 ("earliest milestone whose dependencies are satisfied").REQ-CORE-001,REQ-CONFIG-001, …) —EXECUTION_ORDER.md's dependency order states M1 starts "after M0 gate," and M0 is not yet gated closed (PR Implement REQ-MIGRATION-003: canonical TypeScript scaffolding #29 still open). Opening M1 work now would be skipping ahead, which the same document explicitly prohibits.Net result: no registry requirement is currently eligible for a new ready Issue. This run made no code, label, or branch changes, and stops here per
AGENTS.md's Blockers section — merging PR #29 (ACCEPTOR action, out of scope for AUTHOR) is what reopens the queue for the next AUTHOR run.Add canonical TypeScript scaffolding for REQ-MIGRATION-003 (#29)
drevendev commentedon Sep 4, 2026
ACCEPTOR verdict: ACCEPT and merged.
Reviewed PR #29 at head revision
7944bc0c71032ef61af597dcf4298e0bd0c379e6, merged as1fb089368434abc2d875a553225f6f73d042da41(squash merge, branch deleted).Verification performed independently (not taken from the PR body):
build-and-test,typescript,policy-guardallpassongh pr checks 29.src/config/,src/domain/,src/simulation/,src/diagnostics/each exist with a minimal placeholder (no economic behavior) and a passing Vitest test — confirmed by reading the diff and running the suite.docs/migration/LEGACY_MARKER.mdlists all nine legacy classes; cross-checked againstls TradeCraftSimulation/*.cs— exact match (City, CsvLogger, Deal, Market, Pop, Program, Simulation, SimulationConfig, Storage).toolchainStatus().canonicalScaffoldingistrue, test updated to match.npm ci,npm run typecheck(clean),npm test(5 files / 6 tests passed),npm run build(vite build succeeded).dotnet restore,dotnet build --configuration Release(0 warnings/errors),dotnet test --configuration Release(44/44 passed) — legacy build/tests unchanged and green, satisfying REQ-MIGRATION-003's dependency on REQ-MIGRATION-003 not touching legacy.TradeCraftSimulation/**file touched — confirmed viagh pr diff.docs/spec/IMPLEMENTATION_STATUS.mdgains theREQ-MIGRATION-003row asIN_PROGRESS/Merged in = pending, per the prior QA-correction comment on PR Implement REQ-MIGRATION-003: canonical TypeScript scaffolding #29 (a PR cannot name its own future merge commit). This is a reasonable, explicitly-justified reading of that acceptance line, not a gap.src/config/**,src/domain/**,src/simulation/**,src/diagnostics/**,src/index.ts/src/index.test.ts,docs/migration/LEGACY_MARKER.md,docs/spec/IMPLEMENTATION_STATUS.md. No.github/workflows/**,AGENTS.md, ordocs/zendev/**touched.src/index.test.tsflipping its assertion fromfalsetotrue, which is exactly what acceptance criterion 3 requires; no invariant tests (money/stock conservation) exist in this scaffolding-only change.Issue closed by the merge. Removed
status:needs-reviewsince the Issue is now closed.Follow-up noted in the PR itself: a later reconciliation run should flip the
REQ-MIGRATION-003row indocs/spec/IMPLEMENTATION_STATUS.mdfromIN_PROGRESStoIMPLEMENTEDwith this merge commit — that is separate work, not required for this Issue's closure.