Skip to content

Commit b8c5bbf

Browse files
committed
Update spec workflow instructions
1 parent b0b88a9 commit b8c5bbf

19 files changed

Lines changed: 1455 additions & 1089 deletions

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Changed
66

7-
- **The bounded TypeScript lane now proves the same-tree chain3 family in M54** — eligible `kind:function` roots may still use the helper-aware monotone-up lane from M46 and the same-tree wrapper lane from M52, and may now also classify to `function.wrapper.pipeline.chain3.v1` when they declare the exact same-tree local dep tuple `function.wrapper.pipeline.v1` then `function.arithmetic_leaf.monotone_up.v1` then `function.arithmetic_leaf.monotone_down_nonnegative.v1`. The lane remains Bun-only, atom-only, and additive to Rust proof; it still does not widen to molecule execution, generic multi-dep execution, seam kinds, nested chain3 closure members, cross-library TypeScript resolution, `spec validate --target-language`, or `spec export --target-language`.
7+
- **The bounded TypeScript lane now admits cross-library helper imports in M55** — eligible `kind:function` roots may still use the helper-aware monotone-up lane from M46, the same-tree wrapper lane from M52, and the same-tree chain3 lane from M54. In M55, the one legal helper slot under the monotone-up lane may now resolve a sibling-library helper like `shared::money/round`, and bounded wrapper/chain3 closures may reuse that shared helper transitively once it is in the loaded tree. The lane remains Bun-only, atom-only, and additive to Rust proof; it still does not widen to molecule execution, generic multi-dep execution, seam kinds, direct cross-library wrapper roots, direct cross-library chain3 roots, nested chain3 closure members, `spec validate --target-language`, or `spec export --target-language`.
88

99
## 0.14.0 - 2026-05-07
1010

ORCH_PLAN.md

Lines changed: 630 additions & 518 deletions
Large diffs are not rendered by default.

PLAN.md

Lines changed: 469 additions & 481 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ spec validate examples/ecommerce/units
4747
spec generate examples/ecommerce/units
4848
```
4949

50-
## Bounded TypeScript lane (M54)
50+
## Bounded TypeScript lane (M55)
5151

5252
`spec` now exposes one bounded TypeScript execution lane. It is intentionally narrow:
5353

5454
- Bun is the only TypeScript prerequisite. The lane shells out to `bun`; no alternate Node, npm, or tsx contract is supported.
5555
- Eligible roots are exactly `kind: function` specs that classify to `function.arithmetic_leaf.monotone_up.v1`, `function.wrapper.pipeline.v1`, or the bounded same-tree `function.wrapper.pipeline.chain3.v1`.
56-
- Monotone-up roots may declare `deps: []` or exactly one direct local helper dep. That helper must classify to `function.helper.identity_passthrough.v1`, exist in the same loaded unit set and generated tree, and be the only direct dep of the current unit.
56+
- Monotone-up roots may declare `deps: []` or exactly one direct helper dep. That helper must classify to `function.helper.identity_passthrough.v1`, author non-empty `body.typescript`, and exist in the loaded unit set and generated tree. In M55, that one helper dep may now be cross-library when it is referenced through `[libraries]` as a sibling import like `shared::money/round`.
5757
- Wrapper roots must declare exactly two direct local deps in the same loaded unit set and generated tree. The ordered dep tuple is frozen to `function.arithmetic_leaf.monotone_down_nonnegative.v1` then `function.arithmetic_leaf.monotone_up.v1`, and both deps must author non-empty `body.typescript`.
5858
- Chain3 roots must declare exactly three direct local deps in the same loaded unit set and generated tree. The ordered dep tuple is frozen to `function.wrapper.pipeline.v1` then `function.arithmetic_leaf.monotone_up.v1` then `function.arithmetic_leaf.monotone_down_nonnegative.v1`, and every direct dep must author non-empty `body.typescript`.
5959
- Chain3 closure collection stays bounded. A same-tree wrapper may appear as a closure member under a chain3 root, but nested `function.wrapper.pipeline.chain3.v1` closure members remain unsupported.
@@ -70,19 +70,19 @@ spec test <path> --target-language typescript
7070
spec status <unit-or-root> --target-language typescript
7171
```
7272

