Skip to content

added adversarial agents documentation - #55

Open
yray-pixel wants to merge 2 commits into
x2ansible:mainfrom
yray-pixel:adversarialAgentsDocs
Open

added adversarial agents documentation#55
yray-pixel wants to merge 2 commits into
x2ansible:mainfrom
yray-pixel:adversarialAgentsDocs

Conversation

@yray-pixel

Copy link
Copy Markdown
Contributor

No description provided.

@yray-pixel
yray-pixel marked this pull request as draft August 9, 2026 08:48
@yray-pixel
yray-pixel marked this pull request as ready for review August 26, 2026 07:58

@eloycoto eloycoto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the feeling that the doc cover under the hood, and not what it's going to be useful for someone looking at Adversarial agetnt.

The initial part is good, but at the same time, I might add an example adversarial agent, and the output, as a reference on how to use it instead of see what it's under need.

YES, rules is in similar shape as this, I need to add some examples too.

TBH: I would wear the Ansible administrator member here, and trying to understand what a adversarial agent is, and what is the good practice here.


# Adversarial Agents

Adversarial agents are read-only AI reviewers that inspect x2a migration artifacts - analysis plans and generated Ansible - before the output reaches production. They act as an automated peer review layer, catching security gaps, functional mistakes, and correctness problems that the primary migration agents may have missed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add read-only as bold.


Adversarial agents are read-only AI reviewers that inspect x2a migration artifacts - analysis plans and generated Ansible - before the output reaches production. They act as an automated peer review layer, catching security gaps, functional mistakes, and correctness problems that the primary migration agents may have missed.

Agents are defined in the web platform. Each agent has a name, a prompt describing what to look for, the phases it applies to, and the severity of its findings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adversarial Agents can be defined by system administrator in the web platform.


## How adversarial agents work

When you trigger an adversarial review from the module page, x2a:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would delete x2a


When you trigger an adversarial review from the module page, x2a:

1. Passes the relevant artifacts from the completed phase to the x2a-convertor `adversarial-run` command.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a system administrator, this first step do not add too much value IMHO


1. Passes the relevant artifacts from the completed phase to the x2a-convertor `adversarial-run` command.
2. Runs each selected agent sequentially using read-only tools - agents cannot modify any files.
3. Produces a markdown report and a structured JSON summary committed back to the target repository.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe adding a simple path here?


Agents can also be managed directly through the REST API:

### REST API

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not documment the API here, I would link that adversarial agents can be created using the API, and link to the https://x2ansible.github.io/platform/api-reference.html


**Conflict behavior:** if an adversarial job is already running for the same module and phase, the request returns a `409 Conflict` and the existing job continues uninterrupted.

### Adversarial run endpoint

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not real value for a system-administrator, that it's the guy reading this.


---

## x2a-convertor CLI

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete this, this is part, it's already covered in the x2a-convertor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants