Sweep: assessed all 7 active openspec changes against the codebase. Five had landed implementations (bounded-text, org-label, org-management, code-review-skill, list-milestones-labels) — archived under openspec/changes/archive/2026-05-12-* and their deltas folded into openspec/specs/. Two remain unimplemented: add-releases-support (operation/release/ missing despite proposal PR #129) and forgejo-action-code-review (.forgejo/workflows/claude-code-review.yml missing despite spec deltas). Beads: reopened forgejo-mcp-0ep (releases impl) with notes on actual status; created forgejo-mcp-673 for the action workflow impl.
5.1 KiB
org-crud Specification
Purpose
TBD - created by archiving change add-org-management. Update Purpose after archive.
Requirements
Requirement: Create organization
The system SHALL provide a create_org MCP tool that creates a new organization on the Forgejo instance. The tool SHALL accept:
name(required): organization usernamefull_name(optional): display namedescription(optional): organization descriptionwebsite(optional): organization website URLlocation(optional): organization locationvisibility(optional): one ofpublic,limited,private(default:public)
The tool SHALL return the created organization object.
Scenario: Successful organization creation
- WHEN user calls
create_orgwithnameset to"my-org" - THEN the system creates the organization and returns the organization object with matching
username
Scenario: Create organization with all fields
- WHEN user calls
create_orgwithname,full_name,description,website,location, andvisibilityset to"private" - THEN the system creates the organization with all provided fields and returns the organization object
Scenario: Create organization with duplicate name
- WHEN user calls
create_orgwith anamethat already exists - THEN the system returns an error indicating the organization name is taken
Requirement: Get organization details
The system SHALL provide a get_org MCP tool that retrieves organization details by name. The tool SHALL accept:
org(required): organization name
The tool SHALL return the organization object including id, username, full_name, description, website, location, visibility, and avatar_url.
Scenario: Get existing organization
- WHEN user calls
get_orgwithorgset to an existing organization name - THEN the system returns the organization object with all fields populated
Scenario: Get non-existent organization
- WHEN user calls
get_orgwithorgset to a name that does not exist - THEN the system returns an error indicating the organization was not found
Requirement: List authenticated user's organizations
The system SHALL provide a list_my_orgs MCP tool that lists organizations the authenticated user belongs to. The tool SHALL accept:
page(required, default 1): page numberlimit(required, default 100): page size
The tool SHALL return a list of organization objects.
Scenario: List organizations for authenticated user
- WHEN user calls
list_my_orgswith default pagination - THEN the system returns a list of organizations the authenticated user is a member of
Scenario: List organizations with pagination
- WHEN user calls
list_my_orgswithpageset to 2 andlimitset to 10 - THEN the system returns the second page of results with at most 10 organizations
Requirement: List user's organizations
The system SHALL provide a list_user_orgs MCP tool that lists organizations for a given user. The tool SHALL accept:
user(required): usernamepage(required, default 1): page numberlimit(required, default 100): page size
The tool SHALL return a list of organization objects visible to the authenticated user.
Scenario: List organizations for a specific user
- WHEN user calls
list_user_orgswithuserset to an existing username - THEN the system returns a list of organizations that user belongs to (filtered by visibility)
Requirement: Edit organization
The system SHALL provide an edit_org MCP tool that updates organization settings. The tool SHALL accept:
org(required): organization namefull_name(optional): new display namedescription(optional): new descriptionwebsite(optional): new website URLlocation(optional): new locationvisibility(optional): new visibility (public,limited,private)
Only provided fields SHALL be updated; omitted fields SHALL remain unchanged.
Scenario: Update organization description
- WHEN user calls
edit_orgwithorganddescriptionset to a new value - THEN the system updates only the description and returns the updated organization object
Scenario: Edit non-existent organization
- WHEN user calls
edit_orgwithorgset to a name that does not exist - THEN the system returns an error indicating the organization was not found
Requirement: Delete organization
The system SHALL provide a delete_org MCP tool that deletes an organization. The tool description SHALL include a warning that this action is destructive and irreversible. The tool SHALL accept:
org(required): organization name
The tool SHALL return a success confirmation upon deletion.
Scenario: Delete existing organization
- WHEN user calls
delete_orgwithorgset to an existing organization the user owns - THEN the system deletes the organization and returns a success message
Scenario: Delete organization without permission
- WHEN user calls
delete_orgwithorgset to an organization the user does not own - THEN the system returns an error indicating insufficient permissions