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

# Read canonical feature context

> Return the complete context for one feature in one implementation.

This is the main read endpoint for spec-driven work. It returns the complete list of acceptance criteria, including the requirement definitions, lists of existing references in code, and additional metadata.

Agents should call this before making additional code changes so they work from the same inherited source of truth that reviewers and dashboards use.




## OpenAPI

````yaml /openapi.json get /feature-context
openapi: 3.0.0
info:
  description: >-
    Acai is an API for spec-driven development across git branches and product
    implementations. Specs store canonical requirement definitions, refs store
    where code on a branch appears to implement those requirements, and states
    store implementation-specific progress such as completed, blocked, or
    accepted. Agents typically discover an implementation, read canonical
    feature context, sync branch-derived changes, and then record status updates
    separately.
  title: Acai API
  version: 1.0.0
servers:
  - description: API v1
    url: http://localhost:4000/api/v1
    variables: {}
security:
  - bearerAuth: []
tags:
  - description: >-
      Endpoints for syncing branch-derived truth, resolving canonical feature
      context, discovering implementation work, and recording
      implementation-specific progress. The API keeps specs and refs separate
      from status updates so agents can read shared requirements, push observed
      code changes, and write progress without mixing those concerns.
    name: Actions
paths:
  /feature-context:
    get:
      tags:
        - Actions
      summary: Read canonical feature context
      description: >
        Return the complete context for one feature in one implementation.


        This is the main read endpoint for spec-driven work. It returns the
        complete list of acceptance criteria, including the requirement
        definitions, lists of existing references in code, and additional
        metadata.


        Agents should call this before making additional code changes so they
        work from the same inherited source of truth that reviewers and
        dashboards use.
      operationId: AcaiWeb.Api.FeatureContextController.show
      parameters:
        - description: Product name
          in: query
          name: product_name
          required: true
          schema:
            type: string
        - description: Feature name
          in: query
          name: feature_name
          required: true
          schema:
            type: string
        - description: Implementation name
          in: query
          name: implementation_name
          required: true
          schema:
            type: string
        - description: Include per-ACID ref details
          in: query
          name: include_refs
          required: false
          schema:
            type: boolean
        - description: Include dangling stored states
          in: query
          name: include_dangling_states
          required: false
          schema:
            type: boolean
        - description: Include deprecated ACIDs
          in: query
          name: include_deprecated
          required: false
          schema:
            type: boolean
        - description: >-
            Repeated status filter values; the literal string `null` means a
            null status
          in: query
          name: statuses
          required: false
          schema:
            items:
              type: string
            type: array
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureContextResponse'
          description: Feature context
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Validation error
      callbacks: {}
      security:
        - bearerAuth: []
components:
  schemas:
    FeatureContextResponse:
      properties:
        data:
          allOf:
            - properties:
                acids:
                  items:
                    allOf:
                      - properties:
                          acid:
                            type: string
                          deprecated:
                            type: boolean
                          note:
                            type: string
                          refs:
                            items:
                              allOf:
                                - properties:
                                    branch_name:
                                      type: string
                                    is_test:
                                      type: boolean
                                    path:
                                      type: string
                                    repo_uri:
                                      type: string
                                  required:
                                    - path
                                    - is_test
                                    - repo_uri
                                    - branch_name
                                  title: RefObject
                                  type: object
                            type: array
                          refs_count:
                            type: integer
                          replaced_by:
                            items:
                              type: string
                            type: array
                          requirement:
                            type: string
                          state:
                            allOf:
                              - properties:
                                  comment:
                                    type: string
                                  status:
                                    nullable: true
                                    type: string
                                  updated_at:
                                    type: string
                                title: StateObject
                                type: object
                          test_refs_count:
                            type: integer
                        required:
                          - acid
                          - requirement
                          - state
                          - refs_count
                          - test_refs_count
                        title: AcidEntry
                        type: object
                  type: array
                dangling_states:
                  items:
                    allOf:
                      - properties:
                          acid:
                            type: string
                          state:
                            allOf:
                              - properties:
                                  comment:
                                    type: string
                                  status:
                                    nullable: true
                                    type: string
                                  updated_at:
                                    type: string
                                title: StateObject
                                type: object
                        required:
                          - acid
                          - state
                        title: DanglingStateEntry
                        type: object
                  type: array
                feature_name:
                  type: string
                implementation_id:
                  type: string
                implementation_name:
                  type: string
                product_name:
                  type: string
                refs_source:
                  allOf:
                    - properties:
                        branch_names:
                          items:
                            type: string
                          type: array
                        implementation_name:
                          type: string
                        source_type:
                          enum:
                            - local
                            - inherited
                            - none
                          type: string
                      required:
                        - source_type
                      title: SourceObject
                      type: object
                spec_source:
                  allOf:
                    - properties:
                        branch_names:
                          items:
                            type: string
                          type: array
                        implementation_name:
                          type: string
                        source_type:
                          enum:
                            - local
                            - inherited
                            - none
                          type: string
                      required:
                        - source_type
                      title: SourceObject
                      type: object
                states_source:
                  allOf:
                    - properties:
                        branch_names:
                          items:
                            type: string
                          type: array
                        implementation_name:
                          type: string
                        source_type:
                          enum:
                            - local
                            - inherited
                            - none
                          type: string
                      required:
                        - source_type
                      title: SourceObject
                      type: object
                summary:
                  allOf:
                    - properties:
                        status_counts:
                          type: object
                        total_acids:
                          type: integer
                      required:
                        - total_acids
                        - status_counts
                      title: Summary
                      type: object
                warnings:
                  items:
                    type: string
                  type: array
              required:
                - product_name
                - feature_name
                - implementation_name
                - implementation_id
                - spec_source
                - states_source
                - refs_source
                - summary
                - acids
                - warnings
              title: FeatureContextData
              type: object
      required:
        - data
      title: FeatureContextResponse
      type: object
    ErrorResponse:
      properties:
        errors:
          properties:
            detail:
              type: string
            status:
              type: string
          required:
            - detail
          type: object
      required:
        - errors
      title: ErrorResponse
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API token
      scheme: bearer
      type: http

````