Contributing (AI Agents)
This guide is for AI contributors operating as implementation agents, reviewers, or research assistants.
Contributing (AI Agents)
This guide is for AI contributors operating as implementation agents, reviewers, or research assistants.
Contribution Goals
- Improve AINL correctness, reliability, and contributor velocity.
- Improve model generation quality on strict canonical AINL.
- Preserve reproducibility, observability, and compatibility.
Required Reading Before Changes
docs/BOT_ONBOARDING.md— bot entrypoint;docs/OPENCLAW_IMPLEMENTATION_PREFLIGHT.mdis required before implementation work (inspect files, confirm not duplicate, verify semantics, emit preflight output).docs/DOCS_INDEX.mddocs/AINL_SPEC.mdSEMANTICS.mddocs/RUNTIME_COMPILER_CONTRACT.mddocs/TRAINING_ALIGNMENT_RUNBOOK.mddocs/AI_AGENT_CONTINUITY.mddocs/DOCS_MAINTENANCE.md
Machine-readable bootstrap (pointers to onboarding, preflight, safe vs advanced docs): tooling/bot_bootstrap.json.
Working Protocol
- Understand current state
- Inspect latest artifacts in
corpus/curated/:alignment_run_health.jsonmodel_eval_trends.json- latest
model_eval_report*.json
- Inspect latest artifacts in
- Make minimal, scoped changes
- Prefer adding flags/config over hard behavior changes.
- Verify
- run syntax/lint/tests relevant to changed files
- run docs contract check when docs or semantics-critical code changes (
ainl-check-docs) - verify pipeline scripts still expose intended CLI flags
- Document
- update docs + changelog whenever behavior or knobs change
Preferred Change Pattern
- Add
- Extend
- Refactor
- Replace (last resort)
Quality Bar for Training/Eval Changes
Any training/eval change should preserve or improve:
strict_ainl_rateruntime_compile_ratenonempty_rate
and maintain usable diagnostics for triage.
Do Not Do
- Do not silently relax strict validation just to raise pass rate.
- Do not move compiler contract issues into runtime workarounds.
- Do not remove machine-readable diagnostics/artifacts without replacement.
- Do not introduce hidden defaults that break reproducibility.
Runtime/Compiler Ownership Rules
- Canonical executable semantics live in
runtime/engine.py(RuntimeEngine). ExecutionEngineinruntime/compat.pyis compatibility-only.- If strict-mode dataflow fails, fix compiler-owned RW/dataflow modeling in
compiler_v2.py(and linked tooling), not runtime behavior. - In strict mode, treat bare identifier-like tokens in read positions as variable references; quote string literals explicitly.
Recommended Outputs from an AI Contributor
When finishing a session, provide:
- files changed
- behavior change summary
- verification commands run and result
- known risks / follow-ups
- next recommended command
This ensures another agent (or human) can continue work immediately.
