Class PRDParser

java.lang.Object
com.tnsai.planning.tasklist.PRDParser

public final class PRDParser extends Object
Parser for PRD (Product Requirements Document) JSON files.

Parses a structured JSON document into a TaskList.

PRD Format


 {
   "name": "Backend API",
   "tasks": [
     {
       "id": "task-1",
       "name": "Implement auth",
       "description": "Create JWT authentication module",
       "priority": "HIGH",
       "tags": ["auth", "security"],
       "criteria": {
         "mustContain": ["@RestController"],
         "testCommand": "mvn test -pl auth"
       }
     }
   ]
 }
 
Author:
TnsAI Team
See Also:
  • Method Details

    • parse

      public static TaskList parse(Path prdFile) throws IOException
      Parses a PRD file into a TaskList.
      Parameters:
      prdFile - path to the PRD JSON file
      Returns:
      parsed TaskList
      Throws:
      IOException - if the file cannot be read or parsed
    • parseString

      public static TaskList parseString(String json) throws IOException
      Parses a PRD JSON string into a TaskList.
      Parameters:
      json - the PRD JSON content
      Returns:
      parsed TaskList
      Throws:
      IOException - if the JSON cannot be parsed