home / skills / yellinzero / aico / story-acceptance

story-acceptance skill

/employees/pm/skills/story-acceptance

This skill verifies frontend and backend story tasks are complete and updates acceptance criteria by converting all pending checkboxes to completed.

npx playbooks add skill yellinzero/aico --skill story-acceptance

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
4.5 KB
---
name: aico-pm-story-acceptance
description: |
  Verify and close stories after frontend/backend tasks are completed. Check ALL related task files, update story acceptance criteria checkboxes.

  UNIQUE VALUE: Ensures BOTH frontend AND backend tasks are verified before closing story. Prevents premature story closure.

  Use this skill when:
  - Frontend or backend notifies "task completed, please verify"
  - User asks to "verify story", "accept story", "close story", "mark story done"
  - Need to check if a story can be marked as complete
  - User asks "is story X done?", "can we close story X?"

  CRITICAL: Must check BOTH frontend tasks (docs/reference/frontend/tasks/) AND backend tasks (docs/reference/backend/tasks/) before closing.
  Output: Update story file checkboxes from `- [ ]` to `- [x]`
---

# Story Acceptance

## Language Configuration

Before generating any content, check `aico.json` in project root for `language` field to determine the output language. If not set, default to English.

## Process

1. **Identify the story**: Get story ID (e.g., S-001) from notification or user
2. **Read the story**: Load `docs/reference/pm/stories/{story-id}.md`
3. **Find related tasks** (use Strategy 1 if available, fallback to Strategy 2):
   - **Strategy 1 (Preferred)**: Read "Related Tasks" section from story file
     - Story file should contain task list created by task-breakdown
     - Directly read the listed task files
   - **Strategy 2 (Fallback)**: Pattern matching in task directories
     - Extract story name from story filename (e.g., "user-profile" from "user-profile.md")
     - Search `docs/reference/frontend/tasks/` for `story-{story-name}-*.md`
     - Search `docs/reference/backend/tasks/` for `story-{story-name}-*.md`
4. **Verify all tasks completed**:
   - Read each task file's `> **Status**:` field
   - All task statuses should be `completed`
   - No `pending` or `in_progress` tasks remaining
5. **Update story**:
   - If ALL tasks completed → Update acceptance criteria `- [ ]` to `- [x]`
   - If partial → Report progress, list incomplete tasks

## Verification Checklist

```markdown
## Story: S-XXX

### Frontend Tasks

- [x] docs/reference/frontend/tasks/s-xxx.md - All completed

### Backend Tasks

- [x] docs/reference/backend/tasks/s-xxx.md - All completed

### Result: ✅ Ready to close / ⏳ Waiting for tasks
```

## Task Status Mapping

| Task Status      | Meaning           |
| ---------------- | ----------------- |
| `✅ completed`   | Task done         |
| `🔄 in_progress` | Currently working |
| `⏳ pending`     | Not started       |

## Story Update Format

When all tasks are complete, update the story file:

```markdown
## Acceptance Criteria

- [x] Criterion 1 (was `- [ ]`)
- [x] Criterion 2 (was `- [ ]`)
- [x] Criterion 3 (was `- [ ]`)
```

## Decision Logic

```
Has frontend tasks? ──Yes──> Check frontend/tasks/{story}.md
        │                            │
        No                     All completed?
        │                       │        │
        ▼                      Yes       No
Has backend tasks? ──Yes──> Check backend/tasks/{story}.md
        │                            │
        No                     All completed?
        │                       │        │
        ▼                      Yes       No
All checks passed? ─────────────┘        │
        │                                │
       Yes                              No
        │                                │
        ▼                                ▼
Update story checkboxes          Report incomplete tasks
```

## Key Rules

- MUST check BOTH frontend and backend tasks before closing
- ONLY update story when ALL related tasks are completed
- ALWAYS report which tasks are still pending if not ready to close
- Use exact checkbox format: `- [x]` for completed, `- [ ]` for pending

## Output Examples

### All Complete

```
## Story S-001 Acceptance Result

✅ **Ready to Close**

### Task Check
- Frontend: 3/3 completed
- Backend: 2/2 completed

Story acceptance criteria updated.
```

### Partial Complete

```
## Story S-001 Acceptance Result

⏳ **Waiting for Tasks**

### Task Check
- Frontend: 3/3 completed ✅
- Backend: 1/2 completed ⏳

### Incomplete Tasks
- [ ] Backend Task 2: Implement API endpoint
```

## Common Mistakes

- ❌ Close story with pending tasks → ✅ Check ALL related tasks first
- ❌ Only check frontend OR backend → ✅ Check BOTH if story has both
- ❌ Forget to update checkboxes → ✅ Always update `- [ ]` to `- [x]`

Overview

This skill verifies and closes project stories after both frontend and backend tasks are completed. It prevents premature story closure by ensuring all related task files are checked and story acceptance criteria checkboxes are updated from `- [ ]` to `- [x]`. Use it to produce a clear readiness decision and to update the story file when appropriate.

How this skill works

Identify the story ID and load the story file from docs/reference/pm/stories/{story-id}.md. Find related task files by reading the story's "Related Tasks" section (preferred) or by pattern-matching task filenames in docs/reference/frontend/tasks/ and docs/reference/backend/tasks/. Read each task's `> **Status**:` field and confirm statuses are all `completed` before changing acceptance criteria checkboxes.

When to use it

  • When frontend or backend notifies "task completed, please verify"
  • When a user asks to "verify story", "accept story", "close story", or "mark story done"
  • To determine if a story can be marked complete
  • When asked "is story X done?" or "can we close story X?"
  • Before merging or releasing features that depend on the story being closed

Best practices

  • Always check BOTH docs/reference/frontend/tasks/ and docs/reference/backend/tasks/ for related tasks
  • Prefer reading the story's "Related Tasks" list; fall back to filename pattern matching only if missing
  • Treat any status other than `completed` as blocking (e.g., `in_progress` or `pending`)
  • If not all tasks are completed, list incomplete tasks and do NOT update checkboxes
  • Update acceptance criteria exactly from `- [ ]` to `- [x]` only when all checks pass

Example use cases

  • A frontend developer marks a task completed and asks QA to verify the story is ready to close
  • A PM asks "is S-123 done?" and needs a definitive checklist and decision
  • Automated verification step before changing a story's acceptance criteria in the repo
  • A reviewer confirms both backend and frontend tasks finished before approving a release

FAQ

What if the story file lacks a "Related Tasks" section?

Use filename pattern matching in the frontend and backend task directories to find task files associated with the story.

Do I update checkboxes if only frontend tasks are complete?

No. You must verify both frontend and backend tasks. Update checkboxes only when all related tasks are `completed`.