Overview

Date: 2026-05-11

Time: 15:41

Overview

This is an FTL2 AI-loop rule that ensures four Python packages (uv, ftl2-stargate, ftl2-htop, textual-serve) are installed on a host called stargate. It follows the observe-condition-action pattern used by FTL2's reconciliation loop: observe current package state, check if any are missing, and install them if needed. The rule uses --break-system-packages because the target runs Fedora 43, which enforces PEP 668 restrictions on system-wide pip installs.

Usage Patterns

This rule is not called directly — it is loaded and executed by the FTL2 AI reconciliation loop. The loop evaluates it periodically or on trigger:

1. Observe: Runs pip3 list and which commands on stargate to check installed packages.

2. Condition: Returns True (meaning "action needed") if any of the four required packages are missing from the observe output.

3. Action: Installs each package sequentially via sudo pip3 install.


# The three-part rule contract:
observe = [...]              # what to check
async def condition(state)   # should we act? (True = yes)
async def action(ftl)        # what to do

API and Configuration

Key Behaviors

Relationships