Skip to content

Commit 57b4d64

Browse files
Doc grouping and updates
1 parent 6f607a0 commit 57b4d64

25 files changed

Lines changed: 488 additions & 233 deletions

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ If only `yarn dev` runs, `/api/*` is not available and auth/gating/read pages wi
4242
### Backend docs
4343

4444
- Start here: `docs/README.md`
45-
- Module map (paper → docs → code): `docs/vortex-simulation-modules.md`
46-
- API contract: `docs/vortex-simulation-api-contract.md`
47-
- Proposal wizard architecture: `docs/vortex-simulation-proposal-wizard-architecture.md`
48-
- Local dev: `docs/vortex-simulation-local-dev.md`
49-
- Scope and rules: `docs/vortex-simulation-scope-v1.md`, `docs/vortex-simulation-state-machines.md`
50-
- Vortex 1.0 reference (working copy): `docs/vortex-1.0-paper.md`
45+
- Docs are grouped in: `docs/simulation/`, `docs/ops/`, `docs/paper/`
46+
- Module map (paper → docs → code): `docs/simulation/vortex-simulation-modules.md`
47+
- API contract: `docs/simulation/vortex-simulation-api-contract.md`
48+
- Proposal wizard architecture: `docs/simulation/vortex-simulation-proposal-wizard-architecture.md`
49+
- Local dev: `docs/simulation/vortex-simulation-local-dev.md`
50+
- Scope and rules: `docs/simulation/vortex-simulation-scope-v1.md`, `docs/simulation/vortex-simulation-state-machines.md`
51+
- Vortex 1.0 reference (working copy): `docs/paper/vortex-1.0-paper.md`
5152

5253
## Scripts
5354

@@ -86,4 +87,4 @@ If only `yarn dev` runs, `/api/*` is not available and auth/gating/read pages wi
8687

8788
- `dist/` is generated build output.
8889
- Keep glossary entries in sync between `src/data/vortexopedia.ts` and `prolog/vortexopedia.pl` if you edit definitions.
89-
- DB-backed dev requires `DATABASE_URL` + `yarn db:migrate && yarn db:seed` (see `docs/vortex-simulation-local-dev.md`).
90+
- DB-backed dev requires `DATABASE_URL` + `yarn db:migrate && yarn db:seed` (see `docs/simulation/vortex-simulation-local-dev.md`).

docs/README.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This folder documents the **Vortex simulation backend** that powers the UI in this repo.
44

5+
Docs are grouped by intent:
6+
7+
- `docs/simulation/` — core simulation specs, architecture, and implementation plan
8+
- `docs/ops/` — operational runbook for the backend
9+
- `docs/paper/` — working reference copy of the Vortex 1.0 paper
10+
511
## Overview
612

713
This repo ships two pieces together:
@@ -20,7 +26,7 @@ The simulation is **not** an on-chain implementation. Humanode mainnet is used o
2026

2127
The UI reads from `/api/*`. The contract is kept stable so the backend can evolve without forcing UI churn:
2228

23-
- Contract source of truth: `docs/vortex-simulation-api-contract.md`
29+
- Contract source of truth: `docs/simulation/vortex-simulation-api-contract.md`
2430
- TS DTO types used by the UI: `src/types/api.ts`
2531

2632
In v1, reads are backed by a transitional `read_models` table (and optional overlays from normalized tables), so pages can render without requiring the full normalized domain schema on day one.
@@ -67,20 +73,20 @@ Goal: keep a tight, professional set of docs that answers:
6773

6874
## Reading order
6975

70-
1. `docs/vortex-simulation-scope-v1.md` — v1 scope, explicit non-goals, and what “done” means
71-
2. `docs/vortex-simulation-modules.md` — module map (paper → docs → code)
72-
3. `docs/vortex-simulation-processes.md` — domain processes to model (product-level)
73-
4. `docs/vortex-simulation-proposal-wizard-architecture.md` — proposal wizard template architecture (project vs system flows)
74-
5. `docs/vortex-simulation-state-machines.md` — formal state machines, invariants, and derived metrics
75-
6. `docs/vortex-simulation-tech-architecture.md` — technical architecture (runtime + DB + API shape)
76-
7. `docs/vortex-simulation-data-model.md` — DB tables and how reads/writes/events map to them
77-
8. `docs/vortex-simulation-api-contract.md` — frozen DTO contracts consumed by the UI
78-
9. `docs/vortex-simulation-local-dev.md` — local dev commands and env vars
79-
10. `docs/vortex-simulation-ops-runbook.md` — admin endpoints, safety controls, and operational workflows
80-
11. `docs/vortex-simulation-implementation-plan.md` — phased plan + current status
81-
12. `docs/vortex-simulation-v1-constants.md` — v1 constants shared by code and tests
82-
13. `docs/vortex-1.0-paper.md` — working, adapted reference copy of the Vortex 1.0 paper (used for audits)
83-
14. `docs/vortex-simulation-paper-alignment.md` — paper vs simulation audit notes (what matches, what’s deferred)
76+
1. `docs/simulation/vortex-simulation-scope-v1.md` — v1 scope, explicit non-goals, and what “done” means
77+
2. `docs/simulation/vortex-simulation-modules.md` — module map (paper → docs → code)
78+
3. `docs/simulation/vortex-simulation-processes.md` — domain processes to model (product-level)
79+
4. `docs/simulation/vortex-simulation-proposal-wizard-architecture.md` — proposal wizard template architecture (project vs system flows)
80+
5. `docs/simulation/vortex-simulation-state-machines.md` — formal state machines, invariants, and derived metrics
81+
6. `docs/simulation/vortex-simulation-tech-architecture.md` — technical architecture (runtime + DB + API shape)
82+
7. `docs/simulation/vortex-simulation-data-model.md` — DB tables and how reads/writes/events map to them
83+
8. `docs/simulation/vortex-simulation-api-contract.md` — frozen DTO contracts consumed by the UI
84+
9. `docs/simulation/vortex-simulation-local-dev.md` — local dev commands and env vars
85+
10. `docs/ops/vortex-simulation-ops-runbook.md` — admin endpoints, safety controls, and operational workflows
86+
11. `docs/simulation/vortex-simulation-implementation-plan.md` — phased plan + current status
87+
12. `docs/simulation/vortex-simulation-v1-constants.md` — v1 constants shared by code and tests
88+
13. `docs/paper/vortex-1.0-paper.md` — working, adapted reference copy of the Vortex 1.0 paper (used for audits)
89+
14. `docs/simulation/vortex-simulation-paper-alignment.md` — paper vs simulation audit notes (what matches, what’s deferred)
8490

