Origin: 8-dimension honest review of Mapal (syntax, spec, methodology, frontend, core, backend, process, competition). Owner confirmed the action items match their own thinking and authorized execution. This plan is the audit trail.
| # | Worker | Scope (exclusive) | Deliverable |
|---|---|---|---|
| 1 | docs-hygiene | docs/spec/getting-started.md, docs/architecture/INDEX.md |
Fix the taught-but-rejected seq example (ADR-0019/LC-5 form); sweep the file for other taught-but-rejected syntax; repair stale INDEX metadata (S10 line, planned-row count) |
| 2 | user-guide-badging | docs/spec/user-guide.md, examples/vector.mapal |
Badge every section/example as Core-compilable vs Core+1 (parses, named P-code rejection) vs aspirational; mark vector.mapal with an explicit aspirational-dialect header |
| 3 | related-work | VISION.md, docs/notes/related-work.md (new) |
Add citations (Compiling to Categories, DaCe, Vericert, Halide formal semantics, Futhark, SCADE/CompCert); correct the O4 "no incumbent makes this claim" cell; keep VISION's non-binding voice |
| 4 | as-implemented-doc | docs/spec/mapal-as-implemented.md (new) |
One authoritative description of the language as implemented: authority order (spec v0.2 + E1–E5 + LC-1–5 + ADR-0001…0021), guard-first loops, IO token, arrays incl. Update, rejected constructs summary |
| 5 | governance-adr | docs/decisions/ADR-0022-*.md (new), HANDOFF.md |
Record: as-implemented doc = operative language index; "frozen" retired in favor of explicit authority order; Level-B (FRAMEWORK) maintenance frozen until it finds its first bug; related-work correction. Patch HANDOFF's "frozen" phrasing minimally |
| 6 | o2-differential | crates/mapal-backend-llvm/tests/**, docs/components/backend-llvm/STATUS.md |
Add the acknowledged-open -O2 differential row to the harness; run it; fix small emission bugs with regression tests, or pin + document precisely if larger |
| 7 | scale-plan | docs/notes/array-scale-plan.md (new) |
Convert the three recorded scale walls (alloca-resident arrays → 8 MB stack; literal-store explosion → clang compile time; naive-copy Update O(k·n)) into a designed plan with options, recommendation, milestone placement |
Verify each artifact exists, spot-check against the actual code/spec, summarize.
- Implementing heap lowering / last-use in-place
Update(milestone-scale; item 7 produces the plan). - External-user feedback loop and governance — needs humans, not agents.
emit.rsrefactor and lower-proptest strengthening (recorded as known risk; not blocking).
- No
gitcommands; leave the working tree for the session process to commit. - Do not edit
docs/STATUS.mdordocs/sessions/(session-log domain) — except during an explicit session-endreconcile. - The compiler is ground truth; where docs and code disagree, the code wins and the doc gets corrected.
STATUS: COMPLETE — M3 reached (Session 15, 2026-07-21). Stage 1 landed (ADR-0023/24/25
candidates + backend-cuda DESIGN); Stage 2 landed (4-lens design review, 22/22 findings
fixed); Stage 3 reconcile done (S14). Sapir's implementation gate opened 2026-07-20/21
("go for the cuda backend"); the S15 implementation workflow ran to green: crate built
(115 tests), a second 4-lens review found 2 blockers + 4 majors (all fixed pre-GPU), the
M3 sweep ran oracle-equal on a fresh vast.ai RTX 4090 (640 nvcc compile-and-runs, zero
divergences; box destroyed after, ≈$0.25). Full record: docs/sessions/2026-07-21-s15-p6-cuda-m3.md.
Owner directives: "record all ADR candidates" (TT, dynamic sizing, templates —
from the roadmap discussion) and "Start P6" (CUDA backend, M3). Per HANDOFF §7.1.5 and
the category-architect build flow, P6 starts model-first: DESIGN → adversarial design
review → implementation gate (Sapir). The plan artifact for P6 is
docs/components/backend-cuda/DESIGN.md (their DESIGN convention), not a forked plan doc.
| # | Worker | File | Deliverable |
|---|---|---|---|
| 1 | ADRCandidate_DynamicSizing | docs/decisions/ADR-0023-dynamic-sized-arrays-candidate.md (new) |
Candidate ADR: unknown-size arrays, heap in mapal-rt, E3 reopen, zip/enumerate length semantics |
| 2 | ADRCandidate_Templates | docs/decisions/ADR-0024-templates-candidate.md (new) |
Candidate ADR: T1 monomorphic type templates at lower (no IR change), T2 size-parametric [A; N] joined to ADR-0023 design |
| 3 | ADRCandidate_TT | docs/decisions/ADR-0025-TT-backend-candidate.md (new) |
Candidate ADR: post-M5 third backend, TT-Metalium emission, O5 proof-case, ttsim CI |
| 4 | CudaDESIGN_Author | docs/components/backend-cuda/DESIGN.md (overwrite stub) |
Model-first P6 DESIGN: lead ## Categorical model (Dat + Trn) — the ADR-0022 D2 sanctioned exception, first real Loc/Trm pair; host/device execution mapping; traps; harness recipe on vast.ai |
4 lenses (plan-type, read-only): oracle fidelity · CUDA/hardware realizm · contract
coherence (ADR-0020 duties + Level-B section quality) · harness practicality.
Then: fixer applies confirmed findings; review record → docs/components/backend-cuda/reviews/.
gate) → session end reconcile (S14 log, STATUS ledger + backend-cuda row, next-session).
P6 implementation proper (awaits gate); STATUS capability-matrix CUDA cells flip at implementation; ADR-0023/24/25 remain candidates until Sapir decides.