Skip to main content

Project Structure Update Request

Tools for managing project structure update requests for multi-agent coordination. These tools enable agents to propose, review, dispute, and merge changes to project structure in a collaborative workflow.

Overview

Update requests provide a structured workflow for coordinating changes across multiple agents. Each request goes through a lifecycle from draft to merged status, with support for disputes, comments, and watchers.

Workflow

draft → waiting_for_dispute → actively_being_worked → waiting_to_merge → merged

disputed

Available Tools

Update Request Management

update_request_create

Create a new project structure update request.

ParameterTypeRequiredDescription
titlestringYesShort title describing the change
descriptionstringNoDetailed description of what and why
authorstringYesWho created the request
authorTypestringYesType of author. One of: user, agent
changesarrayYesAll changes to be applied (see Change Structure)
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_create",
{
title: "Add user authentication API",
description: "Add login and registration endpoints to the API",
author: "agent-001",
authorType: "agent",
changes: [
{
packageId: "api-service",
packageAction: "update",
apiRoutes: [
{
id: "route-001",
action: "create",
item: {
path: "/api/auth/login",
method: "POST",
description: "User login endpoint"
}
}
]
}
]
}
);

update_request_get

Get an update request by ID.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_get",
{
id: "ur-123"
}
);

update_request_list

List update requests with optional filters.

ParameterTypeRequiredDescription
filtersobjectNoOptional filters
filters.statusstring[]NoFilter by status
filters.authorstringNoFilter by author
filters.searchstringNoSearch text
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_list",
{
filters: {
status: ["waiting_for_dispute", "actively_being_worked"],
author: "agent-001"
}
}
);

update_request_update

Update an existing update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
titlestringNoNew title
descriptionstringNoNew description
changesarrayNoUpdated changes
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_update",
{
id: "ur-123",
title: "Add user authentication and authorization API",
description: "Updated description with more details"
}
);

update_request_delete

Delete an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_delete",
{
id: "ur-123"
}
);

Workflow Management

update_request_submit

Submit an update request for review.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_submit",
{
id: "ur-123"
}
);

update_request_start_work

Start working on an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_start_work",
{
id: "ur-123"
}
);

update_request_complete

Complete work on an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_complete",
{
id: "ur-123"
}
);

Dispute Management

update_request_add_dispute

Add a dispute to an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
raisedBystringYesWho raised the dispute
raisedByTypestringYesType of actor. One of: user, agent
reasonstringYesReason for the dispute
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_add_dispute",
{
id: "ur-123",
raisedBy: "agent-002",
raisedByType: "agent",
reason: "This change conflicts with existing API routes"
}
);

update_request_resolve_dispute

Resolve a dispute on an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
disputeIdstringYesDispute ID
resolutionSummarystringNoOptional resolution summary
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_resolve_dispute",
{
id: "ur-123",
disputeId: "dispute-001",
resolutionSummary: "Routes updated to avoid conflict"
}
);

Watch & Comments

update_request_watch

Watch an update request for updates.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
watcherIdstringYesWatcher ID (agent or user)
watcherTypestringYesType of watcher. One of: user, agent
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_watch",
{
id: "ur-123",
watcherId: "agent-002",
watcherType: "agent"
}
);

update_request_unwatch

Stop watching an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
watcherIdstringYesWatcher ID to remove
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_unwatch",
{
id: "ur-123",
watcherId: "agent-002"
}
);

update_request_add_comment

Add a comment to a dispute on an update request.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
disputeIdstringYesDispute ID
authorstringYesComment author
authorTypestringYesType of author. One of: user, agent
contentstringYesComment content
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_add_comment",
{
id: "ur-123",
disputeId: "dispute-001",
author: "agent-001",
authorType: "agent",
content: "I can update the routes to use a different prefix"
}
);

update_request_merge

Merge an update request into the project structure.

ParameterTypeRequiredDescription
idstringYesUpdate request ID
workspacePathstringNoOptional workspace path

Example:

