[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H465CPC8BMD25WCMR5EV2D":3,"skill-same:01M6H465CPC8BMD25WCMR5EV2D":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":55,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6H465CPC8BMD25WCMR5EV2D","dx-req-tasks",null,"Create or close child Tasks under an ADO\u002FJira User Story — FE\u002FBE\u002FAuthoring with hour estimates; 'close' closes them after development. Not for requirements (dx-req) or DoD (dx-req-dod).","easingthemes\u002Fdx-aem-flow","easingthemes","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2750284?v=4","01M6H3XYGJY8QCX9ES36P2WF4H","Dragan Filipović","01M6H3XYMN1XVSGKN7N79SW3RH",7,"MIT","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-core\u002Fskills\u002Fdx-req-tasks\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"dx req tasks","dx","tasks","with","requirements","for","development","dod","ado","atlassian","authoring","edit","jira","write","read","close","work","create","search","user story","2026-11-10 10:12:30",false,"---\nname: dx-req-tasks\ndescription: \"Create or close child Tasks under an ADO\u002FJira User Story — FE\u002FBE\u002FAuthoring with hour estimates; 'close' closes them after development. Not for requirements (dx-req) or DoD (dx-req-dod).\"\nargument-hint: \"[Work Item ID] [BE|FE|Authoring] or [Work Item ID] close\"\nallowed-tools: [\"read\", \"edit\", \"search\", \"write\", \"agent\", \"ado\u002F*\", \"atlassian\u002F*\"]\n---\n\nYou create child Task work items under a parent User Story in Azure DevOps or Jira. You read the story, infer which work groups apply (BE, FE, Authoring), plan tasks with hour estimates that match the Story Points budget, present the plan for user approval, then create the tasks via ADO or Jira MCP.\n\n## Defaults\n\nRead `..\u002F..\u002Fshared\u002Fprovider-config.md` for provider detection and field mapping.\n\n1. Read `.ai\u002Fconfig.yaml`\n2. Check `tracker.provider` (preferred) or `scm.provider` (legacy fallback):\n   - `ado` → Azure DevOps (default if not set)\n   - `jira` → Atlassian Jira\n3. Set `provider` variable for branching in subsequent steps.\n\n### If provider = ado\n\n- **Organization:** read from `.ai\u002Fconfig.yaml` `scm.org`\n- **Project:** read from `.ai\u002Fconfig.yaml` `scm.project`\n\n### If provider = jira\n\n- **Jira URL:** read from `.ai\u002Fconfig.yaml` `jira.url`\n- **Project Key:** read from `.ai\u002Fconfig.yaml` `jira.project-key`\n- **Child Issue Type:** read from `.ai\u002Fconfig.yaml` `jira.child-issue-type` (default: `Sub-task`)\n\n## 1. Parse Input\n\nThe first token of `$ARGUMENTS` is the work item ID (numeric for ADO, `KEY-123` for Jira) or a full URL.\n\nIf the user provides a URL, extract the ID\u002Fkey from it. Supported formats:\n- ADO: `https:\u002F\u002Fdev.azure.com\u002F{org}\u002F{project}\u002F_workitems\u002Fedit\u002F{id}`\n- ADO: `https:\u002F\u002F{org}.visualstudio.com\u002F{project}\u002F_workitems\u002Fedit\u002F{id}`\n- Jira: `https:\u002F\u002F{instance}\u002Fbrowse\u002F{KEY-123}`\n\nInput detection (see `..\u002F..\u002Fshared\u002Fprovider-config.md`):\n- Matches `\u002F^[A-Z]+-\\d+$\u002F` → Jira issue key\n- Matches `\u002F^\\d+$\u002F` → numeric ID; check `tracker.provider`\n- Contains `dev.azure.com` or `visualstudio.com` → ADO\n- Contains `\u002Fbrowse\u002F` → Jira\n\nRemaining tokens are optional **group filters**: `BE`, `FE`, `Authoring` (case-insensitive). If provided, only create tasks for those groups.\n\n```\n\u002Fdx-req-tasks 2416553              → all groups (inferred)\n\u002Fdx-req-tasks 2416553 BE           → only BE tasks\n\u002Fdx-req-tasks 2416553 FE BE        → only FE + BE tasks\n\u002Fdx-req-tasks 2416553 Authoring    → only Authoring tasks\n\u002Fdx-req-tasks 2416553 close        → close all child tasks\n```\n\nIf no argument is provided, ask the user for the work item ID.\n\n**If `close` is in the arguments:** Skip steps 2-10. Jump to **Close Mode** (at the end of this skill).\n\n## 2. Load MCP Tools\n\nBefore making any ADO calls, load the required tools:\n\n```\nToolSearch(\"+ado wit\")\n```\n\n## 3. Fetch Parent Story\n\n```\nmcp__ado__wit_work_item\n  action: \"get\"\n  project: \"\u003CADO project from config>\"\n  id: \u003Cwork item ID>\n  expand: \"Relations\"\n```\n\nExtract:\n- **Title** — full title string\n- **Story Points** — `Microsoft.VSTS.Scheduling.StoryPoints` (number)\n- **Area Path** — `System.AreaPath`\n- **Iteration Path** — `System.IterationPath`\n- **Assigned To** — `System.AssignedTo` (the person assigned to the parent story — used to assign child tasks)\n- **Description** — `System.Description` (HTML)\n- **Acceptance Criteria** — `Microsoft.VSTS.Common.AcceptanceCriteria` (HTML)\n- **State** — `System.State`\n- **Existing children** — from relations (`System.LinkTypes.Hierarchy-Forward`)\n\n### If provider = jira\n\n```\nmcp__atlassian__jira_get_issue\n  issue_key: \"\u003Cissue key>\"\n```\n\nMap fields:\n- **Story Points** — `fields.story_points` or `fields.\u003Cjira.custom-fields.story-points>` (read from config)\n- **Components** — `fields.components[].name` (ADO equivalent: Area Path)\n- **Sprint** — `fields.sprint.name` (ADO equivalent: Iteration Path)\n- **Assigned To** — `fields.assignee.displayName`\n- **Existing children** — fetch via JQL: `mcp__atlassian__jira_search` with `parent = \u003Cissue_key> AND issuetype = Sub-task`\n\nIf Story Points is missing or 0, ask the user: \"Story has no Story Points set. How many SP should I use for budget?\"\n\nCalculate **total budget hours** = Story Points × 8.\n\n## 4. Fetch Existing Child Tasks\n\nAlways check for existing children from the relations extracted in step 3. If child IDs exist, fetch their details:\n\n```\nmcp__ado__wit_work_item\n  action: \"get_batch\"\n  project: \"\u003CADO project from config>\"\n  ids: [\u003Cchild IDs>]\n  fields: [\"System.Title\", \"System.WorkItemType\", \"System.State\",\n           \"Microsoft.VSTS.Scheduling.OriginalEstimate\",\n           \"Microsoft.VSTS.Scheduling.RemainingWork\"]\n```\n\nFilter to only **Task** type work items (ignore Bugs, Test Cases, etc.).\n\n### If provider = jira\n\nChildren are fetched in Step 3 via JQL search. For each child sub-task returned:\n- **Key** — issue key (e.g., `PROJ-124`)\n- **Title** — `fields.summary`\n- **State** — `fields.status.name`\n- **Original Estimate** — `fields.timeoriginalestimate` (in seconds — divide by 3600 for hours)\n- **Remaining Work** — `fields.timeestimate` (in seconds — divide by 3600 for hours)\n\nFor each existing Task, record:\n- **ID** — work item number\n- **Title** — to detect group (starts with `BE -`, `FE -`, `Authoring -`)\n- **State** — New, Active, Closed, etc.\n- **Original Estimate** — hours already allocated\n- **Remaining Work** — hours remaining\n\n### Estimate missing hours on existing tasks\n\nIf an existing Task has no OriginalEstimate (null or 0), infer an estimate based on the task title and parent story content:\n\n| Title pattern | Inferred hours |\n|---------------|---------------|\n| `BE - PR Review` or `FE - PR Review` | 1 |\n| `* - Unit Tests` | 3 |\n| `* - Testing` | 2 |\n| `* - Planning` | 1 |\n| `* - Implement *` or other implementation tasks | 8 |\n| `Authoring - *` (any authoring task) | 4 |\n| Anything else unclear | 4 (default) |\n\nMark inferred estimates with `(inferred)` in the display so the user can see which ones were guessed. These inferred values are used for budget calculation and will be proposed for update in the confirmation step.\n\n### Calculate existing budget usage\n\n```\nexisting_hours = sum of OriginalEstimate (actual or inferred) across all existing Tasks\nremaining_budget = (story_points × 8) - existing_hours\n```\n\n### Display existing tasks\n\nIf existing Tasks are found, print them:\n\n```markdown\n### Existing Tasks (\u003Cexisting_count> tasks, \u003Cexisting_hours>h allocated)\n\n| ID | Title | Hours | State |\n|----|-------|-------|-------|\n| #12345 | BE - Implement Sling Model | 8 | Active |\n| #12346 | FE - PR Review | 1 (inferred) | New |\n\n**Budget:** \u003Cbudget>h total, \u003Cexisting_hours>h allocated, **\u003Cremaining_budget>h remaining**\n```\n\nTasks with `(inferred)` hours will have their estimates set in ADO after user confirmation (step 9).\n\n### Determine action\n\n- If `remaining_budget > 0` → plan new tasks for the remaining hours\n- If `remaining_budget = 0` → print \"Budget fully allocated. No new tasks needed.\" and stop (unless user requests specific additions)\n- If `remaining_budget \u003C 0` → warn: \"Existing tasks exceed budget by Xh. Proceed with planning additional tasks anyway?\" Wait for confirmation.\n\n### Avoid duplicates\n\nWhen planning new tasks (step 6), skip any task that already exists by matching title prefix patterns:\n- If `BE - PR Review` already exists → don't create another\n- If `FE - Testing` already exists → don't create another\n- Match on the title pattern, not exact string (e.g., existing `BE - Implement model changes` covers the `BE - Implement` slot)\n\n### Estimate update mode\n\nIf **all groups already have tasks** but some tasks have **no estimates** (OriginalEstimate is null\u002F0), switch to **estimate-only mode**:\n1. Skip task creation (step 8)\n2. Present existing tasks with inferred estimates marked `(inferred)`\n3. After user approval, update estimates on existing tasks via `wit_work_item_write` (`action: \"update_batch\"`) (step 9)\n4. Print summary with updated estimates\n\n### Mixed mode (new tasks + missing estimates)\n\nIf there are **both** existing tasks without estimates **and** remaining budget for new tasks:\n1. Show existing tasks with inferred estimates in the \"Existing Tasks\" section\n2. Show new tasks in the \"New Tasks\" section\n3. After approval, create new tasks (step 8) AND update estimates on existing tasks (step 9) in the same run\n\n## 5. Infer Groups\n\nReference `.claude\u002Frules\u002F` for domain-specific naming conventions and group signals.\n\n### From title tags\n\nParse square bracket tags from the title: `[BE]`, `[FE]`, `[Authoring]`.\n\n- `[BE]` → include BE group\n- `[FE]` → include FE group\n- `[Authoring]` → include Authoring group\n\n### From content (if no tags found)\n\nIf the title has no recognizable tags, analyze the Description and Acceptance Criteria:\n\n| Signal | Group |\n|--------|-------|\n| Mentions model, exporter, Java, service, backend, API, servlet, controller | BE |\n| Mentions frontend, rendering, template, CSS, JavaScript, UI, design, component markup | FE |\n| Mentions dialog, authoring, content author, configuration, CMS | Authoring |\n\nIf nothing is clear from content, default to **all three groups**.\n\n### Apply user filter\n\nIf the user passed group filters in the arguments, override the inferred groups. Only create tasks for the specified groups.\n\n### Component lookup (optional)\n\nIf the story title or description mentions a specific component name and a component index exists (`.ai\u002Fproject\u002Fcomponent-index.md` or `.ai\u002Fcomponent-index.md`), grep it for the component:\n\n```\nGrep(\".ai\u002Fproject\u002Fcomponent-index.md\", \"\u003Ccomponent-name>\")\n```\n\nThis helps generate more specific implementation task titles (e.g., \"BE - Update StarterKitExporter\" instead of generic \"BE - Implement exporter\").\n\n## 6. Plan Tasks\n\nFor each active group, generate tasks. Follow these constraints:\n\n| Group | Max Tasks | Permanent Tasks | Nature |\n|-------|-----------|-----------------|--------|\n| BE | 5 | `BE - PR Review` (1h), `BE - Unit Tests` (2-4h) | Development (models, services) |\n| FE | 5 | `FE - PR Review` (1h), `FE - Testing` (1-2h) | Development (templates, CSS, JS) |\n| Authoring | 2 | *(none — no PR or testing)* | Content authoring (non-development) |\n\n**Authoring is NOT development.** Authoring tasks are for content authors who configure components — editing dialogs, setting up content, verifying pages. There is no code, no PR, no unit tests. Authoring tasks are purely CMS authoring work.\n\n### Implementation tasks (fill remaining slots)\n\nBased on story content, create implementation tasks. Examples:\n\n**BE:**\n- `BE - Implement model` (6-10h)\n- `BE - Update exporter` (6-10h)\n- `BE - Implement service logic` (6-10h)\n\n**FE:**\n- `FE - Implement component rendering` (6-10h)\n- `FE - Implement responsive styles` (6-10h)\n- `FE - Update component template` (6-10h)\n\n**Authoring:**\n- `Authoring - Configure component dialog` (2-4h)\n- `Authoring - Verify authored content` (1-2h)\n\n### Optional tasks (add if budget allows)\n\n- `BE - Planning` or `FE - Planning` (1-2h) — only if story is complex (3+ SP)\n\n### Hour distribution rules\n\n1. Total hours across ALL tasks MUST equal Story Points × 8\n2. PR Review tasks: always 1h each\n3. Testing\u002FUnit Tests: 1-4h depending on complexity\n4. Implementation tasks: 6-10h (typically 8h)\n5. Planning: 1-2h\n6. Distribute remaining hours by adjusting implementation task estimates\n7. If budget is tight, reduce implementation task count rather than making tiny tasks\n8. Minimum task estimate: 1h\n\n### Distribution algorithm\n\n```\ntotal_budget = story_points × 8\nexisting_hours = sum of OriginalEstimate from existing child Tasks (step 4)\nremaining_budget = total_budget - existing_hours\ngroups = active groups (1-3), minus groups fully covered by existing tasks\n\n# Split remaining_budget proportionally across groups that need new tasks\nif all 3 groups need tasks:\n  BE gets ~45%, FE gets ~40%, Authoring gets ~15%\nif BE + FE only:\n  BE gets ~50%, FE gets ~50%\nif single group:\n  that group gets 100%\n\n# Within each group:\n1. Skip permanent tasks that already exist (matched in step 4)\n2. Allocate remaining permanent tasks first (PR Review 1h, Testing\u002FUnit Tests)\n3. Fill remaining group budget with implementation tasks\n4. Adjust implementation task hours to consume exact remaining_budget\n```\n\n## 7. Present Plan for Approval\n\nPrint the task breakdown table. If existing tasks were found, show both sections:\n\n```markdown\n## Task Breakdown — Story #\u003Cid> (\u003Cstory_points> SP = \u003Cbudget>h)\n\n**\u003CStory Title>**\n**Groups:** BE, FE, Authoring\n**Area Path:** \u003Carea_path>\n**Iteration:** \u003Citeration_path>\n\n### Existing Tasks (already in ADO)\n\n| ID | Group | Title | Hours | State |\n|----|-------|-------|-------|-------|\n| #12345 | BE | BE - Implement model | 8 | Active |\n| #12346 | FE | FE - PR Review | 1 | New |\n| | | **Subtotal** | **9** | |\n\n### New Tasks (to be created)\n\n| # | Group | Task Title | Hours |\n|---|-------|-----------|-------|\n| 1 | BE | BE - Unit Tests | 3 |\n| 2 | BE | BE - PR Review | 1 |\n| 3 | FE | FE - Implement component rendering | 8 |\n| 4 | FE | FE - Testing | 2 |\n| 5 | Authoring | Authoring - Configure dialog | 4 |\n| 6 | Authoring | Authoring - PR Review | 1 |\n| | | **Subtotal** | **19** |\n\n> **Budget:** 28h (3.5 SP × 8h) = 9h existing + 19h new ✓ Balanced\n\nWant to adjust? You can:\n- Remove a task: \"remove #5\"\n- Add a task: \"add FE - Update styles 4h\"\n- Change hours: \"#4 to 6h\"\n- Change title: \"#1 title BE - Update model\"\n- Or say **\"go\"** to create all tasks in ADO\n```\n\nIf no existing tasks, omit the \"Existing Tasks\" section and show only \"New Tasks\".\n\n### Handle adjustments\n\nIf the user requests changes:\n1. Apply the changes to the plan\n2. **Recalculate** total hours\n3. If total no longer matches budget, warn: \"Total is now Xh but budget is Yh. Adjust other tasks to balance, or proceed anyway?\"\n4. Re-print the updated table\n5. Ask for confirmation again\n\nRepeat until the user says \"go\", \"create\", \"yes\", \"looks good\", or similar affirmation.\n\n## 8. Create Tasks in ADO\n\nOnce approved, create all tasks as children of the parent story:\n\n```\nmcp__ado__wit_work_item_write\n  action: \"add_child\"\n  parentId: \u003Cstory ID>\n  project: \"\u003CADO project from config>\"\n  workItemType: \"Task\"\n  items: [\n    {\n      \"title\": \"\u003Ctask title>\",\n      \"description\": \"\",\n      \"areaPath\": \"\u003Cfrom parent>\",\n      \"iterationPath\": \"\u003Cfrom parent>\"\n    },\n    ...for each task\n  ]\n```\n\nThe response returns the created work item IDs.\n\n### If provider = jira\n\nCreate each task as a Sub-task (one at a time — no batch creation with parent linking):\n\n```\nmcp__atlassian__jira_create_issue\n  project_key: \"\u003Cjira.project-key>\"\n  issue_type: \"\u003Cjira.child-issue-type>\"    # default: \"Sub-task\"\n  summary: \"\u003Ctask title>\"\n  parent_key: \"\u003Cparent issue key>\"\n  description: \"\"\n```\n\nRepeat for each task. The response returns the created issue key.\n\n## 9. Set Estimates and Assign\n\nAfter creation, set Original Estimate, Remaining Work, and Assigned To on **all newly created tasks**. Also set estimates on existing tasks that had missing estimates (marked `(inferred)` in step 4).\n\n**Assignment rule:** All newly created tasks are assigned to the same person as the parent story (`System.AssignedTo`). If the parent has no assignee, leave tasks unassigned.\n\n```\nmcp__ado__wit_work_item_write\n  action: \"update_batch\"\n  batchUpdates: [\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.OriginalEstimate\",\n      \"value\": \"\u003Chours>\"\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.RemainingWork\",\n      \"value\": \"\u003Chours>\"\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FSystem.AssignedTo\",\n      \"value\": \"\u003Cparent story assignee email or display name>\"\n    },\n    ...for each new task AND each existing task with inferred estimates\n  ]\n```\n\n**Note:** Only set `System.AssignedTo` on **newly created** tasks. Do NOT reassign existing tasks — they may have been intentionally assigned to someone else.\n\n### If provider = jira\n\nFor each created sub-task, set estimates and assignee:\n\n```\nmcp__atlassian__jira_update_issue\n  issue_key: \"\u003Ccreated sub-task key>\"\n  fields: {\n    \"timeoriginalestimate\": \u003Chours * 3600>,\n    \"timeestimate\": \u003Chours * 3600>,\n    \"assignee\": {\"name\": \"\u003Cparent assignee username>\"}\n  }\n```\n\n**Note:** Jira stores time estimates in **seconds**, not hours. Multiply by 3600.\n\nIn **estimate-only mode** (no new tasks), this is the only ADO write operation — skip step 8 entirely. Do NOT change assignment on existing tasks in estimate-only mode.\n\n## 10. Print Summary\n\n```markdown\n## Created \u003CN> Tasks under Story #\u003Cid>\n\n| # | ID | Title | Hours | Link |\n|---|-----|-------|-------|------|\n| 1 | #\u003Cid> | BE - Implement model | 8 | [Open]({scm.org}\u002F{scm.project_url_encoded}\u002F_workitems\u002Fedit\u002F\u003Cid>) |\n| 2 | #\u003Cid> | BE - Unit Tests | 3 | [Open](...) |\n| ... | | | | |\n| | | **Total** | **\u003Cbudget>h** | |\n\nAll tasks linked as children of [#\u003Cstory_id>]({scm.org}\u002F{scm.project_url_encoded}\u002F_workitems\u002Fedit\u002F\u003Cstory_id>).\n```\n\nWhere `{scm.org}` and `{scm.project_url_encoded}` are read from `.ai\u002Fconfig.yaml`.\n\n**If provider = jira:**\n| # | Key | Title | Hours | Link |\n|---|-----|-------|-------|------|\n| 1 | PROJ-124 | BE - Implement model | 8 | [Open]({jira.url}\u002Fbrowse\u002FPROJ-124) |\n\n## Close Mode\n\nWhen the argument contains `close`, this skill closes all open child tasks under the story.\n\n### C1. Load MCP Tools\n\n```\nToolSearch(\"+ado wit\")\n```\n\n### C2. Fetch Parent Story + Children\n\n```\nmcp__ado__wit_work_item\n  action: \"get\"\n  project: \"\u003CADO project from config>\"\n  id: \u003Cwork item ID>\n  expand: \"Relations\"\n```\n\nExtract child Task IDs from relations (`System.LinkTypes.Hierarchy-Forward`).\n\nIf no children found, print \"No child tasks found.\" and STOP.\n\nFetch child details:\n```\nmcp__ado__wit_work_item\n  action: \"get_batch\"\n  project: \"\u003CADO project from config>\"\n  ids: [\u003Cchild IDs>]\n  fields: [\"System.Title\", \"System.WorkItemType\", \"System.State\",\n           \"Microsoft.VSTS.Scheduling.OriginalEstimate\",\n           \"Microsoft.VSTS.Scheduling.RemainingWork\",\n           \"Microsoft.VSTS.Scheduling.CompletedWork\"]\n```\n\nFilter to **Task** type only.\n\n### C3. Determine Which Tasks to Close\n\n**Closeable:** Tasks in state `New`, `Active`, or `In Progress` (not already `Closed`, `Removed`, or `Resolved`).\n\nIf no closeable tasks, print \"All tasks already closed.\" and STOP.\n\n### C4. Verify Development is Done\n\nCheck that development is actually complete before closing:\n\n1. Find spec dir: `bash .ai\u002Flib\u002Fdx-common.sh find-spec-dir \u003Cwork-item-id>`\n2. If `implement.md` exists, check that all steps are `done`\n3. If any steps are NOT `done`, warn:\n   ```\n   ⚠ implement.md has \u003CN> incomplete steps. Close tasks anyway? (y\u002Fn)\n   ```\n   Wait for confirmation.\n\nIf no spec dir or no implement.md, skip this check (user may be closing manually).\n\n### C5. Calculate Time Updates\n\nFor each closeable task, compute the time fields:\n\n```\ncompleted_work_new = (existing CompletedWork or 0) + (existing RemainingWork or 0)\nremaining_work_new = 0\n```\n\nThis moves whatever time was remaining into completed work — the task used its full budget.\n\n### C6. Present Close Plan\n\n```markdown\n## Close Tasks — Story #\u003Cid>\n\n| ID | Title | State | Original | Completed → | Remaining → |\n|----|-------|-------|----------|-------------|-------------|\n| #12345 | BE - Implement model | Active | 8h | 0 → 8h | 8 → 0h |\n| #12346 | FE - PR Review | New | 1h | 0 → 1h | 1 → 0h |\n| #12347 | BE - Unit Tests | Closed | 3h | (already closed) | |\n\n**\u003CN> tasks will be closed.** Proceed? (y\u002Fn)\n```\n\nWait for user confirmation.\n\n### C7. Close Tasks\n\nFor each closeable task, update in this order:\n1. Set Completed Work (add remaining to completed)\n2. Set Remaining Work to 0\n3. Set State to Closed\n\n```\nmcp__ado__wit_work_item_write\n  action: \"update_batch\"\n  batchUpdates: [\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.CompletedWork\",\n      \"value\": \u003Ccompleted_work_new>\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.RemainingWork\",\n      \"value\": 0\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FSystem.State\",\n      \"value\": \"Closed\"\n    },\n    ...for each closeable task\n  ]\n```\n\n### If provider = jira\n\n```\nmcp__atlassian__jira_update_issue\n  issue_key: \"\u003Csub-task key>\"\n  fields: {\n    \"timespent\": \u003Ccompleted_work_new * 3600>,\n    \"timeestimate\": 0\n  }\n  transition: \"Done\"\n```\n\n**Note:** Jira transitions vary by workflow. Use `mcp__atlassian__jira_get_transitions` to find the \"Done\" transition ID if \"Done\" doesn't work by name. Jira stores time in **seconds** — multiply hours by 3600.\n\n### C8. Print Summary\n\n```markdown\n## Closed \u003CN> Tasks under Story #\u003Cid>\n\n| ID | Title | Completed | Previous State |\n|----|-------|-----------|---------------|\n| #12345 | BE - Implement model | 8h | Active |\n| #12346 | FE - PR Review | 1h | New |\n\n**Total completed:** \u003Csum>h\nAll child tasks closed. Remaining work zeroed, time moved to Completed Work.\n```\n\n## Examples\n\n1. `\u002Fdx-req-tasks 2416553` — Fetches story #2416553, infers BE+FE+Authoring groups from the title and description, plans tasks with hours totaling Story Points x 8, presents the breakdown for approval, then creates child Tasks in ADO.\n\n2. `\u002Fdx-req-tasks 2416553 FE` — Creates only Frontend tasks (FE - Implement component rendering, FE - Testing, FE - PR Review) under the story, skipping BE and Authoring groups.\n\n3. `\u002Fdx-req-tasks 2416553` (with existing tasks) — Detects 3 existing child Tasks already consuming 24h of the 40h budget, plans new tasks for the remaining 16h, and fills in missing hour estimates on existing tasks marked `(inferred)`.\n\n4. `\u002Fdx-req-tasks 2416553 close` — Fetches child tasks, checks implement.md steps are all done, shows close plan with time updates (Remaining Work → Completed Work), and after confirmation closes all tasks. Sprint burndown and capacity tracking stay accurate.\n\n## Troubleshooting\n\n- **\"Story has no Story Points set\"**\n  **Cause:** The parent story lacks a Story Points value, which is needed to calculate the hour budget.\n  **Fix:** Set Story Points on the ADO work item first, or answer the prompt with the SP value to use.\n\n- **Budget exceeds or doesn't match total hours**\n  **Cause:** Existing child tasks already exceed the SP x 8 budget, or manual adjustments shifted the total.\n  **Fix:** The skill warns about the mismatch. You can say \"proceed anyway\" or adjust individual task hours in the interactive table before confirming.\n\n- **\"MCP tool not found\" or ADO call fails**\n  **Cause:** ADO MCP tools were not loaded, or the PAT lacks Work Items write permissions.\n  **Fix:** Ensure `.mcp.json` has the ADO server configured (run `\u002Fdx-init` if not). Verify your ADO PAT has \"Work Items: Read & Write\" scope.\n\n## Rules\n\n- **Never create tasks without user approval** — always present the plan first (step 7)\n- **Budget must balance** — total task hours = Story Points × 8h (warn if not, but allow override)\n- **Be pragmatic** — infer groups from title tags and content, only ask if nothing is clear\n- **Respect group filters** — if user specifies groups in arguments, only create those\n- **Copy parent fields** — always set Area Path, Iteration Path, and Assigned To from the parent story\n- **Assign to parent owner** — new tasks are assigned to the same person as the parent story. Never reassign existing tasks.\n- **Task descriptions are empty** — only title and estimates matter\n- **MCP tools are deferred** — always load via ToolSearch before first use\n- **Work item IDs are integers** — pass as numbers to MCP, not strings\n","You create child Task work items under a parent User Story in Azure DevOps or Jira. You read the story, infer which work groups apply (BE, FE, Authoring), plan tasks with hour estimates that match the Story Points budget, present the plan for user approval, then create the tasks via ADO or Jira MCP.\n\n## Defaults\n\nRead `..\u002F..\u002Fshared\u002Fprovider-config.md` for provider detection and field mapping.\n\n1. Read `.ai\u002Fconfig.yaml`\n2. Check `tracker.provider` (preferred) or `scm.provider` (legacy fallback):\n   - `ado` → Azure DevOps (default if not set)\n   - `jira` → Atlassian Jira\n3. Set `provider` variable for branching in subsequent steps.\n\n### If provider = ado\n\n- **Organization:** read from `.ai\u002Fconfig.yaml` `scm.org`\n- **Project:** read from `.ai\u002Fconfig.yaml` `scm.project`\n\n### If provider = jira\n\n- **Jira URL:** read from `.ai\u002Fconfig.yaml` `jira.url`\n- **Project Key:** read from `.ai\u002Fconfig.yaml` `jira.project-key`\n- **Child Issue Type:** read from `.ai\u002Fconfig.yaml` `jira.child-issue-type` (default: `Sub-task`)\n\n## 1. Parse Input\n\nThe first token of `$ARGUMENTS` is the work item ID (numeric for ADO, `KEY-123` for Jira) or a full URL.\n\nIf the user provides a URL, extract the ID\u002Fkey from it. Supported formats:\n- ADO: `https:\u002F\u002Fdev.azure.com\u002F{org}\u002F{project}\u002F_workitems\u002Fedit\u002F{id}`\n- ADO: `https:\u002F\u002F{org}.visualstudio.com\u002F{project}\u002F_workitems\u002Fedit\u002F{id}`\n- Jira: `https:\u002F\u002F{instance}\u002Fbrowse\u002F{KEY-123}`\n\nInput detection (see `..\u002F..\u002Fshared\u002Fprovider-config.md`):\n- Matches `\u002F^[A-Z]+-\\d+$\u002F` → Jira issue key\n- Matches `\u002F^\\d+$\u002F` → numeric ID; check `tracker.provider`\n- Contains `dev.azure.com` or `visualstudio.com` → ADO\n- Contains `\u002Fbrowse\u002F` → Jira\n\nRemaining tokens are optional **group filters**: `BE`, `FE`, `Authoring` (case-insensitive). If provided, only create tasks for those groups.\n\n```\n\u002Fdx-req-tasks 2416553              → all groups (inferred)\n\u002Fdx-req-tasks 2416553 BE           → only BE tasks\n\u002Fdx-req-tasks 2416553 FE BE        → only FE + BE tasks\n\u002Fdx-req-tasks 2416553 Authoring    → only Authoring tasks\n\u002Fdx-req-tasks 2416553 close        → close all child tasks\n```\n\nIf no argument is provided, ask the user for the work item ID.\n\n**If `close` is in the arguments:** Skip steps 2-10. Jump to **Close Mode** (at the end of this skill).\n\n## 2. Load MCP Tools\n\nBefore making any ADO calls, load the required tools:\n\n```\nToolSearch(\"+ado wit\")\n```\n\n## 3. Fetch Parent Story\n\n```\nmcp__ado__wit_work_item\n  action: \"get\"\n  project: \"\u003CADO project from config>\"\n  id: \u003Cwork item ID>\n  expand: \"Relations\"\n```\n\nExtract:\n- **Title** — full title string\n- **Story Points** — `Microsoft.VSTS.Scheduling.StoryPoints` (number)\n- **Area Path** — `System.AreaPath`\n- **Iteration Path** — `System.IterationPath`\n- **Assigned To** — `System.AssignedTo` (the person assigned to the parent story — used to assign child tasks)\n- **Description** — `System.Description` (HTML)\n- **Acceptance Criteria** — `Microsoft.VSTS.Common.AcceptanceCriteria` (HTML)\n- **State** — `System.State`\n- **Existing children** — from relations (`System.LinkTypes.Hierarchy-Forward`)\n\n### If provider = jira\n\n```\nmcp__atlassian__jira_get_issue\n  issue_key: \"\u003Cissue key>\"\n```\n\nMap fields:\n- **Story Points** — `fields.story_points` or `fields.\u003Cjira.custom-fields.story-points>` (read from config)\n- **Components** — `fields.components[].name` (ADO equivalent: Area Path)\n- **Sprint** — `fields.sprint.name` (ADO equivalent: Iteration Path)\n- **Assigned To** — `fields.assignee.displayName`\n- **Existing children** — fetch via JQL: `mcp__atlassian__jira_search` with `parent = \u003Cissue_key> AND issuetype = Sub-task`\n\nIf Story Points is missing or 0, ask the user: \"Story has no Story Points set. How many SP should I use for budget?\"\n\nCalculate **total budget hours** = Story Points × 8.\n\n## 4. Fetch Existing Child Tasks\n\nAlways check for existing children from the relations extracted in step 3. If child IDs exist, fetch their details:\n\n```\nmcp__ado__wit_work_item\n  action: \"get_batch\"\n  project: \"\u003CADO project from config>\"\n  ids: [\u003Cchild IDs>]\n  fields: [\"System.Title\", \"System.WorkItemType\", \"System.State\",\n           \"Microsoft.VSTS.Scheduling.OriginalEstimate\",\n           \"Microsoft.VSTS.Scheduling.RemainingWork\"]\n```\n\nFilter to only **Task** type work items (ignore Bugs, Test Cases, etc.).\n\n### If provider = jira\n\nChildren are fetched in Step 3 via JQL search. For each child sub-task returned:\n- **Key** — issue key (e.g., `PROJ-124`)\n- **Title** — `fields.summary`\n- **State** — `fields.status.name`\n- **Original Estimate** — `fields.timeoriginalestimate` (in seconds — divide by 3600 for hours)\n- **Remaining Work** — `fields.timeestimate` (in seconds — divide by 3600 for hours)\n\nFor each existing Task, record:\n- **ID** — work item number\n- **Title** — to detect group (starts with `BE -`, `FE -`, `Authoring -`)\n- **State** — New, Active, Closed, etc.\n- **Original Estimate** — hours already allocated\n- **Remaining Work** — hours remaining\n\n### Estimate missing hours on existing tasks\n\nIf an existing Task has no OriginalEstimate (null or 0), infer an estimate based on the task title and parent story content:\n\n| Title pattern | Inferred hours |\n|---------------|---------------|\n| `BE - PR Review` or `FE - PR Review` | 1 |\n| `* - Unit Tests` | 3 |\n| `* - Testing` | 2 |\n| `* - Planning` | 1 |\n| `* - Implement *` or other implementation tasks | 8 |\n| `Authoring - *` (any authoring task) | 4 |\n| Anything else unclear | 4 (default) |\n\nMark inferred estimates with `(inferred)` in the display so the user can see which ones were guessed. These inferred values are used for budget calculation and will be proposed for update in the confirmation step.\n\n### Calculate existing budget usage\n\n```\nexisting_hours = sum of OriginalEstimate (actual or inferred) across all existing Tasks\nremaining_budget = (story_points × 8) - existing_hours\n```\n\n### Display existing tasks\n\nIf existing Tasks are found, print them:\n\n```markdown\n### Existing Tasks (\u003Cexisting_count> tasks, \u003Cexisting_hours>h allocated)\n\n| ID | Title | Hours | State |\n|----|-------|-------|-------|\n| #12345 | BE - Implement Sling Model | 8 | Active |\n| #12346 | FE - PR Review | 1 (inferred) | New |\n\n**Budget:** \u003Cbudget>h total, \u003Cexisting_hours>h allocated, **\u003Cremaining_budget>h remaining**\n```\n\nTasks with `(inferred)` hours will have their estimates set in ADO after user confirmation (step 9).\n\n### Determine action\n\n- If `remaining_budget > 0` → plan new tasks for the remaining hours\n- If `remaining_budget = 0` → print \"Budget fully allocated. No new tasks needed.\" and stop (unless user requests specific additions)\n- If `remaining_budget \u003C 0` → warn: \"Existing tasks exceed budget by Xh. Proceed with planning additional tasks anyway?\" Wait for confirmation.\n\n### Avoid duplicates\n\nWhen planning new tasks (step 6), skip any task that already exists by matching title prefix patterns:\n- If `BE - PR Review` already exists → don't create another\n- If `FE - Testing` already exists → don't create another\n- Match on the title pattern, not exact string (e.g., existing `BE - Implement model changes` covers the `BE - Implement` slot)\n\n### Estimate update mode\n\nIf **all groups already have tasks** but some tasks have **no estimates** (OriginalEstimate is null\u002F0), switch to **estimate-only mode**:\n1. Skip task creation (step 8)\n2. Present existing tasks with inferred estimates marked `(inferred)`\n3. After user approval, update estimates on existing tasks via `wit_work_item_write` (`action: \"update_batch\"`) (step 9)\n4. Print summary with updated estimates\n\n### Mixed mode (new tasks + missing estimates)\n\nIf there are **both** existing tasks without estimates **and** remaining budget for new tasks:\n1. Show existing tasks with inferred estimates in the \"Existing Tasks\" section\n2. Show new tasks in the \"New Tasks\" section\n3. After approval, create new tasks (step 8) AND update estimates on existing tasks (step 9) in the same run\n\n## 5. Infer Groups\n\nReference `.claude\u002Frules\u002F` for domain-specific naming conventions and group signals.\n\n### From title tags\n\nParse square bracket tags from the title: `[BE]`, `[FE]`, `[Authoring]`.\n\n- `[BE]` → include BE group\n- `[FE]` → include FE group\n- `[Authoring]` → include Authoring group\n\n### From content (if no tags found)\n\nIf the title has no recognizable tags, analyze the Description and Acceptance Criteria:\n\n| Signal | Group |\n|--------|-------|\n| Mentions model, exporter, Java, service, backend, API, servlet, controller | BE |\n| Mentions frontend, rendering, template, CSS, JavaScript, UI, design, component markup | FE |\n| Mentions dialog, authoring, content author, configuration, CMS | Authoring |\n\nIf nothing is clear from content, default to **all three groups**.\n\n### Apply user filter\n\nIf the user passed group filters in the arguments, override the inferred groups. Only create tasks for the specified groups.\n\n### Component lookup (optional)\n\nIf the story title or description mentions a specific component name and a component index exists (`.ai\u002Fproject\u002Fcomponent-index.md` or `.ai\u002Fcomponent-index.md`), grep it for the component:\n\n```\nGrep(\".ai\u002Fproject\u002Fcomponent-index.md\", \"\u003Ccomponent-name>\")\n```\n\nThis helps generate more specific implementation task titles (e.g., \"BE - Update StarterKitExporter\" instead of generic \"BE - Implement exporter\").\n\n## 6. Plan Tasks\n\nFor each active group, generate tasks. Follow these constraints:\n\n| Group | Max Tasks | Permanent Tasks | Nature |\n|-------|-----------|-----------------|--------|\n| BE | 5 | `BE - PR Review` (1h), `BE - Unit Tests` (2-4h) | Development (models, services) |\n| FE | 5 | `FE - PR Review` (1h), `FE - Testing` (1-2h) | Development (templates, CSS, JS) |\n| Authoring | 2 | *(none — no PR or testing)* | Content authoring (non-development) |\n\n**Authoring is NOT development.** Authoring tasks are for content authors who configure components — editing dialogs, setting up content, verifying pages. There is no code, no PR, no unit tests. Authoring tasks are purely CMS authoring work.\n\n### Implementation tasks (fill remaining slots)\n\nBased on story content, create implementation tasks. Examples:\n\n**BE:**\n- `BE - Implement model` (6-10h)\n- `BE - Update exporter` (6-10h)\n- `BE - Implement service logic` (6-10h)\n\n**FE:**\n- `FE - Implement component rendering` (6-10h)\n- `FE - Implement responsive styles` (6-10h)\n- `FE - Update component template` (6-10h)\n\n**Authoring:**\n- `Authoring - Configure component dialog` (2-4h)\n- `Authoring - Verify authored content` (1-2h)\n\n### Optional tasks (add if budget allows)\n\n- `BE - Planning` or `FE - Planning` (1-2h) — only if story is complex (3+ SP)\n\n### Hour distribution rules\n\n1. Total hours across ALL tasks MUST equal Story Points × 8\n2. PR Review tasks: always 1h each\n3. Testing\u002FUnit Tests: 1-4h depending on complexity\n4. Implementation tasks: 6-10h (typically 8h)\n5. Planning: 1-2h\n6. Distribute remaining hours by adjusting implementation task estimates\n7. If budget is tight, reduce implementation task count rather than making tiny tasks\n8. Minimum task estimate: 1h\n\n### Distribution algorithm\n\n```\ntotal_budget = story_points × 8\nexisting_hours = sum of OriginalEstimate from existing child Tasks (step 4)\nremaining_budget = total_budget - existing_hours\ngroups = active groups (1-3), minus groups fully covered by existing tasks\n\n# Split remaining_budget proportionally across groups that need new tasks\nif all 3 groups need tasks:\n  BE gets ~45%, FE gets ~40%, Authoring gets ~15%\nif BE + FE only:\n  BE gets ~50%, FE gets ~50%\nif single group:\n  that group gets 100%\n\n# Within each group:\n1. Skip permanent tasks that already exist (matched in step 4)\n2. Allocate remaining permanent tasks first (PR Review 1h, Testing\u002FUnit Tests)\n3. Fill remaining group budget with implementation tasks\n4. Adjust implementation task hours to consume exact remaining_budget\n```\n\n## 7. Present Plan for Approval\n\nPrint the task breakdown table. If existing tasks were found, show both sections:\n\n```markdown\n## Task Breakdown — Story #\u003Cid> (\u003Cstory_points> SP = \u003Cbudget>h)\n\n**\u003CStory Title>**\n**Groups:** BE, FE, Authoring\n**Area Path:** \u003Carea_path>\n**Iteration:** \u003Citeration_path>\n\n### Existing Tasks (already in ADO)\n\n| ID | Group | Title | Hours | State |\n|----|-------|-------|-------|-------|\n| #12345 | BE | BE - Implement model | 8 | Active |\n| #12346 | FE | FE - PR Review | 1 | New |\n| | | **Subtotal** | **9** | |\n\n### New Tasks (to be created)\n\n| # | Group | Task Title | Hours |\n|---|-------|-----------|-------|\n| 1 | BE | BE - Unit Tests | 3 |\n| 2 | BE | BE - PR Review | 1 |\n| 3 | FE | FE - Implement component rendering | 8 |\n| 4 | FE | FE - Testing | 2 |\n| 5 | Authoring | Authoring - Configure dialog | 4 |\n| 6 | Authoring | Authoring - PR Review | 1 |\n| | | **Subtotal** | **19** |\n\n> **Budget:** 28h (3.5 SP × 8h) = 9h existing + 19h new ✓ Balanced\n\nWant to adjust? You can:\n- Remove a task: \"remove #5\"\n- Add a task: \"add FE - Update styles 4h\"\n- Change hours: \"#4 to 6h\"\n- Change title: \"#1 title BE - Update model\"\n- Or say **\"go\"** to create all tasks in ADO\n```\n\nIf no existing tasks, omit the \"Existing Tasks\" section and show only \"New Tasks\".\n\n### Handle adjustments\n\nIf the user requests changes:\n1. Apply the changes to the plan\n2. **Recalculate** total hours\n3. If total no longer matches budget, warn: \"Total is now Xh but budget is Yh. Adjust other tasks to balance, or proceed anyway?\"\n4. Re-print the updated table\n5. Ask for confirmation again\n\nRepeat until the user says \"go\", \"create\", \"yes\", \"looks good\", or similar affirmation.\n\n## 8. Create Tasks in ADO\n\nOnce approved, create all tasks as children of the parent story:\n\n```\nmcp__ado__wit_work_item_write\n  action: \"add_child\"\n  parentId: \u003Cstory ID>\n  project: \"\u003CADO project from config>\"\n  workItemType: \"Task\"\n  items: [\n    {\n      \"title\": \"\u003Ctask title>\",\n      \"description\": \"\",\n      \"areaPath\": \"\u003Cfrom parent>\",\n      \"iterationPath\": \"\u003Cfrom parent>\"\n    },\n    ...for each task\n  ]\n```\n\nThe response returns the created work item IDs.\n\n### If provider = jira\n\nCreate each task as a Sub-task (one at a time — no batch creation with parent linking):\n\n```\nmcp__atlassian__jira_create_issue\n  project_key: \"\u003Cjira.project-key>\"\n  issue_type: \"\u003Cjira.child-issue-type>\"    # default: \"Sub-task\"\n  summary: \"\u003Ctask title>\"\n  parent_key: \"\u003Cparent issue key>\"\n  description: \"\"\n```\n\nRepeat for each task. The response returns the created issue key.\n\n## 9. Set Estimates and Assign\n\nAfter creation, set Original Estimate, Remaining Work, and Assigned To on **all newly created tasks**. Also set estimates on existing tasks that had missing estimates (marked `(inferred)` in step 4).\n\n**Assignment rule:** All newly created tasks are assigned to the same person as the parent story (`System.AssignedTo`). If the parent has no assignee, leave tasks unassigned.\n\n```\nmcp__ado__wit_work_item_write\n  action: \"update_batch\"\n  batchUpdates: [\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.OriginalEstimate\",\n      \"value\": \"\u003Chours>\"\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.RemainingWork\",\n      \"value\": \"\u003Chours>\"\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FSystem.AssignedTo\",\n      \"value\": \"\u003Cparent story assignee email or display name>\"\n    },\n    ...for each new task AND each existing task with inferred estimates\n  ]\n```\n\n**Note:** Only set `System.AssignedTo` on **newly created** tasks. Do NOT reassign existing tasks — they may have been intentionally assigned to someone else.\n\n### If provider = jira\n\nFor each created sub-task, set estimates and assignee:\n\n```\nmcp__atlassian__jira_update_issue\n  issue_key: \"\u003Ccreated sub-task key>\"\n  fields: {\n    \"timeoriginalestimate\": \u003Chours * 3600>,\n    \"timeestimate\": \u003Chours * 3600>,\n    \"assignee\": {\"name\": \"\u003Cparent assignee username>\"}\n  }\n```\n\n**Note:** Jira stores time estimates in **seconds**, not hours. Multiply by 3600.\n\nIn **estimate-only mode** (no new tasks), this is the only ADO write operation — skip step 8 entirely. Do NOT change assignment on existing tasks in estimate-only mode.\n\n## 10. Print Summary\n\n```markdown\n## Created \u003CN> Tasks under Story #\u003Cid>\n\n| # | ID | Title | Hours | Link |\n|---|-----|-------|-------|------|\n| 1 | #\u003Cid> | BE - Implement model | 8 | [Open]({scm.org}\u002F{scm.project_url_encoded}\u002F_workitems\u002Fedit\u002F\u003Cid>) |\n| 2 | #\u003Cid> | BE - Unit Tests | 3 | [Open](...) |\n| ... | | | | |\n| | | **Total** | **\u003Cbudget>h** | |\n\nAll tasks linked as children of [#\u003Cstory_id>]({scm.org}\u002F{scm.project_url_encoded}\u002F_workitems\u002Fedit\u002F\u003Cstory_id>).\n```\n\nWhere `{scm.org}` and `{scm.project_url_encoded}` are read from `.ai\u002Fconfig.yaml`.\n\n**If provider = jira:**\n| # | Key | Title | Hours | Link |\n|---|-----|-------|-------|------|\n| 1 | PROJ-124 | BE - Implement model | 8 | [Open]({jira.url}\u002Fbrowse\u002FPROJ-124) |\n\n## Close Mode\n\nWhen the argument contains `close`, this skill closes all open child tasks under the story.\n\n### C1. Load MCP Tools\n\n```\nToolSearch(\"+ado wit\")\n```\n\n### C2. Fetch Parent Story + Children\n\n```\nmcp__ado__wit_work_item\n  action: \"get\"\n  project: \"\u003CADO project from config>\"\n  id: \u003Cwork item ID>\n  expand: \"Relations\"\n```\n\nExtract child Task IDs from relations (`System.LinkTypes.Hierarchy-Forward`).\n\nIf no children found, print \"No child tasks found.\" and STOP.\n\nFetch child details:\n```\nmcp__ado__wit_work_item\n  action: \"get_batch\"\n  project: \"\u003CADO project from config>\"\n  ids: [\u003Cchild IDs>]\n  fields: [\"System.Title\", \"System.WorkItemType\", \"System.State\",\n           \"Microsoft.VSTS.Scheduling.OriginalEstimate\",\n           \"Microsoft.VSTS.Scheduling.RemainingWork\",\n           \"Microsoft.VSTS.Scheduling.CompletedWork\"]\n```\n\nFilter to **Task** type only.\n\n### C3. Determine Which Tasks to Close\n\n**Closeable:** Tasks in state `New`, `Active`, or `In Progress` (not already `Closed`, `Removed`, or `Resolved`).\n\nIf no closeable tasks, print \"All tasks already closed.\" and STOP.\n\n### C4. Verify Development is Done\n\nCheck that development is actually complete before closing:\n\n1. Find spec dir: `bash .ai\u002Flib\u002Fdx-common.sh find-spec-dir \u003Cwork-item-id>`\n2. If `implement.md` exists, check that all steps are `done`\n3. If any steps are NOT `done`, warn:\n   ```\n   ⚠ implement.md has \u003CN> incomplete steps. Close tasks anyway? (y\u002Fn)\n   ```\n   Wait for confirmation.\n\nIf no spec dir or no implement.md, skip this check (user may be closing manually).\n\n### C5. Calculate Time Updates\n\nFor each closeable task, compute the time fields:\n\n```\ncompleted_work_new = (existing CompletedWork or 0) + (existing RemainingWork or 0)\nremaining_work_new = 0\n```\n\nThis moves whatever time was remaining into completed work — the task used its full budget.\n\n### C6. Present Close Plan\n\n```markdown\n## Close Tasks — Story #\u003Cid>\n\n| ID | Title | State | Original | Completed → | Remaining → |\n|----|-------|-------|----------|-------------|-------------|\n| #12345 | BE - Implement model | Active | 8h | 0 → 8h | 8 → 0h |\n| #12346 | FE - PR Review | New | 1h | 0 → 1h | 1 → 0h |\n| #12347 | BE - Unit Tests | Closed | 3h | (already closed) | |\n\n**\u003CN> tasks will be closed.** Proceed? (y\u002Fn)\n```\n\nWait for user confirmation.\n\n### C7. Close Tasks\n\nFor each closeable task, update in this order:\n1. Set Completed Work (add remaining to completed)\n2. Set Remaining Work to 0\n3. Set State to Closed\n\n```\nmcp__ado__wit_work_item_write\n  action: \"update_batch\"\n  batchUpdates: [\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.CompletedWork\",\n      \"value\": \u003Ccompleted_work_new>\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FMicrosoft.VSTS.Scheduling.RemainingWork\",\n      \"value\": 0\n    },\n    {\n      \"id\": \u003Ctask ID>,\n      \"path\": \"\u002Ffields\u002FSystem.State\",\n      \"value\": \"Closed\"\n    },\n    ...for each closeable task\n  ]\n```\n\n### If provider = jira\n\n```\nmcp__atlassian__jira_update_issue\n  issue_key: \"\u003Csub-task key>\"\n  fields: {\n    \"timespent\": \u003Ccompleted_work_new * 3600>,\n    \"timeestimate\": 0\n  }\n  transition: \"Done\"\n```\n\n**Note:** Jira transitions vary by workflow. Use `mcp__atlassian__jira_get_transitions` to find the \"Done\" transition ID if \"Done\" doesn't work by name. Jira stores time in **seconds** — multiply hours by 3600.\n\n### C8. Print Summary\n\n```markdown\n## Closed \u003CN> Tasks under Story #\u003Cid>\n\n| ID | Title | Completed | Previous State |\n|----|-------|-----------|---------------|\n| #12345 | BE - Implement model | 8h | Active |\n| #12346 | FE - PR Review | 1h | New |\n\n**Total completed:** \u003Csum>h\nAll child tasks closed. Remaining work zeroed, time moved to Completed Work.\n```\n\n## Examples\n\n1. `\u002Fdx-req-tasks 2416553` — Fetches story #2416553, infers BE+FE+Authoring groups from the title and description, plans tasks with hours totaling Story Points x 8, presents the breakdown for approval, then creates child Tasks in ADO.\n\n2. `\u002Fdx-req-tasks 2416553 FE` — Creates only Frontend tasks (FE - Implement component rendering, FE - Testing, FE - PR Review) under the story, skipping BE and Authoring groups.\n\n3. `\u002Fdx-req-tasks 2416553` (with existing tasks) — Detects 3 existing child Tasks already consuming 24h of the 40h budget, plans new tasks for the remaining 16h, and fills in missing hour estimates on existing tasks marked `(inferred)`.\n\n4. `\u002Fdx-req-tasks 2416553 close` — Fetches child tasks, checks implement.md steps are all done, shows close plan with time updates (Remaining Work → Completed Work), and after confirmation closes all tasks. Sprint burndown and capacity tracking stay accurate.\n\n## Troubleshooting\n\n- **\"Story has no Story Points set\"**\n  **Cause:** The parent story lacks a Story Points value, which is needed to calculate the hour budget.\n  **Fix:** Set Story Points on the ADO work item first, or answer the prompt with the SP value to use.\n\n- **Budget exceeds or doesn't match total hours**\n  **Cause:** Existing child tasks already exceed the SP x 8 budget, or manual adjustments shifted the total.\n  **Fix:** The skill warns about the mismatch. You can say \"proceed anyway\" or adjust individual task hours in the interactive table before confirming.\n\n- **\"MCP tool not found\" or ADO call fails**\n  **Cause:** ADO MCP tools were not loaded, or the PAT lacks Work Items write permissions.\n  **Fix:** Ensure `.mcp.json` has the ADO server configured (run `\u002Fdx-init` if not). Verify your ADO PAT has \"Work Items: Read & Write\" scope.\n\n## Rules\n\n- **Never create tasks without user approval** — always present the plan first (step 7)\n- **Budget must balance** — total task hours = Story Points × 8h (warn if not, but allow override)\n- **Be pragmatic** — infer groups from title tags and content, only ask if nothing is clear\n- **Respect group filters** — if user specifies groups in arguments, only create those\n- **Copy parent fields** — always set Area Path, Iteration Path, and Assigned To from the parent story\n- **Assign to parent owner** — new tasks are assigned to the same person as the parent story. Never reassign existing tasks.\n- **Task descriptions are empty** — only title and estimates matter\n- **MCP tools are deferred** — always load via ToolSearch before first use\n- **Work item IDs are integers** — pass as numbers to MCP, not strings\n",{"name":5,"description":7,"allowed-tools":44,"argument-hint":48},[33,30,37,32,45,46,47],"agent","ado\u002F*","atlassian\u002F*","[Work Item ID] [BE|FE|Authoring] or [Work Item ID] close","main","5c642842a92100dc7561ae0682a152a74846e186","plugins\u002Fdx-core\u002Fskills\u002Fdx-req-tasks",3,"https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow","https:\u002F\u002Fgithub.com\u002Feasingthemes","https:\u002F\u002Fwww.linkedin.com\u002Fin\u002Fdraganfilipovic\u002F","Agentic SDLC platform in production. I build agent-ready codebases. AEM MCP Server author.","2026-11-11 09:59:48",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add easingthemes\u002Fdx-aem-flow --skill dx-req-tasks",{"tool":64,"command":65},"bunx","bunx skills add easingthemes\u002Fdx-aem-flow --skill dx-req-tasks",{"tool":67,"command":68},"pnpm","pnpm dlx skills add easingthemes\u002Fdx-aem-flow --skill dx-req-tasks","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-core\u002Fskills\u002Fdx-req-tasks\u002FSKILL.md",true,[],[73,95,116,133,149,164],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":39},"01M6H48W19F46A7B7TSSQAMYRW","dx-hub-status","Show hub dispatch status — which repos are running, done, blocked or failed. Use for 'hub status', 'what's running'.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-status\u002FSKILL.md",[],[20,80,81,82,83,84,85,24,86,87,88,89,90,91,92,33,32,93,94],"dx hub status","hub","status","hub status","which","show","ticket","clean","use","done","Bash","id","dispatch","repos","grep",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":39},"01M6H48R6ZH7YMVPMVWMMWT3RA","dx-hub-init","Initialize a hub directory for multi-repo orchestration. Discovers sibling repos, merges configs, validates CLI compatibility. Use when setting up hub mode for the first time. Trigger on \"init hub\", \"set up hub\", \"multi-repo setup\".","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-init\u002FSKILL.md",[],[102,103,20,104,81,105,106,107,108,109,110,111,112,113,90,114,115,33,32,30],"init","hub init","dx hub init","SET","time","mode","default","up","repo setup","orchestration","configure","multi-repo","cli","directory",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":39},"01M6H48K267CWEF8YNN3Y49BVT","dx-hub-dispatch","Dispatch a ticket to several repos — open an independent Claude session per repo in VS Code terminals. Use for 'hub dispatch', 'work on ticket across repos'.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-dispatch\u002FSKILL.md",[],[20,123,92,81,27,24,124,125,126,86,127,128,88,129,90,130,131,132,91,35],"dx hub dispatch","repo","work on","session","open","MCP","URL","vscode","code","across",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"01M6H48FAWKTT6AAWT3H80ZKE0","dx-hub-config","View and edit hub configuration — add repos, adjust terminal delay. Use to manage hub settings. Trigger on \"hub config\", \"add repo to hub\", \"terminal delay\".","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-hub-config\u002FSKILL.md",[],[20,140,81,141,85,142,124,143,144,145,146,88,112,90,147,33,148,32,30,93],"dx hub config","config","view","manage","trigger","true","adjust","terminal","settings",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":39},"01M6H48BNMYEJY6CCWPYHNQDAT","dx-discover-repos","Resolve which repos a work item touches (explicit directive → simple block → cross-repo table → LLM). Used by the KAI-HUB router to fan an agent out across repos; 'which repos'.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-hub\u002Fskills\u002Fdx-discover-repos\u002FSKILL.md",[],[156,20,157,93,84,124,132,158,91,159,35,160,81,161,162,163],"discover","dx discover repos","router","directive","simple","block","sonnet","table",{"skillNo":165,"name":166,"nameZh":6,"description":167,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":39},"01M6H487QA1FDSBT1HTZGW4HAQ","dx-upgrade","Upgrade a consumer project to the installed plugin versions — run dx-doctor, fix stale and missing files, list manual actions. Use after upgrading plugins.","https:\u002F\u002Fgithub.com\u002Feasingthemes\u002Fdx-aem-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fdx-core\u002Fskills\u002Fdx-upgrade\u002FSKILL.md",[],[171,20,172,173,174,37,175,176,177,178,33,32,30,179,180,181,182,88,183,184],"upgrade","dx upgrade","project","actions","fix","files","auto","run","list","doctor","manual","missing","plugin","plugins"]