Files
content-factory/tasks/008-boundary-questions-loop.md
T

2.2 KiB

Task 008: Boundary Questions Loop

Development description: Implement generation, editing, partial saving, and submission of boundary questions before plan generation.

Implementation Details

  • Backend endpoints:
    • POST /api/articles/{article_id}/boundary-questions/generate
    • GET /api/articles/{article_id}/boundary-questions
    • PATCH /api/articles/{article_id}/boundary-questions/{question_id}
    • POST /api/articles/{article_id}/boundary-questions/submit
  • Generate 5-10 questions covering:
    • Audience.
    • Purpose.
    • Reader outcome.
    • Depth.
    • Tone.
    • Excluded topics.
    • Primary keyword.
    • Competitor angle.
    • Evidence standard.
    • Visual expectations.
  • Use agent job path with fake runner fixtures for tests.
  • Store editable questions and answers.
  • Block plan generation until all required questions are answered and submitted.
  • Frontend:
    • Boundary questions screen.
    • Partial save.
    • Required answer validation.

Public Interface

  • Editor generates questions for an article.
  • Editor edits answers and submits them.
  • Article moves to BOUNDARY_ANSWERS_SUBMITTED.

Acceptance Criteria

  • TDD pre-requirement: before implementation, write one failing API behavior test for required unanswered questions blocking submission; proceed through generate/save/submit behavior one cycle at a time and record evidence in Result.
  • Questions are generated from article brief plus target site config.
  • Required categories are represented.
  • Editor can save partial answers.
  • Required unanswered questions block submission.
  • Submission writes workflow event and updates article status.
  • Plan generation remains blocked until boundary answers are submitted.
  • Frontend displays required/optional state clearly.

Verification

  • Run boundary question API tests.
  • Run frontend page tests.
  • Run a Docker Compose smoke flow from article creation to boundary answer submission.

Result

  • Status: Pending execution.
  • TDD plan: To be filled during execution.
  • Red evidence: To be filled during execution.
  • Green evidence: To be filled during execution.
  • Refactor notes: To be filled during execution.
  • Verification output: To be filled during execution.