rngo effect infer

Runs a prompt with the configured coding agent CLI that instructs it to infer effects from the application's source code and systems, and to write each to a file in the .rngo/effects directory.

You can configure systems to provide inference context — see Systems below. If no context is configured, it will output a static prompt based upon https://rngo.dev/docs/llm/skills/infer-effects.md

See the Effect reference to learn how to adjust the inferred effects - or add new ones that could not be inferred.

Usage

rngo effect infer

This uses the coding agent configured in the project configuration, and will complain if one is not set.

To simply write the prompt out to stdout, run:

rngo effect infer --prompt

Systems

The prompt will include any inference context provided by systems in the .rngo/systems directory. So, for example, if you had the following at.rngo/systems/db.yml:

format:
  type: sql
import:
  command: sqlite3 db.sqlite
infer:
  context:
    description: sqlite schema migrations
    command: cat db/migrations/*.sql

The prompt will include a sub-heading for the db system with, in this case, the description and the contents of the migrations directory along with system-specific instructions and metadata.

The prompt will instruct the LLM to associate any effects inferred from a system's context with that system. So if the above system had a table called USER, the LLM should write something like the following to .rngo/effects/user.create.yml:

system: db
format:
  table: USER
schema:
  type: object
  properties:
    id:
      type: id.integer
    name:
      type: person.name