Skip to content

Commit 18b9f9c

Browse files
committed
refactor: replace OpenSpec with lightweight .agent/contracts/
1 parent fa60c9c commit 18b9f9c

250 files changed

Lines changed: 38 additions & 9006 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/contracts/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Contracts
2+
3+
Behavioral contracts for secure-exec. These are the source of truth for runtime, bridge, permissions, stdlib, and governance requirements.
4+
5+
## How contracts work
6+
7+
- Contracts define **what the system must do** using Requirement/Scenario/WHEN/THEN format
8+
- Agents MUST read relevant contracts before implementing changes in contracted areas
9+
- When a change modifies contracted behavior, the relevant contract MUST be updated in the same PR
10+
- Any intentional deviation from Node.js behavior MUST be documented in the relevant contract
11+
- Contracts are reviewed as part of normal PR review — contract changes are code changes
12+
13+
## Contract index
14+
15+
| Contract | Scope |
16+
|----------|-------|
17+
| [node-runtime](node-runtime.md) | Runtime execution, module loading, async completion, dynamic imports, CPU limits, timing mitigation, payload limits, logging |
18+
| [node-bridge](node-bridge.md) | Bridge boundary policy, built-in scope, capability expansion, immutable globals, crypto randomness |
19+
| [node-stdlib](node-stdlib.md) | Module support tiers, builtin resolution, polyfill patches, deterministic errors |
20+
| [node-permissions](node-permissions.md) | Deny-by-default permissions, permission helpers, projected node_modules read-only |
21+
| [compatibility-governance](compatibility-governance.md) | Documentation maintenance, compatibility matrix, friction log, test coverage obligations |
22+
| [typescript-tools](typescript-tools.md) | Companion TypeScript tooling package contracts |
23+
| [documentation-site](documentation-site.md) | Docs site page requirements and content contracts |
24+
| [isolate-runtime-source-architecture](isolate-runtime-source-architecture.md) | Isolate runtime source layout and compilation contracts |
25+
| [runtime-driver-integration-testing](runtime-driver-integration-testing.md) | Runtime-agnostic test suites, TestContext, target enumeration |
26+
| [runtime-driver-test-suite-structure](runtime-driver-test-suite-structure.md) | Canonical test layout, shared suite execution |

openspec/specs/compatibility-governance/spec.md renamed to .agent/contracts/compatibility-governance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ The runtime compatibility target MUST align with the `@types/node` package major
4545
- **THEN** the declared target MUST match the active `@types/node` major version used by secure-exec validation workflows
4646

4747
### Requirement: Maintain Secure-Exec Follow-Up Backlog
48-
Work touching secure-exec behavior SHALL keep follow-up work tracked in OpenSpec change artifacts, including checking off completed tasks and adding newly discovered actionable items as new tasks or follow-up changes.
48+
Work touching secure-exec behavior SHALL keep follow-up work tracked in GitHub issues, including checking off completed items and filing newly discovered actionable items.
4949

5050
#### Scenario: Implementation resolves tracked backlog work
51-
- **WHEN** a change completes an item already tracked in OpenSpec tasks
51+
- **WHEN** a change completes a tracked follow-up item
5252
- **THEN** the item MUST be marked complete with scope-consistent notes
5353

5454
#### Scenario: Implementation uncovers new follow-up work
5555
- **WHEN** development reveals a new actionable gap not currently tracked
56-
- **THEN** a new OpenSpec task or follow-up change MUST be added immediately with enough detail to guide follow-up work
56+
- **THEN** a new issue or task MUST be filed immediately with enough detail to guide follow-up work
5757

5858
### Requirement: Maintain Friction Log for Development Issues
5959
Unexpected issues, workarounds, and integration friction encountered during secure-exec development MUST be recorded in `docs-internal/friction.md`, and resolved items MUST be marked as resolved with fix notes.
@@ -126,7 +126,7 @@ Any runtime timing-hardening behavior that intentionally diverges from default N
126126

127127
#### Scenario: Research and implementation guidance stays aligned
128128
- **WHEN** timing-side-channel mitigations are proposed or revised
129-
- **THEN** `docs-internal/research/comparison/cloudflare-workers-isolates.md` MUST be updated so its recommendations match the current OpenSpec change scope
129+
- **THEN** `docs-internal/research/comparison/cloudflare-workers-isolates.md` MUST be updated so its recommendations match the current contract scope
130130

131131
### Requirement: CPU Limit Compatibility and Friction Documentation Stays Aligned
132132
Any change that introduces or modifies the secure-exec CPU time limit contract MUST update compatibility/friction documentation in the same change.
@@ -137,7 +137,7 @@ Any change that introduces or modifies the secure-exec CPU time limit contract M
137137

138138
#### Scenario: Research guidance reflects current CPU limit design
139139
- **WHEN** CPU limit implementation guidance is revised
140-
- **THEN** `docs-internal/research/comparison/cloudflare-workers-isolates.md` MUST be updated so recommendations match the active runtime contract and OpenSpec deltas
140+
- **THEN** `docs-internal/research/comparison/cloudflare-workers-isolates.md` MUST be updated so recommendations match the active runtime contract
141141

142142
### Requirement: Maintain Canonical Secure-Exec Security Model Documentation
143143
The project MUST maintain `docs/security-model.mdx` as the canonical security model for secure-exec runtime behavior and deployment assumptions.

openspec/specs/isolate-runtime-source-architecture/spec.md renamed to .agent/contracts/isolate-runtime-source-architecture.md

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

openspec/specs/runtime-driver-integration-testing/spec.md renamed to .agent/contracts/runtime-driver-integration-testing.md

File renamed without changes.

openspec/specs/runtime-driver-test-suite-structure/spec.md renamed to .agent/contracts/runtime-driver-test-suite-structure.md

File renamed without changes.

0 commit comments

Comments
 (0)