> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Convert the existing `center-book` repository into a pnpm Monorepo with the legacy admin app under `apps/admin`, a TypeScript learning app foundation under `apps/learning`, URL-restorable page state, and working local `/admin` proxy and production build outputs.
**Architecture:** Keep admin and learning as separate Vite applications with separate routers, state, API clients, dependencies, and outputs. The learning app follows the `saas-bi` module structure, uses TanStack React Query for server state, nuqs for recoverable URL state, and Zustand only for transient cross-component client state.
Replace direct login-path comparisons and redirects in this file with `ADMIN_LOGIN_PATH`.
In `apps/admin/src/utils/axios.js`, set:
```js
consthttpRequest=axios.create({
baseURL:import.meta.env.VITE_API_PREFIX,
withCredentials:true,
})
```
Import `ADMIN_LOGIN_PATH` and `normalizeAdminApiPath`, normalize `config.url` before signing, and replace direct `/login` redirects with `ADMIN_LOGIN_PATH`.
-[]**Step 8: Fix login widget URLs that bypass the shared Axios clients**
Change the captcha props in `apps/admin/src/pages/user-module/login/index.jsx`:
Do not call `libraryListOptions` from the Stage 0 page because the `/web` backend route is implemented in Stage 1. Its types and query key are testable now.
-[]**Step 6: Create the state proof page and module route**
Expected: exit 1 listing all three missing files. Do not delete or rename the real `dist` directory for this check.
-[]**Step 3: Build both apps and verify the assembled layout**
Run:
```bash
pnpm build
pnpm verify:build-layout
```
Expected: both commands exit 0 and print `Build layout verified`.
-[]**Step 4: Write app-specific AI instructions**
Update root `AGENTS.md` to describe the Monorepo layout, root commands, and the rule that `apps/admin` and `apps/learning` do not import each other's `src`.
Create `apps/admin/AGENTS.md` stating:
```text
- This is the legacy React 18 admin application served at /admin/.
- Preserve existing JavaScript/JSX and Redux behavior unless a task explicitly changes it.
- Use /api/admin for backend requests.
- Direct browser redirects must remain under /admin.
```
Create `apps/learning/AGENTS.md` stating:
```text
- This is a TypeScript React 18 application served at /.
- Server state belongs in TanStack React Query.
- Recoverable page operation state belongs in nuqs and the URL.
- Zustand is allowed only for transient cross-component client state.
- Redux packages are forbidden.
- Each business module owns its API, Query, URL-state, route, type, component, and view files; files that are not used are not created.
- Pages must not call Axios directly.
```
-[]**Step 5: Run the complete automated verification**
Run:
```bash
pnpm test
pnpm lint:learning
pnpm build
pnpm verify:build-layout
git diff --check
```
Expected: all commands exit 0.
-[]**Step 6: Commit the verification and documentation**