Skip to content

Commit 4fbfd4a

Browse files
olwangclaude
andcommitted
docs: reorganize into spec/ architecture/ ledgers/ development/ planning/
Move the flat docs/ tree into categorized subfolders (history preserved via git mv) and update every path reference: find_versioned_doc base (now docs/spec), the IR-spec reads in reir/checker_package tests, the vm-jit roadmap comment, root README links, the spec's self-ref, and the docs/ index. No content changes beyond links/paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent a6b9733 commit 4fbfd4a

20 files changed

Lines changed: 45 additions & 26 deletions

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ The product core is the review protocol: `.rssi` semantic contracts, structured
208208

209209
Before AI, writing code was expensive and reviewing was manageable. That ratio has flipped: generating is cheap, reviewing is the bottleneck. RSScript is designed for the new ratio: AI writes, the compiler checks semantic boundaries, humans focus on the *risk*. What mutates, what gets retained, who owns a resource, where you cross into native or unsafe, what changed in a public API — all of it lives in the signature and in machine-readable diagnostics.
210210

211-
This discipline is binding, not aspirational: the language specification opens with a [Constitution](docs/RSScript_v0.7_Spec.md#constitution) of nine articles that govern every design decision — most importantly that constraint is the product, that review-critical behavior must be explicit in the signature, and that a feature is admitted only if it phrases as a reviewer question and needs no implicit rule to be ergonomic. Restraint is anchored to a measurable property (review cost), which is what keeps it from eroding as the language grows.
211+
This discipline is binding, not aspirational: the language specification opens with a [Constitution](docs/spec/RSScript_v0.7_Spec.md#constitution) of nine articles that govern every design decision — most importantly that constraint is the product, that review-critical behavior must be explicit in the signature, and that a feature is admitted only if it phrases as a reviewer question and needs no implicit rule to be ergonomic. Restraint is anchored to a measurable property (review cost), which is what keeps it from eroding as the language grows.
212212

213213
---
214214

@@ -404,7 +404,7 @@ RSScript source
404404

405405
RSScript owns the review-facing front end: syntax, semantic checks, effects, managed/local/resource rules, diagnostics, review metadata, source mapping, and core/standard-package signatures. Rust owns everything below: codegen, optimization, platform support, linking, the crate ecosystem.
406406

407-
This makes RSScript a review-first source format with a deliberately borrowed backend. The value is in the semantic protocol; the back end is Rust's strongest territory, and RSScript leans into that strength. Module boundaries are tracked in [ARCHITECTURE.md](docs/ARCHITECTURE.md).
407+
This makes RSScript a review-first source format with a deliberately borrowed backend. The value is in the semantic protocol; the back end is Rust's strongest territory, and RSScript leans into that strength. Module boundaries are tracked in [ARCHITECTURE.md](docs/architecture/ARCHITECTURE.md).
408408

409409
---
410410

@@ -509,9 +509,9 @@ fn main() -> Unit {
509509
}
510510
```
511511

512-
Development discipline and the full local verification flow live in [DEVELOPMENT.md](docs/DEVELOPMENT.md): spec prerequisites first, self-hosted validation as the main pressure test, no fixture-only shortcuts, and a broad-first testing loop.
512+
Development discipline and the full local verification flow live in [DEVELOPMENT.md](docs/development/DEVELOPMENT.md): spec prerequisites first, self-hosted validation as the main pressure test, no fixture-only shortcuts, and a broad-first testing loop.
513513

514-
Prefer a containerized toolchain? [DOCKER.md](docs/DOCKER.md) gives an identical, reproducible build/test environment on macOS, Windows, and Linux (and VS Code / Codespaces) with no local Rust install:
514+
Prefer a containerized toolchain? [DOCKER.md](docs/development/DOCKER.md) gives an identical, reproducible build/test environment on macOS, Windows, and Linux (and VS Code / Codespaces) with no local Rust install:
515515

516516
```sh
517517
docker compose build

crates/reir/tests/reir_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ fn mvp_cross_layer_capability_reconciliation() {
12291229

12301230
#[test]
12311231
fn reir_spec_lists_implemented_core_slice_kinds() {
1232-
let spec = fs::read_to_string(workspace_root().join("docs/Review_Evidence_IR_Spec_v0.2.md"))
1232+
let spec = fs::read_to_string(workspace_root().join("docs/spec/Review_Evidence_IR_Spec_v0.2.md"))
12331233
.expect("REIR spec should be readable");
12341234
for kind in [
12351235
"missing_capability_slice",
@@ -1271,7 +1271,7 @@ fn reir_spec_lists_implemented_core_slice_kinds() {
12711271

12721272
#[test]
12731273
fn reir_spec_lists_implemented_core_capability_categories() {
1274-
let spec = fs::read_to_string(workspace_root().join("docs/Review_Evidence_IR_Spec_v0.2.md"))
1274+
let spec = fs::read_to_string(workspace_root().join("docs/spec/Review_Evidence_IR_Spec_v0.2.md"))
12751275
.expect("REIR spec should be readable");
12761276
for category in [
12771277
"network.client",
@@ -1320,7 +1320,7 @@ fn reir_spec_lists_implemented_core_capability_categories() {
13201320

13211321
#[test]
13221322
fn reir_spec_lists_implemented_core_fact_and_edge_kinds() {
1323-
let spec = fs::read_to_string(workspace_root().join("docs/Review_Evidence_IR_Spec_v0.2.md"))
1323+
let spec = fs::read_to_string(workspace_root().join("docs/spec/Review_Evidence_IR_Spec_v0.2.md"))
13241324
.expect("REIR spec should be readable");
13251325
for kind in [
13261326
"capability",
@@ -1402,7 +1402,7 @@ fn reir_spec_lists_implemented_core_fact_and_edge_kinds() {
14021402

14031403
#[test]
14041404
fn reir_spec_lists_implemented_core_subject_kinds() {
1405-
let spec = fs::read_to_string(workspace_root().join("docs/Review_Evidence_IR_Spec_v0.2.md"))
1405+
let spec = fs::read_to_string(workspace_root().join("docs/spec/Review_Evidence_IR_Spec_v0.2.md"))
14061406
.expect("REIR spec should be readable");
14071407
for kind in [
14081408
"application",

crates/rsscript/tests/checker_package/review.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ build_execution_default = "sometimes"
14531453
#[test]
14541454
fn reir_spec_keeps_os_close_as_descriptor_cleanup_not_external_capability() {
14551455
let root = common::workspace_root();
1456-
let spec = fs::read_to_string(root.join("docs/Review_Evidence_IR_Spec_v0.2.md"))
1456+
let spec = fs::read_to_string(root.join("docs/spec/Review_Evidence_IR_Spec_v0.2.md"))
14571457
.expect("REIR spec should be readable");
14581458

14591459
assert!(spec.contains("`OS.close`"));

crates/rsscript/tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn package_manager_spec_path() -> PathBuf {
4747
/// Find exactly one file in `docs/` whose name starts with `prefix` and ends
4848
/// with `suffix` (the span between them is the version and is not constrained).
4949
fn find_versioned_doc(prefix: &str, suffix: &str) -> PathBuf {
50-
let docs = workspace_root().join("docs");
50+
let docs = workspace_root().join("docs").join("spec");
5151
let mut matches: Vec<PathBuf> = fs::read_dir(&docs)
5252
.unwrap_or_else(|error| panic!("docs/ should be readable: {error}"))
5353
.filter_map(|entry| entry.ok().map(|entry| entry.path()))

crates/vm-jit/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Native (Cranelift) baseline JIT for the RSScript register VM's numeric /
2-
//! boolean / control-flow core — Phase 2 of `docs/jit-roadmap.md`.
2+
//! boolean / control-flow core — Phase 2 of `docs/architecture/jit-roadmap.md`.
33
//!
44
//! # What it compiles
55
//!

docs/README.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,46 @@
22

33
Normative specifications and design drafts for RSScript. The project root keeps
44
only `README.md` (overview) and `AGENT.md` (the prompt-sized language guide for
5-
LLMs); everything else lives here.
5+
LLMs); everything else lives here, grouped into categorized subfolders.
66

7-
## Normative specs
7+
## Spec
88

99
| Doc | What it governs |
1010
|-----|-----------------|
11-
| [RSScript_v0.7_Spec.md](RSScript_v0.7_Spec.md) | The language. Opens with a binding **Constitution** (Articles I–IX) that overrides every chapter. |
12-
| [RSScript_Package_Manager_Design_v0.6.md](RSScript_Package_Manager_Design_v0.6.md) | The package manager (`rss pkg`): `.rssi` contracts, `rsspkg.toml`/`.lock`, semantic dependency review. |
13-
| [Review_Evidence_IR_Spec_v0.2.md](Review_Evidence_IR_Spec_v0.2.md) | REIR — the review-evidence IR consumed by `--reir` tooling and CI gates. |
14-
| [ARCHITECTURE.md](ARCHITECTURE.md) | Module boundaries of the checker/lowering implementation. |
15-
| [DEVELOPMENT.md](DEVELOPMENT.md) | Local verification flow and development discipline. |
16-
| [DOCKER.md](DOCKER.md) | Containerized, cross-platform dev environment (Docker / VS Code / Codespaces). |
17-
| [spec-todo.md](spec-todo.md) | Prioritized list of unimplemented spec surface (the §3.2 / §20.1 superset). |
18-
| [cross-isolate-design.md](cross-isolate-design.md) | Feasibility + smallest-sound-slice plan for the cross-isolate message API (§20.2-3): message-channel core landed, multi-heap isolates still future. |
19-
| [ml-perf-todo.md](ml-perf-todo.md) | ML-framework perf plan: native tensor kernels (fix VM big-matrix cliff) + AOT build-time levers. |
20-
21-
## Implementation-planning specs (not yet normative)
11+
| [RSScript_v0.7_Spec.md](spec/RSScript_v0.7_Spec.md) | The language. Opens with a binding **Constitution** (Articles I–IX) that overrides every chapter. |
12+
| [RSScript_Package_Manager_Design_v0.6.md](spec/RSScript_Package_Manager_Design_v0.6.md) | The package manager (`rss pkg`): `.rssi` contracts, `rsspkg.toml`/`.lock`, semantic dependency review. |
13+
| [Review_Evidence_IR_Spec_v0.2.md](spec/Review_Evidence_IR_Spec_v0.2.md) | REIR — the review-evidence IR consumed by `--reir` tooling and CI gates. |
14+
15+
## Architecture
16+
17+
| Doc | What it governs |
18+
|-----|-----------------|
19+
| [ARCHITECTURE.md](architecture/ARCHITECTURE.md) | Module boundaries of the checker/lowering implementation. |
20+
| [vm-architecture.md](architecture/vm-architecture.md) | Register VM design: bytecode, dispatch, and runtime layout. |
21+
| [jit-roadmap.md](architecture/jit-roadmap.md) | Phased plan for the native (Cranelift) baseline JIT. |
22+
23+
## Ledgers
24+
25+
| Doc | What it governs |
26+
|-----|-----------------|
27+
| [jit-semantics-ledger.md](ledgers/jit-semantics-ledger.md) | Per-op record of JIT/VM semantic parity decisions. |
28+
| [rss-selfhost-ledger.md](ledgers/rss-selfhost-ledger.md) | Self-hosting progress ledger for the RSScript-in-RSScript toolchain. |
29+
30+
## Development
31+
32+
| Doc | What it governs |
33+
|-----|-----------------|
34+
| [DEVELOPMENT.md](development/DEVELOPMENT.md) | Local verification flow and development discipline. |
35+
| [DOCKER.md](development/DOCKER.md) | Containerized, cross-platform dev environment (Docker / VS Code / Codespaces). |
36+
37+
## Planning
2238

2339
| Doc | Idea |
2440
|-----|------|
25-
| [RSScript_AI_Generation_Feedback_v0.1.md](RSScript_AI_Generation_Feedback_v0.1.md) | Agent-facing generation oracle plus fast interpreter feedback loop for AI-generated RSScript. |
41+
| [spec-todo.md](planning/spec-todo.md) | Prioritized list of unimplemented spec surface (the §3.2 / §20.1 superset). |
42+
| [ml-perf-todo.md](planning/ml-perf-todo.md) | ML-framework perf plan: native tensor kernels (fix VM big-matrix cliff) + AOT build-time levers. |
43+
| [cross-isolate-design.md](planning/cross-isolate-design.md) | Feasibility + smallest-sound-slice plan for the cross-isolate message API (§20.2-3): message-channel core landed, multi-heap isolates still future. |
44+
| [RSScript_AI_Generation_Feedback_v0.1.md](planning/RSScript_AI_Generation_Feedback_v0.1.md) | Agent-facing generation oracle plus fast interpreter feedback loop for AI-generated RSScript. |
2645

2746
## Conventions
2847

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)