{"summary": "Data model and delimited text format for YFlows sequences", "sequence_format_spec_url": "https://yflows.com/docs/sequence-format/", "data_model": {"Sequence": {"name": "string (max 120 chars)", "description": "optional string (Markdown supported)", "is_public": "boolean", "slug": "read-only, short unique id for URLs"}, "SubSequence": {"description": "One block per subsequence; blocks separated by blank lines", "format": "[SubsequenceName::OptionalType](repetitions) Pose1, Pose2, ...", "repetitions": "Optional. E.g. (Right/Left(2), Single) - Right/Left, Left/Right, Repeat, Single"}, "Variation (pose)": {"format": "Optional[transition cues] CommonPoseName:R or :L (variation name) [variation cues]", "common_name": "Must match a pose in the YFlows pose library (e.g. downward facing dog, childs pose)", "direction": "Optional :R or :L after the name for right/left", "transition_cues": "Optional [cue1, cue2] before the pose name", "variation_cues": "Optional [cue1, cue2] after the pose name in brackets"}}, "delimited_text_format": {"canonical_spec": "https://yflows.com/docs/sequence-format/", "structure": "Blocks separated by double newline (\\n\\n). Each block is one subsequence.", "subsequence_block": "[SubsequenceName::Type](RepetitionType(Count)) Pose1, Pose2, ...", "examples": ["[Warm-up]\nchilds pose, downward facing dog, [Inhale lift] upward dog", "[Sun A::Vinyasa](Right/Left(2))\n[Step forward] forward fold:R, mountain"], "rules": ["Pose names must exactly match CommonPoseName entries in the database.", "Commas separate poses; commas inside brackets [] or parentheses () are not separators.", "Repetition types: Right/Left, Left/Right, Repeat, Single (or Single (No Repetition)).", "Optional repetition count: e.g. Right/Left(2) for 2x each side."]}, "verification": {"dry_run_endpoint": "POST /api/yflows/sequences/validate", "body": {"delimited_text": "string (required)"}, "response": {"valid": "true when warnings is empty", "warnings": "list of human-readable issues (same messages as create/update)", "warning_count": "integer"}, "agent_eval_loop": ["Generate delimited_text per sequence_format_spec_url", "POST /api/yflows/sequences/validate until valid is true (fix pose names via common-names search)", "POST /api/yflows/sequences/ to create (or PUT to update)"], "checks": ["Subsequence blocks separated by double newline", "Subsequence header and optional ::SequenceType must match a SequenceType name if present", "Repetition syntax: [summary] Type(count)[start:end] with Type in Right/Left, Left/Right, Repeat, Single", "Each pose variation matches VARIATION_PATTERN", "Common pose names must exist in the library (exact spelling)"], "note": "Validate runs the same code path as save inside a rolled-back transaction. Create/update still persist even when warnings are returned."}, "endpoints": {"POST /api/yflows/sequences/validate": "Dry-run validation of delimited_text (no save). Same warnings as create/update.", "POST /api/yflows/sequences/": "Create a new sequence (body: name, delimited_text, optional description, is_public)", "PUT /api/yflows/sequences/{slug}": "Update an existing sequence (body: delimited_text). Must own the sequence.", "GET /api/yflows/sequences/{slug}/text": "Get the delimited text for a sequence (for editing or copying)."}, "openapi_docs": "GET /api/yflows/docs for interactive Swagger UI (login required).", "authentication": "API key with can_manage_sequences. Headers: Authorization: Bearer KEY or X-API-Key: KEY. Create keys in Account Settings. Keys expire after 30 days.", "poses_api": "Pose library management: GET /api/poses/docs"}