Skip to content

doc: Finalize CONTRACT_onboarding_action.md (examples + state/action table) #7

@Whiteks1

Description

@Whiteks1

Context

The onboarding API contract must be the single source of truth for frontend ↔ backend onboarding interactions. It must be explicit and verifiable (real JSON, real states, real action values).

Affected paths

  • docs/ai/api/CONTRACT_onboarding_action.md

Steps

  1. Add a clear State Machine section:
    • list canonical states for onboarding_basic: start, ask_name, ask_goal, summary, end
    • allowed transitions and what triggers them
  2. Add an Actions section with the real enum used by the client (e.g. START, SUBMIT_TEXT, SELECT_OPTION) and explain:
    • when each action is valid
    • what value contains for each action
  3. Add request/response JSON examples per state (valid JSON):
    • happy path
    • invalid action
    • invalid/empty value
  4. Add explicit rule: no extra questions in summary and end.
  5. Add a small “Error responses” section (shape + examples).
  6. Ensure this contract does not silently define states that are not in onboarding_basic (design-only flows must be clearly labeled as out-of-scope for this Epic).

Definition of Done

  • Contract includes a state table and action table
  • All JSON examples are valid JSON and match the described schema
  • Canonical states for onboarding_basic are explicitly documented
  • Summary/end rule (“no extra questions”) is explicit
  • No contradictions with docs/ai/workflows/onboarding_basic.yaml and docs/ai/tests/onboarding_basic.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions