Skip to content

Commit 3958643

Browse files
committed
Retire PLAN.md: split into docs/ + AGENTS.md; dangling tasks -> issues #1-#16
PLAN.md's roles are redistributed: - docs/architecture.md: goals/non-goals, compatibility targets, the architecture, the JSPI frame rule, concurrency, CABI decisions, perf, bindgen, caching (+ the trust-boundary lean), conformance, risks. Section numbers 1-11 preserved exactly so existing citations rewrite mechanically. - docs/milestones.md: the verified milestone record (S0-C3), residuals pointing at tracking issues. - docs/consumers.md: the polymorph adoption track (jco blocker mapping, Deno-substitutes-Node evidence, in-repo ports inventory). - docs/references.md: canonical upstream links. - AGENTS.md: the development protocol (authorities, gates, multi-agent dispatch/review/recovery rules) - loaded automatically by agent sessions. - README: documentation index replaces the PLAN pointer. Dangling tasks migrated to issues #1-#16 (wasmtime bump, mosh deep E2E, webcrypto families, iroh UDP, bridge-exclusivity review, CI, code-cache check, P1 executor, fuzzing, FinalizationRegistry policy, Safari/JSC, memory64/threads, xfail residues, polymorph upstreaming, upstream filings, versioned releases). Reference sweep: ~90 files of PLAN.md citations rewritten to the new locations (contracts, runtime/harness comments, generated bindgen headers regenerated - digests unchanged, xfail reasons now cite issues). Gates: runtime 318/0, bindgen+translator-shim green, conformance table byte-identical (1250/0/99/41/5). Also fixes the PLAN reference in the just-landed ci.yml (parallel work, e60ea4a).
1 parent e60ea4a commit 3958643

98 files changed

Lines changed: 1051 additions & 976 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.

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ jobs:
150150
- name: firefox lane (required — JSPI pref set by the driver)
151151
run: deno run -A tools/browser/run-lane.ts firefox
152152

153-
# WebKit is best-effort per PLAN §13/§14: the lane's expectation overlay
153+
# WebKit is best-effort per docs/architecture.md §3/§12 (issue #11): the
154+
# lane's expectation overlay
154155
# encodes JSC's missing multi-memory; GH's ubuntu-24.04 matches the ABI
155156
# playwright's WebKit wants, so no library staging should be needed —
156157
# but the lane stays non-blocking until it has a track record.

