AutoBE
    Preparing search index...

    Interface AutoBeAnalyzeWriteEvent

    Event fired during the writing phase of the requirements analysis process.

    This event represents the core activity of the Analyze Writer Agent (PlannerAgent), which serves as AutoBE's requirements analysis specialist. The agent transforms user requirements and business objectives into comprehensive, developer-ready documentation following the WHY → WHAT → HOW framework.

    The Analyze Writer Agent operates as the first critical step in AutoBE's waterfall development model, producing structured markdown documents that include:

    • Business models and user roles
    • Functional requirements in EARS (Easy Approach to Requirements Syntax) format
    • API endpoint specifications (as guidance, not prescriptive)
    • Entity relationship diagrams (ERD)
    • Security and business logic requirements

    Key characteristics of the writing process:

    • Focuses exclusively on backend requirements (no frontend/UI specifications)
    • Produces documents ranging from 2,000 to 30,000+ characters
    • Avoids ambiguous terms and maintains clear, measurable requirements
    • Excludes implementation details to preserve developer autonomy

    The generated documents serve as the foundation for subsequent AutoBE agents: Prisma Agent (database design), Interface Agent (API design), Test Agent (test generation), and Realize Agent (implementation).

    For detailed information about the Analyze Writer Agent's behavior and requirements, refer to packages/agent/prompts/ANALYZE_WRITE.md

    Kakasoo

    interface AutoBeAnalyzeWriteEvent {
        completed: number;
        created_at: string & Format<"date-time">;
        file: AutoBeAnalyzeFile;
        id: string;
        step: number;
        tokenUsage: IAutoBeTokenUsageJson.IComponent;
        total: number;
        type: "analyzeWrite";
    }

    Hierarchy (View Summary)

    Index

    Properties

    completed: number

    Number of items completed.

    Tracks how many items have been successfully processed so far in the current operation. This value increments as each item is completed, providing real-time progress indication.

    The ratio of completed to total gives the completion percentage: progress = (completed / total) * 100

    created_at: string & Format<"date-time">

    Timestamp when the event was created.

    ISO 8601 formatted date-time string indicating when this event was emitted by the system. This timestamp is crucial for event ordering, performance analysis, and debugging the agent workflow execution timeline.

    Format: "YYYY-MM-DDTHH:mm:ss.sssZ" (e.g., "2024-01-15T14:30:45.123Z")

    file: AutoBeAnalyzeFile

    File structure and content being written by the Analyze Writer Agent.

    Contains the markdown document being generated, including all sections such as overview, business model, functional requirements, API specifications, and ERD diagrams. This file will be validated by the Analyze Review Agent before proceeding to the next development phase.

    id: string

    A unique identifier for the event.

    step: number

    Current iteration number of the requirements analysis being written.

    Indicates which version of the requirements analysis is being drafted. This step number provides context for understanding whether this is an initial draft or a revision being written based on previous feedback or additional requirements gathering.

    The step value helps track the iterative nature of requirements development and correlates the writing activity with the overall requirements evolution process throughout the project lifecycle.

    Detailed token usage metrics for the current operation.

    Contains comprehensive token consumption data including total usage, input token breakdown with cache statistics, and output token categorization by generation type. This component-level tracking enables precise analysis of resource utilization for specific agent operations such as schema generation, test writing, or code implementation.

    The token usage data helps identify optimization opportunities, monitor operational costs, and ensure efficient use of AI resources throughout the automated backend development process.

    total: number

    Total number of items to process.

    Represents the complete count of operations, files, endpoints, or other entities that need to be processed in the current workflow step. This value is typically determined at the beginning of an operation and remains constant throughout the process.

    Used together with the completed field to calculate progress percentage and estimate time to completion.

    type: "analyzeWrite"

    Unique identifier for the event type.

    A literal string that discriminates between different event types in the AutoBE system. This field enables TypeScript's discriminated union feature, allowing type-safe event handling through switch statements or conditional checks.

    Examples: "analyzeWrite", "prismaSchemas", "interfaceOperations", "testScenarios"