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

# Develop Strategy Route

> Develop (refine) a Lab strategy through the research loop, emitting a NEW
lineage node (interop Increment 5).

The agent team runs the FULL loop INCLUDING DEVELOP (unlike Review, which skips
it) — ``personas.develop`` refines the submitted mechanism — then this route
materializes the refined spec as a brand-new owned strategy whose
``derived_from_strategy_id`` points at the original. Mutation is a new node: the
ORIGINAL strategy is NEVER touched (its rules/kind/last_verdict are unchanged);
Develop only INSERTs a new row (+ the paired ``strategy_versions`` v1 snapshot).

#1309 / Phase-1 bounds:
  * cross_sectional → 422 (O10): there is no Phase-1 ``StrategySpec`` to refine.
  * a rule_driven strategy the adapter can't carry (non-intraday / no explicit
    symbols) → 422.
  * a refined spec that can't be carried back into the Lab model — adapter-
    infeasible (an LLM-authored ``RuleSignal.template`` that won't materialize
    into a valid ``StrategyRules``) OR rejected by the domain ``RuleValidator``
    inside ``create_strategy`` — → 422, with NO partial/new strategy created.
  * a pipeline that fails before DEVELOP produces a refinement
    (``run.status == "failed"``) → **502**, with NO new strategy created. On
    failure ``run.refined`` is ``None`` and ``develop_strategy`` falls back to
    the INPUT spec — creating a strategy from that would silently mint a
    pointless identical copy, so a failed run is refused outright rather than
    materialized.



## OpenAPI

````yaml /api/openapi.json post /api/graph/v1/strategies/{strategy_id}/develop
openapi: 3.1.0
info:
  title: Sequency Graph API
  description: >

    # Sequency Graph-Native Trading API


    Graph-native API for trading intelligence, built on FalkorDB.


    ## Features


    - **Screener**: Filter stocks using graph-native queries with relationship
    expansion

    - **Stock Detail**: Complete stock context with all relationships

    - **Confluence Scoring**: Setup quality assessment with weighted components

    - **Strategy Matching**: Find matching options strategies via graph
    traversal

    - **Market Context**: Current market-wide context for trading decisions


    ## Data Sources


    All data is sourced from the FalkorDB knowledge graph, populated by:

    - Pattern detector (Go) - Technical indicators, patterns

    - Graph sync service - Levels, volume profiles, news, day classification
  version: 1.0.0
servers: []
security: []
paths:
  /api/graph/v1/strategies/{strategy_id}/develop:
    post:
      tags:
        - strategies
      summary: Develop Strategy Route
      description: >-
        Develop (refine) a Lab strategy through the research loop, emitting a
        NEW

        lineage node (interop Increment 5).


        The agent team runs the FULL loop INCLUDING DEVELOP (unlike Review,
        which skips

        it) — ``personas.develop`` refines the submitted mechanism — then this
        route

        materializes the refined spec as a brand-new owned strategy whose

        ``derived_from_strategy_id`` points at the original. Mutation is a new
        node: the

        ORIGINAL strategy is NEVER touched (its rules/kind/last_verdict are
        unchanged);

        Develop only INSERTs a new row (+ the paired ``strategy_versions`` v1
        snapshot).


        #1309 / Phase-1 bounds:
          * cross_sectional → 422 (O10): there is no Phase-1 ``StrategySpec`` to refine.
          * a rule_driven strategy the adapter can't carry (non-intraday / no explicit
            symbols) → 422.
          * a refined spec that can't be carried back into the Lab model — adapter-
            infeasible (an LLM-authored ``RuleSignal.template`` that won't materialize
            into a valid ``StrategyRules``) OR rejected by the domain ``RuleValidator``
            inside ``create_strategy`` — → 422, with NO partial/new strategy created.
          * a pipeline that fails before DEVELOP produces a refinement
            (``run.status == "failed"``) → **502**, with NO new strategy created. On
            failure ``run.refined`` is ``None`` and ``develop_strategy`` falls back to
            the INPUT spec — creating a strategy from that would silently mint a
            pointless identical copy, so a failed run is refused outright rather than
            materialized.
      operationId: >-
        develop_strategy_route_api_graph_v1_strategies__strategy_id__develop_post
      parameters:
        - name: strategy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Strategy Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````