Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/agents/polygraph-init-subagent/AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ These tools are available via MCP and CLI. Use whichever is available in your en

| MCP Tool | CLI Equivalent | Description |
| --- | --- | --- |
| `polygraph_candidates` | `polygraph-cli repo list` | Discover candidate workspaces with descriptions and graph relationships |
| `polygraph_init` | `polygraph-cli session start --repo <ids>` | Initialize a session with selected workspaces |
| `polygraph_get_session` | `polygraph-cli session status <id>` | Get full session details including URL |
| `polygraph_candidates` | `polygraph repo list` | Discover candidate workspaces with descriptions and graph relationships |
| `polygraph_init` | `polygraph session start --repo <ids>` | Initialize a session with selected workspaces |
| `polygraph_get_session` | `polygraph session status <id>` | Get full session details including URL |

## Input Parameters (from Main Agent)

Expand Down
25 changes: 13 additions & 12 deletions source/skills/polygraph/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,25 @@ This skill provides guidance for working on features that span multiple reposito

Polygraph functionality is available via both MCP tools and CLI commands. Use whichever is available in your current environment.


| MCP Tool | CLI Equivalent | Description |
| --- | --- | --- |
| `polygraph_candidates` | `polygraph-cli repo list` | Discover candidate workspaces with descriptions and graph relationships |
| `polygraph_init` | `polygraph-cli session start --repo <ids>` | Initialize a Polygraph session with selected workspaces |
| `polygraph_candidates` | `polygraph repo list` | Discover candidate workspaces with descriptions and graph relationships |
| `polygraph_init` | `polygraph session start --repo <ids>` | Initialize a Polygraph session with selected workspaces |
| `polygraph_delegate` | — | Start a task in a child agent in another repository (non-blocking) |
| `polygraph_child_status` | — | Get the status and recent output of child agents |
| `polygraph_stop_child` | — | Stop an in-progress child agent |
| `polygraph_push_branch` | — | Push a local git branch to the remote repository |
| `polygraph_create_prs` | — | Create draft PRs with session metadata linking related PRs |
| `polygraph_get_session` | `polygraph-cli session status <id>` | Query status of the current session |
| `polygraph_get_session` | `polygraph session status <id>` | Query status of the current session |
| `polygraph_mark_ready` | — | Mark draft PRs as ready for review |
| `polygraph_associate_pr` | — | Associate an existing PR with a session |
| `polygraph_modify_session` | `polygraph-cli session complete <id>` | Modify or complete a session (complete closes all PRs and seals it) |
| `polygraph_modify_session` | `polygraph session complete <id>` | Modify or complete a session (complete closes all PRs and seals it) |
| `ci_get_logs` | — | Retrieve full plain-text log for a specific CI job |
| — | `polygraph-cli login [--token]` | Authenticate with Nx Cloud (use `--token` for headless/CI) |
| — | `polygraph-cli session list` | List all sessions |
| — | `polygraph-cli org list` / `org select` | Organization management |
| — | `polygraph-cli whoami` | Show current auth status and org |
| — | `polygraph login [--token]` | Authenticate with Nx Cloud (use `--token` for headless/CI) |
| — | `polygraph session list` | List all sessions |
| — | `polygraph org list` / `org select` | Organization management |
| — | `polygraph whoami` | Show current auth status and org |

{% if has_subagents %}

Expand All @@ -48,22 +49,22 @@ Polygraph functionality is available via both MCP tools and CLI commands. Use wh

## CLI Statefulness

The Polygraph CLI (`polygraph-cli`) is **stateful**. When you select an organization — via `polygraph-cli org select` or the equivalent MCP tool — that selection is saved globally and all subsequent CLI commands and MCP tool calls operate against it. You do not need to pass the org on every command.
The Polygraph CLI (`polygraph`) is **stateful**. When you select an organization — via `polygraph org select` or the equivalent MCP tool — that selection is saved globally and all subsequent CLI commands and MCP tool calls operate against it. You do not need to pass the org on every command.

## Setup

Before using Polygraph tools, ensure the CLI is authenticated and an organization is selected.

### Check Authentication

Use `polygraph-cli whoami` (or the `whoami` MCP tool) to check if the user is currently logged in and which organization is active.
Use `polygraph whoami` (or the `whoami` MCP tool) to check if the user is currently logged in and which organization is active.

- If the user **is logged in** and an org is selected → proceed to the workflow.
- If the user **is not logged in** → use `polygraph-cli login` (or the `login` MCP tool) to authenticate. After login, an organization must be selected.
- If the user **is not logged in** → use `polygraph login` (or the `login` MCP tool) to authenticate. After login, an organization must be selected.

### Select Organization

After logging in (or if logged in but no org is selected), use `polygraph-cli org select` (or the equivalent MCP tool) to choose the organization that future commands will run against.
After logging in (or if logged in but no org is selected), use `polygraph org select` (or the equivalent MCP tool) to choose the organization that future commands will run against.

## Workflow Overview

Expand Down