73-
`spec status <unit-or-root> --target-language typescript` reports target-specific proof only. In M54, a root-level status over a mixed example like `examples/ecommerce` may stay non-green unless every unit in scope is either freshly proven in the bounded monotone-up, wrapper, or same-tree chain3 lane, or truthfully remains outside that lane.
73+
`spec status <unit-or-root> --target-language typescript` reports target-specific proof only. In M55, a root-level status over a mixed example like `examples/ecommerce` or `examples/crosslib-app` may stay non-green unless every unit in scope is either freshly proven in the bounded monotone-up, wrapper, or same-tree chain3 lane, or truthfully remains outside that lane.
7474

75-
The generated helper filenames remain frozen in M54:
75+
The generated helper filenames remain frozen in M55:
7676

7777
- `__spec_ts/runtime.ts`
7878
- `__spec_ts/build_entry.ts`
7979
- `__spec_ts/local_tests.ts`
8080

81-
Commands and surfaces that do not widen for M54:
81+
Commands and surfaces that do not widen for M55:
8282

8383
- `spec validate` does not accept `--target-language`
8484
- `spec export` does not accept `--target-language`
85-
- This lane does not widen to molecule execution, generic multi-dep execution, seam kinds, cross-library TypeScript resolution, nested chain3 closure members, `spec validate --target-language`, or `spec export --target-language`.
85+
- This lane does not widen to molecule execution, generic multi-dep execution, seam kinds, direct cross-library wrapper roots, direct cross-library chain3 roots, nested chain3 closure members, `spec validate --target-language`, or `spec export --target-language`.
8686

8787
## Spec format
8888

TODOS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192

193193
- [x] **Bounded same-tree chain3 TypeScript execution in `spec`** — Completed by M54 (2026-05-13). The bounded Bun-backed TypeScript lane now admits the same-tree `function.wrapper.pipeline.chain3.v1` family with the frozen direct local dep tuple `wrapper.pipeline -> monotone_up -> monotone_down_nonnegative`, while keeping proof additive, atom-only, and target-specific.
194194

195-
- [ ] **Cross-library TypeScript helper imports**Deferred by the M46 review. Same-tree helper execution is enough to close the current product-family mismatch; cross-library target resolution is a different portability problem.
195+
- [x] **Cross-library TypeScript helper imports**Completed by M55 (2026-05-13). The bounded Bun-backed TypeScript lane now admits cross-library helper imports in the one legal helper slot for `function.arithmetic_leaf.monotone_up.v1`, and bounded wrapper/chain3 closures may reuse that shared helper transitively once it is in the loaded tree.
196196

197-
- [ ] **Generic multi-dependency TypeScript execution** — Deferred again after M54. The current lane is intentionally family-shaped: helper-aware monotone-up roots plus same-tree wrapper roots and same-tree chain3 roots only, not arbitrary dependency topologies.
197+
- [ ] **Direct cross-library wrapper and chain3 TypeScript roots** — Deferred after M55. Cross-library helper imports are now allowed only in legal helper slots; direct wrapper root deps and direct chain3 root deps remain local-only.
198+
199+
- [ ] **Generic multi-dependency TypeScript execution** — Deferred again after M55. The current lane is intentionally family-shaped: helper-aware monotone-up roots, cross-library helper imports only in that legal helper slot, plus same-tree wrapper roots and same-tree chain3 roots only, not arbitrary dependency topologies.

examples/crosslib-app/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# crosslib app example
22

3-
This example demonstrates M9 direct sibling-library reuse.
3+
This example demonstrates M9 direct sibling-library reuse plus M55 cross-library helper imports in the bounded TypeScript lane.
44

55
From the repo root:
66

@@ -9,4 +9,5 @@ cargo run -p spec-cli -- generate examples/shared-spec/units --output examples/s
99
cargo run -p spec-cli -- generate examples/crosslib-app/units --output examples/crosslib-app/src/generated
1010
cargo check --manifest-path examples/crosslib-app/Cargo.toml
1111
cargo test --manifest-path examples/crosslib-app/Cargo.toml
12+
cargo run -p spec-cli -- test examples/crosslib-app/units/pricing/apply_tax.unit.spec --target-language typescript
1213
```

examples/crosslib-app/units/pricing/apply_tax.spec.passport.json

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"expect": "apply_tax(Decimal::new(10000, 2), Decimal::new(725, 4)) == Decimal::new(10725, 2)"
2525
}
2626
],
27-
"generated_at": "2026-05-02T15:59:38Z",
27+
"generated_at": "2026-05-13T16:26:14Z",
2828
"source_file": "examples/crosslib-app/units/pricing/apply_tax.unit.spec",
2929
"evidence": {
3030
"build_status": "pass",
@@ -47,6 +47,54 @@
4747
"authored_truth_status": "fresh",
4848
"backend_execution_status": "unknown"
4949
},
50+
"target_proofs": {
51+
"rust": {
52+
"evidence": {
53+
"build_status": "pass",
54+
"test_results": [
55+
{
56+
"id": "happy_path",
57+
"status": "pass"
58+
}
59+
],
60+
"observed_at": "2026-05-02T15:59:40Z",
61+
"provenance": {
62+
"git_commit_sha": "8577dfb5a64daaa02be54501f97131fb25459f72"
63+
}
64+
},
65+
"freshness_anchor": {
66+
"authored_truth_digest": "sha256:695b199a2fc2a1073658d52bd80efe5658e4cc55debaf5de2d029cdfe8197617"
67+
},
68+
"freshness": {
69+
"authored_truth_digest": "sha256:695b199a2fc2a1073658d52bd80efe5658e4cc55debaf5de2d029cdfe8197617",
70+
"authored_truth_status": "fresh",
71+
"backend_execution_status": "unknown"
72+
}
73+
},
74+
"typescript": {
75+
"evidence": {
76+
"build_status": "pass",
77+
"test_results": [
78+
{
79+
"id": "happy_path",
80+
"status": "pass"
81+
}
82+
],
83+
"observed_at": "2026-05-13T16:26:14Z",
84+
"provenance": {
85+
"git_commit_sha": "b0b88a9ad26f8e9d986aa0354dcf27b22d43a8d2"
86+
}
87+
},
88+
"freshness_anchor": {
89+
"authored_truth_digest": "sha256:dc857f9ce5e43cdcd14c4f9ca879fe1fd8a8bc2b59b81f103c04cfb9faaa6e31"
90+
},
91+
"freshness": {
92+
"authored_truth_digest": "sha256:dc857f9ce5e43cdcd14c4f9ca879fe1fd8a8bc2b59b81f103c04cfb9faaa6e31",
93+
"authored_truth_status": "fresh",
94+
"backend_execution_status": "unknown"
95+
}
96+
}
97+
},
5098
"semantic_review": {
5199
"verdict": "aligned",
52100
"compatibility_key": "function.arithmetic_leaf.monotone_up.v1",
@@ -68,6 +116,10 @@
68116
{
69117
"path": "deps",
70118
"summary": "1 declared dep(s)"
119+
},
120+
{
121+
"path": "body.typescript",
122+
"summary": "authored TypeScript body present"
71123
}
72124
],
73125
"executable_surfaces": [

examples/crosslib-app/units/pricing/apply_tax.unit.spec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ body:
1818
let taxed = subtotal + subtotal * rate;
1919
round(taxed).max(Decimal::ZERO)
2020
}
21+
typescript: |
22+
{
23+
const taxed = subtotal.add(subtotal.mul(rate));
24+
return round(taxed);
25+
}
2126
local_tests:
2227
- id: happy_path
2328
expect: apply_tax(Decimal::new(10000, 2), Decimal::new(725, 4)) == Decimal::new(10725, 2)

examples/ecommerce/units/money/round.spec.passport.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"deps": [],
1515
"local_tests": [],
16-
"generated_at": "2026-05-11T22:23:29Z",
16+
"generated_at": "2026-05-13T16:36:50Z",
1717
"source_file": "examples/ecommerce/units/money/round.unit.spec",
1818
"evidence": {
1919
"build_status": "pass",

examples/ecommerce/units/pricing/apply_discount.spec.passport.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"expect": "apply_discount(Decimal::new(10000, 2), Decimal::new(10, 2)) == Decimal::new(9000, 2)"
2929
}
3030
],
31-
"generated_at": "2026-05-11T22:23:29Z",
31+
"generated_at": "2026-05-13T16:36:50Z",
3232
"source_file": "examples/ecommerce/units/pricing/apply_discount.unit.spec",
3333
"evidence": {
3434
"build_status": "pass",

0 commit comments

Comments
 (0)