Package org.machanism.machai.gw.maven


package org.machanism.machai.gw.maven
Provides Maven plugin mojos that run Machai Ghostwriter guidance and act workflows against Maven project files.

The package contains aggregator goals, such as gw:gw and gw:act, and per-module goals, such as gw:gw-per-module and gw:act-per-module. Aggregator goals can discover and process project modules through Ghostwriter, while per-module goals execute within Maven's standard reactor lifecycle for each module.

Shared behavior is implemented by AbstractGWMojo, including Maven session and project access, scan path selection, excludes, additional instructions, model selection, Maven settings credential resolution, usage logging, and registration of class-introspection tools for Java projects. Concrete mojos create the appropriate processor type and delegate scanning or action execution to the Ghostwriter processing layer.

Typical usage

 mvn gw:gw
 mvn gw:gw -Dgw.path=src/main/java -Dgw.instructions=docs/gw-instructions.md
 mvn gw:act -Dgw.act="Add missing public API Javadocs"
 mvn -T 4 gw:act -Dgw.act=review
 

GenAI provider credentials may be supplied through Maven settings.xml by passing a configured server id, for example -Dgenai.serverId=my-ai-provider. Goals also support common Ghostwriter properties such as model, path, instructions, excludes, and act-specific parameters where applicable.

  • Classes
    Class
    Description
    Base class for Maven goals that scan project files for guidance comments and delegate processing to a GuidanceProcessor.
    Maven goal that executes a Ghostwriter act against project files.
    Maven goal gw:act-per-module that runs an action against the execution-root project using Maven's standard reactor build context.
    Maven goal that scans project files for Ghostwriter guidance comments and executes the configured AI-assisted processing workflow.
    Maven goal that processes documents for the current Maven module.