AGENTS.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# deltic — development protocol
2+
3+
Instructions for agents (and context for humans) working in this repo. The
4+
repo was built by a multi-agent workflow and its discipline is part of the
5+
project: unusually dense objective gates are what make delegated
6+
implementation safe.
7+
8+
## Authorities
9+
10+
- Semantic tie-breaker for runtime behavior: the Component Model spec +
11+
`design/mvp/canonical-abi/definitions.py` (in the
12+
`third_party/component-model` submodule), with wasmtime as corroborating
13+
evidence — never the other way around. See
14+
[docs/architecture.md](docs/architecture.md) §1 for the parity policy.
15+
- Interface contracts between workstreams live in `contracts/` (plan format,
16+
descriptor IR, intrinsics, digest, embedder API). **Contract changes are
17+
versioned events made only by the orchestrator**; implementation tracks
18+
report contract friction, they never edit around it.
19+
- Design and decisions: [docs/architecture.md](docs/architecture.md).
20+
Milestone record: [docs/milestones.md](docs/milestones.md). Consumer
21+
track: [docs/consumers.md](docs/consumers.md). Upstream links:
22+
[docs/references.md](docs/references.md).
23+
24+
## Gates (exact commands)
25+
26+
Run the ones your change can affect; a full pass before commit looks like:
27+
28+
```sh
29+
cargo build --workspace
30+
cargo test -p translator-shim -p bindgen -p testgen
31+
(cd runtime && deno task check && deno task test)
32+
(cd harness && deno task conformance) # official CM suite, Deno lane
33+
(cd wasi-shims && deno task test)
34+
(cd ct-runner && deno task test)
35+
(cd ports/websocket && deno task test) # + deno task conformance (spawns their echod)
36+
(cd ports/webcrypto && deno test --allow-read tests/)
37+
(cd ports/webrtc && deno test -A webrtc.test.ts)
38+
deno run -A tools/browser/run-lane.ts chromium # firefox / webkit likewise
39+
deno run -A --unstable-net exams/iroh-endpoint/run.ts # needs iroh-relay on PATH
40+
```
41+
42+
Scheduler-order sensitivity: rerun affected suites with `DELTIC_SCHED_SEED=1`
43+
and `=4242` (seeded-shuffle mode; FIFO when unset).
44+
45+
Conformance discipline: the harness fails loudly on unexpected failures *and*
46+
on stale xfails; per-browser deltas live in `harness/browser/expectations/`
47+
with stale-delta detection. Never absorb a regression into an xfail/overlay
48+
without a named class and a tracking issue.
49+
50+
## Multi-agent protocol
51+
52+
Work is parallelized across model-pinned subagents defined in the operator's
53+
**global** opencode config — deliberately not vendored into this repo, so all
54+
repo-specific context (contracts, spec authorities, gates) travels in each
55+
dispatch prompt.
56+
57+
| Agent | Model | Role |
58+
|---|---|---|
59+
| orchestrator (primary session) | fable | planning, contracts, dispatch, integration, review, **all commits** |
60+
| `coder` | sonnet | implementation tracks against pinned contracts |
61+
| `coder-hard` | opus | subtle tracks: shim internals, CABI edge cases, scheduler periphery |
62+
| `reviewer` | fable | parallel code review when the orchestrator is the bottleneck |
63+
| `explore` | haiku | fast read-only codebase search |
64+
65+
Dispatch rules:
66+
67+
- Every track prompt names: **territory** (paths owned), **governing
68+
contracts** (`contracts/*.md` + design-doc sections), and **gates** (exact
69+
commands). Territories are disjoint across concurrent tracks.
70+
- Subagents never commit (permission-enforced); the orchestrator commits
71+
after review.
72+
- The task-scheduler **core** is single-owner (coherence risk):
73+
`coder-hard` at most, under close orchestrator review; parallelism stays at
74+
the periphery.
75+
76+
Review protocol: every track is reviewed against its contracts before commit
77+
— by the orchestrator inline, or by `reviewer` subagents in parallel. A
78+
review dispatch **must** name the diff scope, the governing `contracts/*.md`,
79+
and — for anything touching CABI/async semantics —
80+
[docs/architecture.md](docs/architecture.md) §5–§7 plus the spec sources
81+
(`definitions.py` as tie-breaker): the reviewer judges only against named
82+
authorities and flags unnamed ones rather than filling gaps from memory.
83+
Revision rounds go back to the *same* coder session via `task_id` (context
84+
intact), not a fresh agent.
85+
86+
Failure recovery (content-filter false positives, driver interrupts): an
87+
aborted `task` call kills neither the child session (context persists in the
88+
opencode db) nor its effects (files/commands persist on disk). Ladder:
89+
90+
1. Locate the orphan (`opencode-agent-sessions <parent-session-id>`, on
91+
PATH); resume via `task_id` — "summarize status, then continue".
92+
2. Two failed resumes → assume poisoned context: fresh agent, handoff prompt
93+
= original track + "partial work exists, audit state first" + artifact
94+
pointers. Gates arbitrate what's already done.
95+
3. Repeated failures across fresh contexts → escalate to the human; the
96+
trigger may live in the artifacts themselves.
97+
98+
Standing rules:
99+
100+
- After any fan-out, reconcile launched-vs-completed before proceeding — a
101+
missing result is not missing work.
102+
- Consumer checkouts (the polymorph family, under `~/p/polymorph/`) are
103+
**strictly read-only**: verify `git status` in any consumer tree you ran
104+
commands near, before and after. Build artifacts go to `/tmp` or a
105+
redirected `CARGO_TARGET_DIR`, never into consumer trees.
106+
- Findings against foreign repos go in the tracker files
107+
(`upstream-component-model-repo-findings.md`,
108+
`upstream-consumer-findings.md`), not inline notes; filing them is the
109+
operator's call.

0 commit comments

Comments
 (0)