For Codex: REQUIRED SUB-SKILL: Use
subagent-driven-developmentto implement this plan task-by-task. The project owner has explicitly authorized two isolated endpoint lanes to run in parallel; each lane remains serial internally and must pass specification review before quality review.
Goal: Deliver the 11 approved MRC core frontend modules as locally runnable, prototype-aligned Demo pages for the mini program and HIS frontend by the next-morning acceptance window.
Architecture: The two clients each implement the frozen mrc-demo-state/v1 V1.1 semantics in a local in-memory Adapter; they never share a service, runtime, file, HTTP request, or state. The mini program adds only a packageMRC/ subpackage, while HIS adds only src/pages/mrcDemo/ and its permitted static route registration. The cross-end relationship is semantic parity of the five de-identified scenarios, not live synchronization.
Tech Stack: Existing WeChat Mini Program source; existing React 16 / Ant Design HIS frontend; Node offline tests; HTML prototypes and approved OpenSpec changes as the visual and behavioral source of truth.
MRC-MP-BASE-001, MRC-MP-APPLY-001~005, MRC-MP-ORDER-001, MRC-PC-AUTH-001, and MRC-PC-ORDER-001~003 only.04-新项目源码_source/项目源码/mrc-demo-platform/contracts/demo-state-v1.md.pri-his-front, PRHIS-main, existing-page edits, live identity/record/upload/payment/logistics calls, HTTP/network, persistent storage, cross-end sync, real user data, and production-completion claims.Demo 数据 marker.develop is serial and controlled by the PM Agent.Files:
docs/plans/2026-09-15-mrc-demo-mvp-implementation.md only if an execution fact changes..worktrees/codex-mrc-demo-mp-base-001/ and .worktrees/codex-mrc-demo-pc-auth-001/.Step 1: Rebase the existing clean receipt branches onto current develop; do not retain an obsolete base.
Run: git -C <worktree> rebase develop
Expected: branch starts at current Demo governance commit and remains clean.
Step 2: Verify the project-local worktree directory is ignored.
Run: git check-ignore -q .worktrees
Expected: exit 0.
Step 3: Run the mini-program baseline checks before any code.
Run: cd 04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram && npm test && npm run validate:source
Expected: all existing offline tests pass and source validation passes.
Step 4: Record the HIS baseline limitation rather than installing dependencies.
Run: git diff --check from the HIS worktree; inspect the existing package.json scripts and confirm no runnable test script is present.
Expected: clean diff; full webpack build remains a documented non-blocking limitation because the existing dependency set lacks rimraf and no installation authorization exists.
Step 5: Commit only if rebase or baseline evidence requires a tracked documentation change.
MRC-MP-BASE-001)Files:
04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram/packageMRC/common/mrcDemoState.js04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram/packageMRC/pages/entry/index.js04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram/packageMRC/pages/entry/index.wxml04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram/packageMRC/pages/entry/index.wxss04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram/app.json (subpackage registration only)04-新项目源码_source/项目源码/pri-smart-hospital-miniprogram/tests/mrc-demo-state.test.jsStep 1: Write failing Node tests for getSnapshot, activateScenario, resetScenario, createApplication, and an unsupported transition.
Run: node tests/mrc-demo-state.test.js
Expected: fail because packageMRC/common/mrcDemoState.js does not exist.
Step 2: Implement the smallest local, de-identified in-memory Adapter matching mrc-demo-state/v1 V1.1.
Step 3: Re-run the focused test, then all mini-program offline tests and source validation.
Run: node tests/mrc-demo-state.test.js && npm test && npm run validate:source
Expected: all pass; test code contains no wx.request, HTTP URL, storage API, or service import.
Step 4: Add the MRC entry screen, visible Demo marker, scenario switch/reset, and approved navigation only.
Step 5: Commit a focused change and update only factual module evidence.
MRC-MP-APPLY-001~005, MRC-MP-ORDER-001)Files:
packageMRC/pages/applications/* (entry/list and application detail pages required by the approved prototypes)packageMRC/pages/identity/*, packageMRC/pages/content/*, packageMRC/pages/legacy/*, packageMRC/pages/confirm/*, and packageMRC/pages/progress/* only where the approved prototype requires a page or modal-equivalent state.packageMRC/common/mrcDemoState.js only for contract operations proven in a failing test.tests/mrc-demo-state.test.js plus focused page-state test files named tests/mrc-demo-<module>.test.js.For each module, in this exact order: APPLY-001 → APPLY-002 → APPLY-003 → APPLY-004 → APPLY-005 → ORDER-001:
tasks.md, and source HTML prototype; enumerate every visible page, tab, dialog, form state, disabled/not-rendered capability, and navigation edge needed for Demo.git diff --check and verify that changed runtime files are confined to packageMRC/ plus app.json subpackage registration.feat(demo): implement <module-code>, then update its status/evidence only after the commit exists.MRC-PC-AUTH-001)Files:
04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/demoState.js04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/DemoShell.jsx04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/MrcAuthDemo.jsx04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/mrcDemo.css04-新项目源码_source/项目源码/cloudhis-pr/src/routers/StaticRouterData.js (MRC route import/registration only)04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/demoState.test.jsStep 1: Write a Node-runnable failing test for fixed pc.mrc identity, scenario activation/reset, legal transition, and rejected illegal transition.
Run: node src/pages/mrcDemo/demoState.test.js
Expected: fail because the Adapter file is absent.
Step 2: Implement the smallest CommonJS-compatible in-memory Adapter and test it green.
Step 3: Implement the prototype-aligned MRC shell and fixed Demo identity page; show Demo 数据, scenario selector/reset, and no actual login/logout/network behavior.
Step 4: Run focused Node tests, git diff --check, and static syntax/import checks applicable without dependency installation.
Step 5: Commit a focused change and update factual module evidence.
MRC-PC-ORDER-001~003)Files:
04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/MrcOrderWorkbench.jsx04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/MrcReviewAccounting.jsx04-新项目源码_source/项目源码/cloudhis-pr/src/pages/mrcDemo/MrcDelivery.jsxsrc/pages/mrcDemo/DemoShell.jsx, demoState.js, and mrcDemo.css only when driven by a failing focused test.src/pages/mrcDemo/demoState.test.js and focused src/pages/mrcDemo/<module>.test.js Node tests for pure state/data helpers.For each module, in this exact order: ORDER-001 → ORDER-002 → ORDER-003:
tasks.md, and actual HTML prototype to build the module-specific visual checklist before editing files.Table and other public components; do not modify shared components. Keep excluded actions absent or explicitly disabled as specified.git diff --check, and perform a route/import/static source review. Do not call backend APIs or claim a webpack build.Files:
tasks.md / delivery record only to record actual test commands, commit SHA, review result, and remaining limitation.01-项目文档_docs/00-项目管理/03-交付验收/功能模块总进度表.md only during the PM-controlled serial integration.Step 1: For each endpoint lane, dispatch a fresh specification reviewer after the implementer reports all assigned modules.
Reviewer must compare changed files against all seven/four module formal review records, OpenSpec requirements, the frozen state contract, source-root boundaries, and prototype visual checklists. Any gap returns to the same implementer for correction and re-review.
Step 2: Dispatch a fresh code-quality reviewer only after specification compliance is explicitly approved.
Reviewer checks test-first evidence, state isolation, deterministic seed data, route safety, prohibited API usage, regression risk, and maintainability. Any issue is fixed and re-reviewed.
Step 3: Integrate endpoint branches one at a time into develop.
Before each integration: rebase the lane branch, run the required endpoint checks again, inspect git diff --check, and resolve documentation-row conflicts centrally. Never merge two worktree branches concurrently.
Step 4: Change module status to 待验收(Demo) only after its integrated source, passing allowed checks, review evidence, and visual acceptance checklist exist.
Step 5: Run final cross-end acceptance from the five contract scenarios.
Verify semantic parity, not data sharing: scenario switch/reset, applicant submission/progress, HIS review/accounting, HIS delivery, illegal-action feedback, and visible Demo/limited-capability markers. Record actual limitations, especially the existing HIS build dependency block.