const result = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_merge",
{
id: "ur-123"
}
);

Change Structure

The changes parameter accepts an array of change objects with the following structure:

PropertyTypeRequiredDescription
packageIdstringYesTarget package ID
packageActionstringYesAction for the package. One of: create, update, delete, none
packageNamestringNoPackage name (for display and create)
packagePathstringNoPackage path (for create)
packageInfoobjectNoPackage-level info changes
apiRoutesarrayNoAPI routes changes
uiRoutesarrayNoUI routes changes
databaseobjectNoDatabase changes
dependenciesarrayNoDependency changes
runCommandsarrayNoRun command changes
deploymentConfigsarrayNoDeployment config changes
frontendFrameworkobjectNoFrontend framework change
designGuidelinesobjectNoDesign guidelines change

Each array item (e.g., apiRoutes, dependencies) is a ChangeWrapper object:

PropertyTypeRequiredDescription
idstringYesUnique identifier for this change
actionstringYesAction to perform. One of: create, update, delete, none
itemobjectYesThe item data (new state for create/update)
originalItemobjectNoOriginal item before change (for update/delete)

Complete Workflow Example

// 1. Create a new update request
const createResult = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_create",
{
title: "Add user management module",
description: "Add CRUD operations for user management",
author: "agent-001",
authorType: "agent",
changes: [
{
packageId: "api-service",
packageAction: "update",
apiRoutes: [
{
id: "route-users-create",
action: "create",
item: {
path: "/api/users",
method: "POST",
description: "Create a new user",
handler: "createUser",
file: "src/controllers/users.ts"
}
}
],
database: {
tables: [
{
id: "table-users",
action: "create",
item: {
name: "users",
description: "Users table",
columns: [
{ name: "id", type: "uuid", primaryKey: true },
{ name: "email", type: "varchar(255)", nullable: false },
{ name: "name", type: "varchar(100)" }
]
}
}
]
}
}
]
}
);

// 2. Submit the request for review
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_submit",
{
id: createResult.data.id
}
);

// 3. Another agent watches the request
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_watch",
{
id: createResult.data.id,
watcherId: "agent-002",
watcherType: "agent"
}
);

// 4. Another agent raises a dispute
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_add_dispute",
{
id: createResult.data.id,
raisedBy: "agent-002",
raisedByType: "agent",
reason: "Missing password field in users table"
}
);

// 5. Add a comment to the dispute
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_add_comment",
{
id: createResult.data.id,
disputeId: "dispute-001",
author: "agent-001",
authorType: "agent",
content: "Will add password_hash field for security"
}
);

// 6. Resolve the dispute
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_resolve_dispute",
{
id: createResult.data.id,
disputeId: "dispute-001",
resolutionSummary: "Password hash field will be added"
}
);

// 7. Start work on the request
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_start_work",
{
id: createResult.data.id
}
);

// 8. Complete work
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_complete",
{
id: createResult.data.id
}
);

// 9. Merge the changes
await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_merge",
{
id: createResult.data.id
}
);

Filtering Example

// List all requests waiting for review
const pendingReview = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_list",
{
filters: {
status: ["waiting_for_dispute", "actively_being_worked"]
}
}
);

// Search requests by text
const searchResults = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_list",
{
filters: {
search: "authentication"
}
}
);

// Get requests by author
const myRequests = await codebolt.tools.executeTool(
"codebolt.projectStructureUpdateRequest",
"update_request_list",
{
filters: {
author: "agent-001"
}
}
);
info

Status Values:

  • draft - Just created, not submitted
  • waiting_for_dispute - Submitted, waiting for others to review
  • disputed - Someone raised a dispute
  • actively_being_worked - Work in progress, no disputes
  • waiting_to_merge - Work complete, ready to merge
  • merged - Successfully merged into project structure

Dispute Workflow:

  1. Agent raises a dispute → request status becomes disputed
  2. Other agents add comments to discuss the dispute
  3. Dispute is resolved with a summary
  4. Request can proceed to actively_being_worked status