AIKP Development Environments

This document explains the different development environments available for AIKP development and the key differences between them.

Development Environment Types

Local Dev Container

Local Dev Container refers to the local development environment of OCLI, where you run OCLI directly on your local machine.

Key characteristics:

  • Direct installation of OCLI on your local system (in isolated docker environment)

  • Full access to source code and development tools

  • Ideal for AIKP development and testing

  • Cannot run PRO AIKPs since task creation requires AIKP instantiation

Setup: See Local Dev Container Setup Guide for detailed instructions.

DOCLI (Docker OCLI)

DOCLI refers to the containerized development environment where OCLI runs inside a Docker container with SSH access and enhanced AIKP development capabilities.

Key characteristics:

  • Runs OCLI in a Docker container with isolated environment

  • Provides SSH access for remote development

  • Includes additional AIKP development tools and options

  • Better for production-like testing and CI/CD integration

  • More consistent environment across different systems

AIKP Development Differences

Task Creation Commands

The primary difference between DOCLI and Local Dev Container lies in how you create tasks:

From DOCLI:

task create -t your_aikp_name -r roi_name -n task_name -a

From Local Dev Container:

task create -t ocli.aikp.your_aikp_name -r roi_name -n task_name -a

Template Configuration

This difference must also be reflected in your AIKP’s template.py file:

For DOCLI:

deep_update(schema, load_recipe_schema_envelope('your_aikp_name'))

For Local Dev Container:

deep_update(schema, load_recipe_schema_envelope('ocli.aikp.your_aikp_name'))

Important Limitations

Local Dev Container Limitation: If you only have access as a developer to the open source OCLI code, you cannot run PRO AIKPs in your Local Dev Container environment. This is because creating a task is essentially an instantiation of an AIKP, and PRO AIKPs require proprietary components not available in the open source version.

DOCLI Advantage: DOCLI environments can be configured to include both open source and PRO AIKPs, making it the preferred choice for comprehensive testing.

Setting up Local Dev Container

This repository contains .devcontainer configuration (tested with VS Code) and VS Code debug configuration. This is the recommended approach for Local Dev Container development.

To start developing, please follow this checklist:

  1. Open OCLI source in VS Code

  2. Ensure Dev Containers extension is installed

  3. Open Command Palette: Mac: Shift + Command + P or PC: Shift + Ctrl + P

  4. Select and run: Dev Containers: Rebuild and Reopen in Container

  5. Start development: Open Run and Debug panel and run the “OCLI REPL” configuration

The Dev Container approach is recommended as it provides a consistent development environment with all necessary dependencies pre-configured.

Development Workflow Recommendations

For AIKP Development

  • Use Local Dev Container for initial AIKP development and debugging

  • Use DOCLI for final testing and production deployment preparation

  • Test both environments to ensure compatibility

For PRO AIKP Development

  • Must use DOCLI or a configured production environment

  • Cannot be fully tested in Local Dev Container due to proprietary component dependencies

Additional Development Notes

  • All Python files should be encoded in UTF-8

  • Use bash scripts for automated testing: ocli-batch <path_to_file>

  • The rest of the OCLI commands work identically in both environments

  • Consider environment-specific configurations in your AIKP templates when necessary