Accept story 36: Enforce Front Matter on All Story Files
Add POST /workflow/stories/create endpoint that auto-assigns story numbers, generates correct front matter, and writes to upcoming/. Add slugify_name and next_story_number helpers with full test coverage. Add frontend createStory API method and types. Update README to recommend creation API for agents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,15 @@ When the user asks for a feature, follow this 4-step loop strictly:
|
||||
|
||||
### Step 1: The Story (Ingest)
|
||||
* **User Input:** "I want the robot to dance."
|
||||
* **Action:** Create a file in `stories/upcoming/` (e.g., `stories/upcoming/XX_robot_dance.md`).
|
||||
* **Action:** Create a story via `POST /api/workflow/stories/create` (preferred for agents — guarantees correct front matter and auto-assigns the story number). Alternatively, create a file manually in `stories/upcoming/` (e.g., `stories/upcoming/XX_robot_dance.md`).
|
||||
* **Front Matter (Required):** Every story file MUST begin with YAML front matter containing `name` and `test_plan` fields:
|
||||
```yaml
|
||||
---
|
||||
name: Short Human-Readable Story Name
|
||||
test_plan: pending
|
||||
---
|
||||
```
|
||||
The `test_plan` field tracks approval status: `pending` → `approved` (after Step 2).
|
||||
* **Move to Current:** Once the story is validated and ready for coding, move it to `stories/current/`.
|
||||
* **Tracking:** Mark Acceptance Criteria as tested directly in the story file as tests are completed.
|
||||
* **Content:**
|
||||
|
||||
Reference in New Issue
Block a user