| name | bharat-os-syscall-abi |
| description | Apply when adding or changing syscalls, syscall metadata, UAPI arguments, capability requirements, usercopy phases, ABI lock, or generated dispatch artifacts. |
Bharat-OS Syscall ABI Skill
Authority and rules
- Authority:
interface/contracts/abi/native_syscalls.json.
- Compatibility lock:
interface/contracts/abi/native_syscalls.lock.json.
- Generator/checker:
tools/abi/syscall_abi.py.
- Generated files are outputs, not editing surfaces.
Procedure
- Define the ABI change in the manifest with fixed-width, stable argument semantics.
- Specify capability source, object type, rights, scope, and validation phase.
- For pointers, define direction and bounded size source.
- Ensure fault-safe usercopy occurs before reading embedded capability fields.
- Preserve number/symbol/argument compatibility unless the task explicitly authorizes a migration.
- Generate only into the build directory.
- Run:
python3 tools/abi/syscall_abi.py --check
- Run generation through the normal build or explicitly with
--generate only when validating the generator.
- Add positive and negative tests: valid, wrong type, insufficient rights, wrong scope, stale/revoked, malformed pointer/size, usercopy fault.
- Update
docs/architecture/CONTRACTS.md and an ADR for externally observable changes.
Do not use raw numeric syscall invocations or hand-written duplicate tables.