1- # ⚠️ STOP - CRITICAL READING REQUIRED
1+ # STOP - CRITICAL READING REQUIRED
22
33**THIS FILE MUST BE READ FIRST BY ALL AI AGENTS**
44
55## WHAT IS THIS?
66
7- This is the AI manifest for **[YOUR-REPO-NAME] **. It declares:
7+ This is the AI manifest for **atsiser **. It declares:
88- Canonical file locations (where things MUST be, and nowhere else)
99- Critical invariants (rules that must NEVER be violated)
1010- Repository structure and organization
1111
12+ **atsiser** wraps existing C codebases in ATS2 linear types for zero-cost
13+ memory safety. It analyses C source code, identifies memory-critical patterns
14+ (malloc/free pairs, buffer accesses, pointer arithmetic), generates ATS2
15+ wrappers with viewtype/dataviewtype annotations, and compiles them back to C
16+ with all proofs erased — zero runtime overhead.
17+
1218## CANONICAL LOCATIONS (UNIVERSAL RULE)
1319
1420### Machine-Readable Metadata: `.machine_readable/` ONLY
@@ -55,7 +61,7 @@ Policy enforcement contracts (k9, dust, lust, must, trust).
5561### AI Configuration & Guides: `.machine_readable/ai/` ONLY
5662
5763- `AI.a2ml` - Language-specific or LLM-specific patterns
58- - `PLACEHOLDERS.md ` - Bootstrap guide
64+ - `PLACEHOLDERS.adoc ` - Bootstrap guide
5965
6066### Community & Forge Metadata: `.github/` ONLY
6167
@@ -80,41 +86,47 @@ Policy enforcement contracts (k9, dust, lust, must, trust).
80866. **Container images** - MUST use Chainguard base (`cgr.dev/chainguard/wolfi-base:latest` or `cgr.dev/chainguard/static:latest`)
81877. **Container runtime** - Podman, never Docker. Files are `Containerfile`, never `Dockerfile`
82888. **Container orchestration** - `selur-compose`, never `docker-compose`
89+ 9. **ATS2 safety** - Generated ATS2 code must never use `$UNSAFE` casts or bypass linear type discipline
8390
8491## REPOSITORY STRUCTURE
8592
8693This repo follows the **Dual-Track** architecture:
8794
8895```
89- [YOUR-REPO-NAME] /
96+ atsiser /
9097├── 0-AI-MANIFEST.a2ml # THIS FILE (start here)
91- ├── README.adoc # High-level orientation (Rich Human)
92- ├── ROADMAP.adoc # Future direction
98+ ├── README.adoc # What atsiser does, architecture, CLI commands
99+ ├── ROADMAP.adoc # 7-phase roadmap (C analysis → ATS2 generation → proofs)
100+ ├── TOPOLOGY.md # Module map and data flow diagram
93101├── CONTRIBUTING.adoc # Human contribution guide
94102├── GOVERNANCE.adoc # Decision-making model
95103├── Justfile # Task runner
96- ├── Containerfile # OCI build
97- ├── LICENSE # Primary license
104+ ├── Containerfile # OCI build (Chainguard base)
105+ ├── Cargo.toml # Rust CLI dependencies
106+ ├── LICENSE # PMPL-1.0-or-later
98107├── src/ # Source code
108+ │ ├── main.rs # CLI entry point
109+ │ ├── lib.rs # Library API
110+ │ ├── manifest/ # atsiser.toml parser
111+ │ ├── codegen/ # ATS2 wrapper generation
112+ │ ├── core/ # C source analysis engine
99113│ └── interface/ # Verified Interface Seams
100- │ ├── abi/ # Idris2 ABI (The Spec)
101- │ ├── ffi/ # Zig FFI (The Bridge)
102- │ └── generated/ # C Headers (The Result)
114+ │ ├── abi/ # Idris2 ABI (proves memory safety properties)
115+ │ │ ├── Types.idr # LinearPtr, Viewtype, OwnershipState, BufferBounds
116+ │ │ ├── Layout.idr # Struct layout with per-field ownership
117+ │ │ └── Foreign.idr # C analysis + ATS2 compilation FFI
118+ │ ├── ffi/ # Zig FFI (C-ABI bridge)
119+ │ └── generated/ # Auto-generated C headers
103120├── container/ # Stapeln container ecosystem
104- ├── docs/ # Technical depths
105- │ ├── attribution/ # Citations, owners, maintainers (adoc)
106- │ ├── architecture/ # Topology, diagrams
107- │ ├── theory/ # Domain theory
108- │ └── practice/ # Manuals
109- ├── docs/legal/ # Legal exhibits and full texts
121+ ├── docs/ # Technical documentation
110122└── .machine_readable/ # ALL machine-readable metadata
111123```
112124
113125## SESSION STARTUP CHECKLIST
114126
115- ✅ Read THIS file (0-AI-MANIFEST.a2ml) first
116- ✅ Understand canonical location: `.machine_readable/`
117- ✅ State understanding of canonical locations
127+ Read THIS file (0-AI-MANIFEST.a2ml) first
128+ Understand canonical location: `.machine_readable/`
129+ State understanding of canonical locations
118130
119131## ATTESTATION PROOF
120132
0 commit comments