Initial commit
This commit is contained in:
488
skills/ln-300-story-pipeline/SKILL.md
Normal file
488
skills/ln-300-story-pipeline/SKILL.md
Normal file
@@ -0,0 +1,488 @@
|
||||
---
|
||||
name: ln-300-story-pipeline
|
||||
description: Orchestrates complete Story workflow from task planning to Done. Delegates to ln-310-story-decomposer, ln-320-story-validator, ln-330-story-executor for full automation.
|
||||
---
|
||||
|
||||
# Linear Story Processor (Orchestrator)
|
||||
|
||||
Orchestrate complete Story processing workflow from task planning through verification, execution, and review. This skill coordinates existing Story lifecycle using specialized workers.
|
||||
|
||||
## Overview
|
||||
|
||||
### What This Skill Does
|
||||
|
||||
Coordinates the complete processing pipeline for an existing Story:
|
||||
- Auto-discovers Team ID from kanban_board.md
|
||||
- Loads Story metadata ONLY (ID, title, status, labels - NO description)
|
||||
- **Phase 1:** Discovery (Team ID + Story ID)
|
||||
- **Phase 2:** Task Planning (delegates to ln-310-story-decomposer)
|
||||
- **Phase 3:** Verification & Execution Loop (ln-320-story-validator prepares tasks, ln-330-story-executor executes them, explicit delegation to ln-340-story-quality-gate Pass 1 + Pass 2)
|
||||
- **Phase 4:** Completion Report (Story Done automatically, full pipeline automation)
|
||||
|
||||
### When to Use This Skill
|
||||
|
||||
This skill should be used when:
|
||||
- Process existing Story from planning to completion
|
||||
- Automate full Story pipeline (tasks → verify → execute → review)
|
||||
- Story already exists in Linear (e.g., US001, API-53)
|
||||
- Need end-to-end orchestration without manual intervention
|
||||
|
||||
**Prerequisites:**
|
||||
- Story exists in Linear
|
||||
- Story has Acceptance Criteria defined
|
||||
- Requirements are clear
|
||||
|
||||
### When NOT to Use
|
||||
|
||||
Do NOT use if:
|
||||
- Story doesn't exist → Use ln-220-story-coordinator first to create Story
|
||||
- Only need task planning → Use ln-310-story-decomposer directly
|
||||
- Only need execution → Use ln-330-story-executor directly
|
||||
- Story is vague (no AC) → Refine Story first
|
||||
|
||||
---
|
||||
|
||||
## Core Concepts
|
||||
|
||||
### Orchestrator Pattern
|
||||
|
||||
**ln-300-story-pipeline is a pure coordinator** - it does NOT execute work directly:
|
||||
- ✅ Discovers context (Team ID, Story ID)
|
||||
- ✅ Loads Story metadata ONLY (no full description)
|
||||
- ✅ Makes routing decisions (which worker to invoke)
|
||||
- ✅ Delegates all work via Skill tool
|
||||
- ✅ Manages workflow state transitions
|
||||
- ❌ Does NOT generate documents (workers do this)
|
||||
- ❌ Does NOT create/update Linear issues (workers do this)
|
||||
- ❌ Does NOT execute tasks (workers do this)
|
||||
|
||||
**Workers**:
|
||||
- **ln-310-story-decomposer**: Plans and creates/replans tasks (1-6 implementation tasks)
|
||||
- **ln-320-story-validator**: Verifies Story + Tasks against industry standards, auto-fixes, approves (Backlog → Todo)
|
||||
- **ln-330-story-executor**: Executes all tasks through their workflow (Todo → In Progress → To Review → Done)
|
||||
- **ln-340-story-quality-gate**: Reviews completed Story (Pass 1: manual testing + test task creation, Pass 2: final verification → Done)
|
||||
|
||||
### Workflow Pattern: Looping Orchestrator
|
||||
|
||||
**Pattern**: Orchestrator reloads metadata after each worker completes, then re-evaluates state.
|
||||
|
||||
**Flow**:
|
||||
`
|
||||
Phase 1: Discovery → Phase 2: Task Planning (ln-310-story-decomposer) →
|
||||
Phase 3: Loop (Verify → Execute → Review Pass 1 + explicit Pass 2 delegation) →
|
||||
[If new task created] → ln-320-story-validator revalidates Backlog tasks → ln-330-story-executor executes them →
|
||||
[All tasks Done + test task Done] → explicit Pass 2 delegation → Story Done → Phase 4: Report
|
||||
`
|
||||
|
||||
**Key Principle**: After each worker, reload Story + Tasks metadata (NOT full descriptions) and decide next step.
|
||||
|
||||
### Auto-Discovery
|
||||
|
||||
**Team ID**: Auto-discovered from `docs/tasks/kanban_board.md` Linear Configuration table (see CLAUDE.md "Configuration Auto-Discovery").
|
||||
|
||||
**Story ID**: Parsed from request: "for US001" or "for API-53" or "process US001"
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Phase 0: Checkpoint Setup
|
||||
|
||||
**Optional checkpoint:**
|
||||
- If `docs/tasks/checkpoints/[story_id].md` exists → mark progress checkboxes as phases complete
|
||||
- If file missing → continue without errors (checkpoint optional)
|
||||
|
||||
### Phase 1: Discovery (Automated)
|
||||
|
||||
Auto-discovers Team ID from `docs/tasks/kanban_board.md`.
|
||||
|
||||
Parses request for:
|
||||
- **Story ID**: "for US001" or "process API-53"
|
||||
|
||||
**Validation**:
|
||||
- Team ID exists in kanban_board.md
|
||||
- Story ID format valid (e.g., US001, API-53)
|
||||
|
||||
Load Story metadata ONLY:
|
||||
```
|
||||
Story {
|
||||
id: string,
|
||||
title: string,
|
||||
status: string (Backlog | Todo | In Progress | To Review | Done),
|
||||
labels: string[]
|
||||
}
|
||||
```
|
||||
|
||||
**NO full description loaded** - token efficiency.
|
||||
|
||||
### Phase 2: Task Planning
|
||||
|
||||
**Check**: Does Story have tasks?
|
||||
|
||||
Query Linear: `list_issues(parentId=Story.id)`
|
||||
|
||||
**Decision**:
|
||||
- **ALWAYS** delegate to ln-310-story-decomposer (Decompose-First Pattern)
|
||||
- ln-310-story-decomposer will build IDEAL plan and choose CREATE (count=0) or REPLAN (count≥1) mode automatically
|
||||
- Rationale: Stories with ≥3 tasks MUST be replanned if AC changed (current logic skips replan)
|
||||
|
||||
**Invocation**:
|
||||
```
|
||||
🔄 [PROCESSOR] Phase 2: Delegating task planning to ln-310-story-decomposer
|
||||
|
||||
Skill(skill: "ln-310-story-decomposer", context: {
|
||||
storyId: Story.id,
|
||||
teamId: teamId
|
||||
})
|
||||
```
|
||||
|
||||
**ln-310-story-decomposer will**:
|
||||
- Analyze Story (AC, Technical Notes)
|
||||
- Build IDEAL task plan (1-6 tasks, Foundation-First execution order)
|
||||
- Create or replan tasks in Linear
|
||||
- Update kanban_board.md
|
||||
- Return: Task URLs + summary
|
||||
|
||||
**After completion**: Reload Story + Tasks metadata.
|
||||
|
||||
### Phase 3: Story Verification & Execution Loop
|
||||
|
||||
This phase loops until Story status = "To Review".
|
||||
|
||||
**Step 1: Story Verification**
|
||||
|
||||
**Trigger**: Story status = "Backlog" OR Tasks exist but not verified
|
||||
|
||||
Delegate to ln-320-story-validator:
|
||||
```
|
||||
🔄 [PROCESSOR] Phase 3 Step 1: Delegating verification to ln-320-story-validator
|
||||
|
||||
Skill(skill: "ln-320-story-validator", context: {
|
||||
storyId: Story.id,
|
||||
teamId: teamId
|
||||
})
|
||||
```
|
||||
|
||||
**ln-320-story-validator will**:
|
||||
- Load Story + Tasks descriptions (sequential, one by one)
|
||||
- Auto-fix all 16 verification criteria
|
||||
- Auto-approve (Backlog → Todo)
|
||||
- Update Story + Tasks status in Linear
|
||||
- Return: Summary (changes, guides, warnings)
|
||||
|
||||
**After completion**: Reload Story + Tasks metadata.
|
||||
|
||||
**Step 2: Story Execution**
|
||||
|
||||
**Trigger**: Story status = "Todo" OR "In Progress"
|
||||
|
||||
Delegate to ln-330-story-executor:
|
||||
```
|
||||
🔄 [PROCESSOR] Phase 3 Step 2: Delegating execution to ln-330-story-executor
|
||||
|
||||
Skill(skill: "ln-330-story-executor", context: {
|
||||
storyId: Story.id,
|
||||
teamId: teamId
|
||||
})
|
||||
```
|
||||
|
||||
**ln-330-story-executor will**:
|
||||
- Orchestrate task execution with strict priorities: Priority 0 = To Review (ln-332-task-reviewer), Priority 1 = To Rework (ln-333-task-rework), Priority 2 = Todo (ln-331-task-executor / ln-334-test-executor)
|
||||
- Rely on ln-320-story-validator to move any fix/refactor/test tasks from Backlog to Todo before picking them up (new work always re-enters through ln-320-story-validator)
|
||||
- Invoke ln-332-task-reviewer, ln-333-task-rework, ln-331-task-executor, ln-334-test-executor
|
||||
- When all tasks Done → Explicitly delegate to ln-340-story-quality-gate Pass 1 (via Skill tool)
|
||||
- When test task Done → Explicitly delegate to ln-340-story-quality-gate Pass 2 (via Skill tool) → Story Done
|
||||
- Return: Execution summary
|
||||
|
||||
**After completion**: Reload Story + Tasks metadata.
|
||||
|
||||
**Step 3: Story Review Pass 1 + Pass 2 (Explicitly Delegated by ln-330-story-executor)**
|
||||
|
||||
**Trigger**: ln-330-story-executor explicitly delegates to ln-340-story-quality-gate Pass 1 when all implementation tasks Done
|
||||
|
||||
**ln-340-story-quality-gate Pass 1 will** (Early Exit Pattern):
|
||||
- Phase 3: Code Quality Analysis (if fail → create refactoring task → ln-320-story-validator re-approves Backlog → Todo → Loop back to ln-330-story-executor)
|
||||
- Phase 4: Regression Check (if fail → create fix task → ln-320-story-validator re-approves Backlog → Todo → Loop back to ln-330-story-executor)
|
||||
- Phase 5: Manual Testing (if fail → create fix task → ln-320-story-validator re-approves Backlog → Todo → Loop back to ln-330-story-executor)
|
||||
- Phase 6: Verdict
|
||||
* **Path A**: All passed → Create test task (via ln-350-story-test-planner) → ln-320-story-validator revalidates Backlog → Todo → Loop back to ln-330-story-executor
|
||||
* **Path B**: Issues found → ln-320-story-validator revalidates Backlog → Todo → Loop back to ln-330-story-executor
|
||||
|
||||
**ln-340-story-quality-gate Pass 2 explicit delegation**:
|
||||
- **Trigger**: ln-330-story-executor detects test task Done → Updates Story status In Progress → To Review → Explicitly delegates Pass 2 (via Skill tool)
|
||||
- **Pass 2 will**: Verify tests (E2E 2-5, Integration 3-8, Unit 5-15, Priority ≥15) → Story To Review → Done
|
||||
|
||||
**Loop Condition**: If new task created (fix/refactoring/test), Phase 3 restarts from ln-320-story-validator to approve Backlog → Todo before ln-330-story-executor executes again.
|
||||
|
||||
**Exit Condition**: Story status = "Done" (all tasks Done, test task Done, Pass 2 passed)
|
||||
|
||||
### Phase 4: Completion Report
|
||||
|
||||
**Trigger**: Story status = "Done" (all tasks Done, test task Done, Pass 2 passed automatically)
|
||||
|
||||
```
|
||||
🔄 [PROCESSOR] Phase 4: Story processing complete
|
||||
|
||||
Story Status: Done
|
||||
All Tasks: Done
|
||||
Pipeline: Todo → In Progress → To Review → Done (fully automated)
|
||||
Summary:
|
||||
- Implementation tasks: Completed
|
||||
- Code Quality → Regression → Manual Testing: Passed
|
||||
- Test task: Completed (E2E 2-5, Integration 3-8, Unit 5-15, Priority ≥15)
|
||||
- Pass 2: Verified and approved
|
||||
|
||||
Story successfully processed from planning to Done without manual intervention.
|
||||
```
|
||||
|
||||
**Result**: Story fully automated from task planning to Done status.
|
||||
|
||||
---
|
||||
|
||||
## Critical Rules
|
||||
|
||||
### 1. Metadata-Only Loading
|
||||
|
||||
**HARD RULE**: Orchestrator loads ONLY Story + Tasks metadata (ID, title, status, labels).
|
||||
|
||||
**NO full descriptions loaded**:
|
||||
- Prevents token waste
|
||||
- Scales to Stories with many tasks
|
||||
- Workers load full descriptions when needed
|
||||
|
||||
### 2. Strict Delegation
|
||||
|
||||
**Orchestrator responsibilities**:
|
||||
- ✅ Discovery (Team ID, Story ID)
|
||||
- ✅ Metadata loading (ID, title, status, labels)
|
||||
- ✅ Routing decisions (which worker to invoke)
|
||||
- ✅ Workflow state management
|
||||
|
||||
**Worker responsibilities** (NOT orchestrator):
|
||||
- ❌ Generating documents → Workers
|
||||
- ❌ Loading full descriptions → Workers
|
||||
- ❌ Creating/updating Linear issues → Workers
|
||||
- ❌ Executing tasks → Workers
|
||||
- ❌ Running tests → Workers
|
||||
|
||||
### 3. Story Status Responsibility Matrix
|
||||
|
||||
**HARD RULE**: Only designated skills can update Story status. Clear ownership prevents conflicts.
|
||||
|
||||
| Story Status Transition | Responsible Skill | When |
|
||||
|-------------------------|-------------------|------|
|
||||
| **Backlog → Todo** | ln-320-story-validator | After auto-fix and approval (Phase 3 Step 1) |
|
||||
| **Todo → In Progress** | ln-330-story-executor | First task execution starts (Phase 3 Step 2, Priority 2) |
|
||||
| **In Progress → To Review** | ln-330-story-executor | All tasks Done (Phase 3 Step 2 → Phase 4 transition) |
|
||||
| **To Review → Done** | ln-340-story-quality-gate Pass 2 | All tests verified, Priority ≥15 covered (Phase 4 Pass 2) |
|
||||
|
||||
**Why this matters**:
|
||||
- Prevents duplicate updates from multiple skills
|
||||
- Clear audit trail: each transition has ONE owner
|
||||
- ln-300-story-pipeline orchestrates but does NOT update status directly
|
||||
|
||||
### 4. Loop After Each Worker
|
||||
|
||||
**Pattern**: After each worker completes, orchestrator:
|
||||
1. Reloads Story + Tasks metadata
|
||||
2. Re-evaluates state
|
||||
3. Decides: next worker OR loop back OR complete
|
||||
|
||||
**Example**:
|
||||
```
|
||||
ln-330-story-executor completes → Reload metadata → Check Story status
|
||||
- Story status = "In Progress" → Loop back to ln-330-story-executor
|
||||
- Story status = "To Review" → Phase 4 (report completion)
|
||||
```
|
||||
|
||||
### 4. Full Pipeline Automation
|
||||
|
||||
**Automation Principle**: Orchestrator runs entire pipeline without user prompts (full automation from task planning to Story Done).
|
||||
|
||||
**Workers handle prompts**:
|
||||
- ln-310-story-decomposer: Shows preview, waits for "confirm"
|
||||
- ln-320-story-validator: Shows summary, auto-approves
|
||||
- ln-330-story-executor: Orchestrates without prompts (workers may prompt), auto-invokes Pass 1 + Pass 2
|
||||
|
||||
**Full Automation**: No manual intervention required. Story lifecycle fully automated: Todo → In Progress → To Review → Done.
|
||||
|
||||
---
|
||||
|
||||
## Definition of Done
|
||||
|
||||
Before completing work, verify ALL checkpoints:
|
||||
|
||||
**✅ Checkpoint Setup (Phase 0):**
|
||||
- [ ] Checkpoint file created/loaded: `docs/tasks/checkpoints/[story_id].md`
|
||||
- [ ] Resume point identified (if checkpoint existed)
|
||||
|
||||
**✅ Team ID Discovered (Phase 1):**
|
||||
- [ ] Team ID loaded from kanban_board.md OR requested from user
|
||||
- [ ] Story ID parsed from request
|
||||
- [ ] Story metadata loaded (ID, title, status, labels - NO description)
|
||||
|
||||
**✅ Task Planning Completed (Phase 2):**
|
||||
- [ ] Checked if tasks exist (count ≥ 0)
|
||||
- [ ] Delegated to ln-310-story-decomposer to build the IDEAL plan and choose CREATE or REPLAN mode
|
||||
- [ ] Reloaded metadata after ln-310-story-decomposer completed
|
||||
|
||||
**✅ Verification & Execution Loop (Phase 3):**
|
||||
- [ ] Delegated to ln-320-story-validator (Story Backlog → Todo)
|
||||
- [ ] Delegated to ln-330-story-executor (orchestrates task execution with To Review → To Rework → Todo priorities)
|
||||
- [ ] New fix/refactor/test tasks routed back through ln-320-story-validator before execution
|
||||
- [ ] ln-330-story-executor auto-invoked ln-340-story-quality-gate Pass 1 (Code Quality → Regression → Manual Testing)
|
||||
- [ ] Pass 1 created test task (ln-320-story-validator re-approved it before execution)
|
||||
- [ ] ln-330-story-executor executed test task
|
||||
- [ ] ln-330-story-executor auto-invoked ln-340-story-quality-gate Pass 2 after test task Done
|
||||
- [ ] Pass 2 verified tests (E2E 2-5, Integration 3-8, Unit 5-15, Priority ≥15)
|
||||
- [ ] Pass 2 updated Story status: To Review → Done
|
||||
- [ ] Loop completed: Story status = "Done"
|
||||
|
||||
**✅ Completion Report (Phase 4):**
|
||||
- [ ] Story status = "Done"
|
||||
- [ ] All tasks Done
|
||||
- [ ] Full pipeline automation confirmed: Todo → In Progress → To Review → Done
|
||||
- [ ] Reported to user: "Story successfully processed from planning to Done without manual intervention"
|
||||
- [ ] Checkpoint file deleted: `docs/tasks/checkpoints/[story_id].md`
|
||||
|
||||
**Output**: Story fully automated from task planning to Done status (no manual intervention).
|
||||
|
||||
---
|
||||
|
||||
## Integration with Ecosystem
|
||||
|
||||
### Called By
|
||||
|
||||
Users directly: "Process US001" or "Run full pipeline for API-53"
|
||||
|
||||
### Calls (via Skill tool)
|
||||
|
||||
- **ln-310-story-decomposer**: Task planning (Phase 2)
|
||||
- **ln-320-story-validator**: Story verification (Phase 3 Step 1)
|
||||
- **ln-330-story-executor**: Story execution (Phase 3 Step 2)
|
||||
- ln-330-story-executor auto-invokes ln-340-story-quality-gate Pass 1 (Phase 3 Step 3)
|
||||
|
||||
### Next Steps
|
||||
|
||||
After ln-300-story-pipeline completes:
|
||||
- **Story Done**: No further action required. Story fully automated from task planning to Done status.
|
||||
- **Full Pipeline Automation**: Todo → In Progress → To Review → Done (no manual intervention)
|
||||
|
||||
---
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Orchestrator Responsibilities
|
||||
|
||||
**DO**:
|
||||
- ✅ Load Story + Tasks metadata ONLY
|
||||
- ✅ Make routing decisions
|
||||
- ✅ Delegate to workers
|
||||
- ✅ Reload metadata after each worker
|
||||
- ✅ Manage loop logic
|
||||
|
||||
**DON'T**:
|
||||
- ❌ Load full descriptions (workers do this)
|
||||
- ❌ Generate documents (workers do this)
|
||||
- ❌ Create/update Linear issues (workers do this)
|
||||
- ❌ Execute tasks (workers do this)
|
||||
- ❌ Prompt user mid-pipeline (workers do this)
|
||||
|
||||
### Worker Communication
|
||||
|
||||
**Context Propagation**: Pass minimal context to workers (Team ID, Story ID only). Workers discover full data themselves.
|
||||
|
||||
**Trust Worker Results**: Workers return summary, orchestrator doesn't re-verify.
|
||||
|
||||
**Error Handling**: If worker returns error, report to user and stop pipeline.
|
||||
|
||||
### Loop Management
|
||||
|
||||
**Reload After Worker**: Always reload Story + Tasks metadata after worker completes.
|
||||
|
||||
**Exit Condition**: Loop exits when Story status = "To Review" AND all tasks Done.
|
||||
|
||||
**Infinite Loop Protection**: Max 10 iterations per loop (safety net). If exceeded, report to user.
|
||||
|
||||
---
|
||||
|
||||
## Quick Examples
|
||||
|
||||
### Example 1: New Story (No Tasks)
|
||||
|
||||
**Request**: "Process US001: Implement OAuth token authentication"
|
||||
|
||||
**Execution**:
|
||||
- Phase 1: Team ID discovered, Story ID = US001, Status = Backlog
|
||||
- Phase 2: No tasks → Invoke ln-310-story-decomposer
|
||||
- ln-310-story-decomposer: Analyze Story (5 AC), create 3 tasks (Token generation 4h, Validation middleware 3h, Refresh logic 5h)
|
||||
- Reload metadata: Story has 3 tasks
|
||||
- Phase 3 Step 1: Invoke ln-320-story-validator
|
||||
- ln-320-story-validator: Auto-fix + approve (Backlog → Todo)
|
||||
- Reload metadata: Story status = Todo
|
||||
- Phase 3 Step 2: Invoke ln-330-story-executor
|
||||
- ln-330-story-executor: Execute 3 tasks (Priority 2: Todo)
|
||||
- ln-330-story-executor: Auto-invoke ln-340-story-quality-gate Pass 1
|
||||
- Pass 1: Code Quality → Regression → Manual Testing → All passed → Create test task
|
||||
- ln-320-story-validator re-approved test task (Backlog → Todo)
|
||||
- Reload metadata: Story has 4 tasks (1 test task in Todo)
|
||||
- Phase 3 Step 2 (Loop): ln-330-story-executor continues
|
||||
- ln-330-story-executor: Execute test task (Priority 2)
|
||||
- Test task Done
|
||||
- ln-330-story-executor: Update Story In Progress → To Review
|
||||
- ln-330-story-executor: Auto-invoke ln-340-story-quality-gate Pass 2
|
||||
- Pass 2: Verify tests (E2E 2-5, Integration 3-8, Unit 5-15, Priority ≥15) → Pass
|
||||
- Pass 2: Update Story To Review → Done
|
||||
- Reload metadata: Story status = Done, all tasks Done
|
||||
- Phase 4: Report "Story successfully processed from planning to Done without manual intervention"
|
||||
|
||||
**Result**: Story fully automated from Backlog to Done (no manual intervention).
|
||||
|
||||
### Example 2: Existing Story (Tasks Already Exist)
|
||||
|
||||
**Request**: "Process US005" (Story already has 4 tasks)
|
||||
|
||||
**Execution**:
|
||||
- Phase 1: Team ID discovered, Story ID = US005, Status = Todo
|
||||
- Phase 2: 4 tasks exist (count ≥ 3) → Skip task planning
|
||||
- Phase 3 Step 1: Invoke ln-320-story-validator
|
||||
- ln-320-story-validator: Auto-fix + approve (already Todo, validate tasks)
|
||||
- Reload metadata: Story status = Todo
|
||||
- Phase 3 Step 2: Invoke ln-330-story-executor
|
||||
- ln-330-story-executor: Execute 4 tasks (Priority 2: Todo)
|
||||
- ln-330-story-executor: Auto-invoke ln-340-story-quality-gate Pass 1
|
||||
- Pass 1: Code Quality → Regression → Manual Testing → All passed → Create test task
|
||||
- ln-330-story-executor Priority 0: Auto-verify test task (Backlog → Todo)
|
||||
- Reload metadata: Story has 5 tasks (1 test task in Todo)
|
||||
- Phase 3 Step 2 (Loop): ln-330-story-executor continues
|
||||
- ln-330-story-executor: Execute test task (Priority 2)
|
||||
- Test task Done
|
||||
- ln-330-story-executor: Update Story In Progress → To Review
|
||||
- ln-330-story-executor: Auto-invoke ln-340-story-quality-gate Pass 2
|
||||
- Pass 2: Verify tests (E2E 2-5, Integration 3-8, Unit 5-15, Priority ≥15) → Pass
|
||||
- Pass 2: Update Story To Review → Done
|
||||
- Reload metadata: Story status = Done, all tasks Done
|
||||
- Phase 4: Report "Story successfully processed from planning to Done without manual intervention"
|
||||
|
||||
**Result**: Story fully automated from Todo to Done (no manual intervention).
|
||||
|
||||
---
|
||||
|
||||
## Reference Files
|
||||
|
||||
**Checkpoint Format:**
|
||||
- `references/checkpoint_format.md` - Execution checkpoint file structure for context recovery
|
||||
|
||||
---
|
||||
|
||||
## Chat Output Prefix
|
||||
|
||||
Use emoji prefix for visual differentiation:
|
||||
- 🔄 [PROCESSOR] - ln-300-story-pipeline (orchestrator)
|
||||
|
||||
**Purpose**: Helps users track orchestrator progress when multiple workers are invoked.
|
||||
|
||||
---
|
||||
|
||||
**Version:** 2.1.0 (Fixed Writing Style: "Use this skill when" → "This skill should be used when" for skill-creator compliance.)
|
||||
**Last Updated:** 2025-11-16
|
||||
133
skills/ln-300-story-pipeline/diagram.html
Normal file
133
skills/ln-300-story-pipeline/diagram.html
Normal file
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ln-300-story-pipeline Workflow Diagram</title>
|
||||
<link rel="stylesheet" href="../shared/css/diagram.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"></script>
|
||||
<script>
|
||||
mermaid.initialize({
|
||||
startOnLoad: true,
|
||||
theme: 'base',
|
||||
themeVariables: {
|
||||
primaryColor: '#2E7D32',
|
||||
primaryTextColor: '#fff',
|
||||
primaryBorderColor: '#1B5E20',
|
||||
lineColor: '#666',
|
||||
secondaryColor: '#00695C',
|
||||
tertiaryColor: '#0288D1',
|
||||
background: '#fff',
|
||||
mainBkg: '#E8F5E9',
|
||||
secondBkg: '#B2DFDB',
|
||||
tertiaryBkg: '#B3E5FC',
|
||||
loopTextColor: '#fff'
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>ln-300-story-pipeline Workflow Diagram</h1>
|
||||
<p class="subtitle">Story Processing Orchestrator - Looping Workflow Pattern</p>
|
||||
|
||||
<div class="legend">
|
||||
<h3>Color Coding:</h3>
|
||||
<ul>
|
||||
<li><span class="legend-box discovery"></span> Discovery (Team ID, Story ID)</li>
|
||||
<li><span class="legend-box planning"></span> Task Planning (ln-310-story-decomposer)</li>
|
||||
<li><span class="legend-box verification"></span> Verification (ln-320-story-validator)</li>
|
||||
<li><span class="legend-box execution"></span> Execution (ln-330-story-executor)</li>
|
||||
<li><span class="legend-box review"></span> Review Pass 1 (ln-340-story-quality-gate)</li>
|
||||
<li><span class="legend-box decision"></span> Decision Points</li>
|
||||
<li><span class="legend-box completion"></span> Completion (Report)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="mermaid">
|
||||
graph TD
|
||||
Start([User Request: Process US001]) --> Phase1[Phase 1: Discovery<br/>Load Team ID + Story metadata<br/>ID, title, status, labels ONLY]
|
||||
|
||||
Phase1 --> Phase2Decision{Phase 2: Task Planning<br/>Has tasks?<br/>count >= 3?}
|
||||
Phase2Decision -->|No or < 3| Phase2[Phase 2: Task Planning<br/>ln-310-story-decomposer<br/>Create/Replan 1-6 tasks]
|
||||
Phase2Decision -->|Yes >= 3| Phase3Step1
|
||||
Phase2 --> Reload1[Reload Story + Tasks metadata]
|
||||
Reload1 --> Phase3Step1
|
||||
|
||||
Phase3Step1[Phase 3 Step 1: Verification<br/>ln-320-story-validator<br/>Auto-fix + Approve Backlog → Todo]
|
||||
Phase3Step1 --> Reload2[Reload Story + Tasks metadata]
|
||||
|
||||
Reload2 --> Phase3Step2[Phase 3 Step 2: Execution<br/>ln-330-story-executor<br/>Priority 0: Backlog auto-verify<br/>Priority 1-3: Execute tasks]
|
||||
Phase3Step2 --> AutoInvoke[Auto-invoke<br/>ln-340-story-quality-gate Pass 1<br/>Early Exit Pattern]
|
||||
|
||||
AutoInvoke --> Pass1Decision{Pass 1 Verdict?}
|
||||
Pass1Decision -->|All passed| CreateTestTask[Create test task<br/>via ln-350-story-test-planner<br/>Backlog status]
|
||||
Pass1Decision -->|Code quality issues| CreateRefactorTask[Create refactoring task<br/>Backlog status]
|
||||
Pass1Decision -->|Regression/testing failed| CreateFixTask[Create fix task<br/>Backlog status]
|
||||
|
||||
CreateTestTask --> AutoVerifyTest[Priority 0: Auto-verify<br/>via ln-320-story-validator<br/>Backlog → Todo]
|
||||
CreateRefactorTask --> AutoVerifyRefactor[Priority 0: Auto-verify<br/>via ln-320-story-validator<br/>Backlog → Todo]
|
||||
CreateFixTask --> AutoVerifyFix[Priority 0: Auto-verify<br/>via ln-320-story-validator<br/>Backlog → Todo]
|
||||
|
||||
AutoVerifyTest --> Reload3[Reload Story + Tasks metadata]
|
||||
AutoVerifyRefactor --> Reload3
|
||||
AutoVerifyFix --> Reload3
|
||||
|
||||
Reload3 --> LoopCheck{Story status?<br/>All tasks Done?}
|
||||
LoopCheck -->|In Progress OR<br/>Tasks pending| Phase3Step2
|
||||
LoopCheck -->|Test task Done| AutoInvokePass2[ln-330-story-executor:<br/>Update Story In Progress → To Review<br/>Auto-invoke Pass 2]
|
||||
|
||||
AutoInvokePass2 --> Pass2[ln-340-story-quality-gate Pass 2<br/>Verify tests: E2E 2-5<br/>Integration 3-8, Unit 5-15<br/>Priority ≥15]
|
||||
Pass2 --> Pass2Decision{Pass 2 Verdict?}
|
||||
Pass2Decision -->|Pass| StoryDone[Story To Review → Done<br/>Full automation complete]
|
||||
Pass2Decision -->|Fail| CreatePass2Fix[Create fix tasks<br/>Backlog → Auto-verify → Loop]
|
||||
|
||||
StoryDone --> Phase4[Phase 4: Completion Report<br/>Story Done<br/>Full pipeline automation:<br/>Todo → In Progress → To Review → Done]
|
||||
CreatePass2Fix --> Reload3
|
||||
|
||||
Phase4 --> End([Story Done])
|
||||
|
||||
classDef discoveryClass fill:#E8F5E9,stroke:#1B5E20,stroke-width:2px
|
||||
classDef planningClass fill:#FFF3E0,stroke:#E65100,stroke-width:2px
|
||||
classDef verificationClass fill:#E3F2FD,stroke:#0277BD,stroke-width:2px
|
||||
classDef executionClass fill:#FCE4EC,stroke:#C2185B,stroke-width:2px
|
||||
classDef reviewClass fill:#F3E5F5,stroke:#6A1B9A,stroke-width:2px
|
||||
classDef decisionClass fill:#FFF9C4,stroke:#F57F17,stroke-width:2px
|
||||
classDef completionClass fill:#C8E6C9,stroke:#2E7D32,stroke-width:3px
|
||||
classDef reloadClass fill:#E0E0E0,stroke:#424242,stroke-width:1px
|
||||
|
||||
class Start,Phase1 discoveryClass
|
||||
class Phase2Decision,Phase2 planningClass
|
||||
class Phase3Step1,AutoVerifyTest,AutoVerifyRefactor,AutoVerifyFix verificationClass
|
||||
class Phase3Step2,AutoInvoke,AutoInvokePass2 executionClass
|
||||
class Pass1Decision,Pass2Decision,LoopCheck decisionClass
|
||||
class CreateTestTask,CreateRefactorTask,CreateFixTask,CreatePass2Fix,Pass2 reviewClass
|
||||
class Reload1,Reload2,Reload3 reloadClass
|
||||
class StoryDone,Phase4,End completionClass
|
||||
</div>
|
||||
|
||||
<div class="notes">
|
||||
<h3>Workflow Notes:</h3>
|
||||
<ul>
|
||||
<li><strong>Phase 1:</strong> Discovery - Auto-discover Team ID from kanban_board.md, parse Story ID from request</li>
|
||||
<li><strong>Phase 2:</strong> Task Planning - Delegate to ln-310-story-decomposer if tasks don't exist or count < 3</li>
|
||||
<li><strong>Phase 3 Step 1:</strong> Verification - ln-320-story-validator auto-fixes + approves Story (Backlog → Todo)</li>
|
||||
<li><strong>Phase 3 Step 2:</strong> Execution - ln-330-story-executor orchestrates with Priority 0 (Backlog auto-verify) → Priority 1-3 (task execution)</li>
|
||||
<li><strong>Pass 1 (Early Exit):</strong> Code Quality → Regression → Manual Testing. Creates test/refactor/fix task in Backlog</li>
|
||||
<li><strong>Priority 0 Auto-Verify:</strong> All new tasks (test/refactor/fix) auto-verified via ln-320-story-validator (Backlog → Todo) before execution</li>
|
||||
<li><strong>Pass 2 Auto-Invocation:</strong> When test task Done, ln-330-story-executor updates Story (In Progress → To Review) and auto-invokes Pass 2</li>
|
||||
<li><strong>Loop:</strong> After each worker, reload Story + Tasks metadata. Loop continues while tasks pending or Pass 2 creates fixes</li>
|
||||
<li><strong>Exit Condition:</strong> Story status = "Done" (all tasks Done, test task Done, Pass 2 passed)</li>
|
||||
<li><strong>Phase 4:</strong> Completion Report - Story Done, full pipeline automation (Todo → In Progress → To Review → Done)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p><strong>Pattern:</strong> Looping Workflow (Pattern 4) with Full Automation</p>
|
||||
<p><strong>Type:</strong> Orchestrator - delegates all work via Skill tool</p>
|
||||
<p><strong>Key Principle:</strong> Metadata-only loading, strict delegation, Priority 0 auto-verify, auto Pass 2, full pipeline automation (Todo → Done)</p>
|
||||
<p><strong>Version:</strong> 1.1.1 | <strong>Last Updated:</strong> 2025-11-15</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
13
skills/ln-300-story-pipeline/references/checkpoint_format.md
Normal file
13
skills/ln-300-story-pipeline/references/checkpoint_format.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Checkpoint: [Story ID]
|
||||
|
||||
## Progress
|
||||
- [ ] Phase 1: Discovery
|
||||
- [ ] Phase 2: Task Planning (ln-310)
|
||||
- [ ] Phase 3 Step 1: Verification (ln-320)
|
||||
- [ ] Phase 3 Step 2: Execution (ln-330)
|
||||
- [ ] Phase 3 Step 3: Quality Pass 1 (ln-340)
|
||||
- [ ] Phase 3 Step 3: Quality Pass 2 (ln-340)
|
||||
- [ ] Phase 4: Completion
|
||||
|
||||
**Current Step:** Phase 1
|
||||
**Story Status:** Backlog
|
||||
Reference in New Issue
Block a user