j.close-story

Closes scrum stories by verifying task states and writing git diff metrics to board frontmatter.

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/samwelmunga/jenga-npm --skill j-close-story-samwelmunga
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: j.close-story
Source: https://github.com/samwelmunga/jenga-npm/tree/main/.agents/skills/j-close-story
Command: npx skills add https://github.com/samwelmunga/jenga-npm --skill j-close-story-samwelmunga

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Closing a story in an AI-assisted scrum workflow requires manually verifying every task reached a terminal state, digging through git history for actual change metrics, and updating Markdown board files by hand — error-prone busywork that this Skill automates end to end. ## Core Features & Use Cases - Terminal-State Guard: Verifies every task in a story's frontmatter is Passed or Done before allowing closure, halting with a blocking report otherwise. - Actual Diff Metrics: Extracts per-task actual_files_changed and actual_lines_delta from EST-tagged git commits and writes them into task frontmatter, using a full-credit attribution model for bundle commits. - Scope Divergence & Privatized Checks: Computes scope_divergence_flag against configurable thresholds and statically tests each ticket's touched files against .publicignore, marking fully blocklisted tickets as Privatized and logging Publicized/Privatized mismatches to the event log. - Use Case: After the Tester marks all tasks of story E32_S06 as Passed, run the close flow to stamp real diff stats onto every task, flag any task that exceeded its declared execution scope, and set the story status to Done with a completion date. ## Quick Start Ask the agent to close story E32_S06 so it verifies task states, records diff statistics, and marks the story Done on the board.

Frequently Asked Questions about j.close-story

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I close a story on a Markdown scrum board?▼

Run the close-story flow with the story ID, such as /close-story E32_S06. It first verifies every task in the story's frontmatter is Passed or Done, then writes diff stats and sets the story status to Done with a completion date.

How are actual diff stats extracted per task from git history?▼

The script searches git log for commits whose messages contain the task ID (e.g. E32_S06_T01), aggregates files changed and line deltas across matched commits, and writes actual_files_changed and actual_lines_delta into the task's frontmatter.

What happens when one commit covers multiple tasks?▼

Bundle commits use a full-credit attribution model: each task ID matched in the commit message receives the commit's full diff stats. This means summed line deltas across tasks can exceed the true total for stories using bundle commits.

Why did my story close as Privatized instead of Done?▼

A static check tests every file touched by the ticket's commits against .publicignore. If all touched files are permanently excluded from the public mirror, the ticket is marked Privatized, which supersedes Done as the terminal status.

What is the scope divergence flag on closed tasks?▼

The flag compares actual diff stats against thresholds in project/configs/scope-thresholds.json. Inline-scope tasks diverge when files or lines exceed their limits, story-scope tasks when files exceed the story limit; task and epic scopes never flag.

Why does close-story refuse to close my story?▼

The guard script exits with an error if any task in the story's tasks list is missing, lacks a status field, or has a status other than Passed or Done. It reports each blocking task so you can resolve them before retrying.