8591
## Doc conventions
8692

@@ -92,10 +98,10 @@ Goal: keep a tight, professional set of docs that answers:
9298

9399
### Truth hierarchy
94100

95-
- **API truth:** `docs/vortex-simulation-api-contract.md` + `src/types/api.ts`
96-
- **Scope truth:** `docs/vortex-simulation-scope-v1.md`
97-
- **Behavior truth:** `docs/vortex-simulation-state-machines.md` (rules + invariants)
98-
- **Operational truth:** `docs/vortex-simulation-ops-runbook.md`
101+
- **API truth:** `docs/simulation/vortex-simulation-api-contract.md` + `src/types/api.ts`
102+
- **Scope truth:** `docs/simulation/vortex-simulation-scope-v1.md`
103+
- **Behavior truth:** `docs/simulation/vortex-simulation-state-machines.md` (rules + invariants)
104+
- **Operational truth:** `docs/ops/vortex-simulation-ops-runbook.md`
99105

100106
### Status tags
101107

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This document is the operational reference for running the simulation backend as
77
- Production: Cloudflare Pages Functions (`functions/`)
88
- Local: Node runner (`yarn dev:api`) with the UI proxy (`yarn dev` / `yarn dev:full`)
99

10-
Local dev details: `docs/vortex-simulation-local-dev.md`.
10+
Local dev details: `docs/simulation/vortex-simulation-local-dev.md`.
1111

1212
## Admin auth
1313

@@ -42,7 +42,7 @@ Write commands run through `POST /api/command`. The system supports four layers
4242
- `GET /api/admin/users/:address`
4343
- `GET /api/admin/audit`
4444

45-
Details of request/response DTOs: `docs/vortex-simulation-api-contract.md`.
45+
Details of request/response DTOs: `docs/simulation/vortex-simulation-api-contract.md`.
4646

4747
## Incident playbooks
4848

File renamed without changes.

docs/vortex-simulation-api-contract.md renamed to docs/simulation/vortex-simulation-api-contract.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Notes:
167167
- `templateId` is optional; if omitted the backend infers `"system"` when `metaGovernance` is present, otherwise `"project"`.
168168
- The backend now validates drafts using a template-aware discriminant (project vs system) so system proposals can omit project-only fields; missing fields are normalized to defaults for storage.
169169
- Planned (v2+): drafts will continue to evolve into a template-driven discriminated union (project vs system-change flows), with full backend/schema separation. The target architecture and rollout phases are documented in:
170-
- `docs/vortex-simulation-proposal-wizard-architecture.md`
170+
- `docs/simulation/vortex-simulation-proposal-wizard-architecture.md`
171171

172172
type ProposalDraftSaveCommand = {
173173
type: "proposal.draft.save";

docs/vortex-simulation-data-model.md renamed to docs/simulation/vortex-simulation-data-model.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The schema is implemented in `db/schema.ts` with migrations under `db/migrations
1616

1717
Purpose:
1818

19-
- Store JSON payloads that directly match the DTOs in `docs/vortex-simulation-api-contract.md`.
19+
- Store JSON payloads that directly match the DTOs in `docs/simulation/vortex-simulation-api-contract.md`.
2020

2121
Modes:
2222

@@ -90,7 +90,7 @@ Planned (v2+):
9090

9191
- The draft `payload` will evolve from a single “project-shaped” object with optional `metaGovernance` into a **discriminated union** aligned with proposal wizard templates (project vs system-change flows).
9292
- The wizard architecture and phased migration strategy are described in:
93-
- `docs/vortex-simulation-proposal-wizard-architecture.md`
93+
- `docs/simulation/vortex-simulation-proposal-wizard-architecture.md`
9494

9595
## Proposals (Phase 14)
9696

0 commit comments

Comments
 (0)