> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitasker.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Rebuild Project Dependencies

> Re-wire depends_on UUIDs for an existing bundle-sourced project.

This is needed when a project was created before the uuid pre-assignment
fix (where depends_on was stored as [None] for all tasks). Matches existing
tasks by position/title against the bundle template, then writes the correct
UUID references without deleting or resetting any task state.



## OpenAPI

````yaml /openapi.json post /api/v1/projects/{project_id}/rebuild-deps
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/projects/{project_id}/rebuild-deps:
    post:
      tags:
        - Projects
      summary: Rebuild Project Dependencies
      description: >-
        Re-wire depends_on UUIDs for an existing bundle-sourced project.


        This is needed when a project was created before the uuid pre-assignment

        fix (where depends_on was stored as [None] for all tasks). Matches
        existing

        tasks by position/title against the bundle template, then writes the
        correct

        UUID references without deleting or resetting any task state.
      operationId: >-
        rebuild_project_dependencies_api_v1_projects__project_id__rebuild_deps_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ProjectOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          type: string
          format: uuid
          title: User Id
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        composer_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Composer Prompt
        bundle_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Bundle Template
        status:
          type: string
          title: Status
        mode:
          type: string
          title: Mode
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        project_tasks:
          items:
            $ref: '#/components/schemas/ProjectTaskOut'
          type: array
          title: Project Tasks
          default: []
        task_count:
          type: integer
          title: Task Count
          default: 0
        completed_count:
          type: integer
          title: Completed Count
          default: 0
        total_budget_usd:
          type: number
          title: Total Budget Usd
          default: 0
      type: object
      required:
        - id
        - user_id
        - title
        - status
        - mode
        - created_at
        - updated_at
      title: ProjectOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProjectTaskOut:
      properties:
        title:
          type: string
          title: Title
        task_type_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Type Slug
        category_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Category Slug
        suggested_budget_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Suggested Budget Usd
        is_supported:
          type: boolean
          title: Is Supported
          default: true
        is_completed:
          type: boolean
          title: Is Completed
          default: false
        position:
          type: integer
          title: Position
        depends_on:
          items:
            type: string
            format: uuid
          type: array
          title: Depends On
        parallel_group:
          anyOf:
            - type: string
            - type: 'null'
          title: Parallel Group
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Task Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - title
        - position
        - id
        - project_id
        - created_at
      title: ProjectTaskOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````