agentleFS
BostonOrangeBostonOrange/claude-code-framework/skills/refine-story/SKILL.md

refine-story

Skill2 starsChanged 6 months agoMITView on GitHub

Ticket refinement and gap analysis - analyzes existing tickets, identifies gaps, scans codebase, and generates refined documentation. Use when improving existing tickets or doing a quick gap check.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run gap analysis (quick scan + gap report)

    line 17
  2. Distinctive:

    If gaps found, present gap report and collaborate to fill

    line 18
  3. Distinctive:

    Search for affected components in the codebase to ground the analysis.

    line 77
  4. Distinctive:

    After updating local docs, sync to tracker.

    line 98
  5. Distinctive:

    Check if ticket exists → create if not, update if yes

    line 99
  6. Distinctive:

    If tracker was updated since last local commit, compare and merge

    line 100

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Story Refinement

Refine existing tickets for the development team. Write for a technical audience — direct, concise, specific identifiers.

When to use this vs /draft-story:

  • /refine-story — Existing ticket that needs improvement
  • /draft-story — New requirements or design document → create new tickets

Process

  1. User provides ticket content or ID
  2. Run gap analysis (quick scan + gap report)
  3. If gaps found, present gap report and collaborate to fill
  4. Generate docs in docs/stories/TICKET-{id}/

Step 1: Gap Analysis

Gap Report Template

Technical Gaps

Gap TypeStatusDetails
Field/property specificationsOK / Missing{missing}
Entity relationshipsOK / Missing{missing}
Type definitionsOK / Missing{missing}
Enum/picklist valuesOK / Missing{missing}

Business Logic Gaps

Gap TypeStatusDetails
Trigger conditionsOK / Missing{missing}
Calculation formulasOK / Missing{missing}
Workflow stepsOK / Missing{missing}
Validation rulesOK / Missing{missing}

Integration Gaps

SystemStatusDetails
{External System 1}OK / Missing / N/A{missing}
{External System 2}OK / Missing / N/A{missing}

Security Gaps

Gap TypeStatusDetails
Access controlOK / Missing{missing}
Field-level securityOK / Missing{missing}
Sharing/visibility rulesOK / Missing{missing}

Testing Gaps

Gap TypeStatusDetails
Acceptance criteria testableOK / Missing{missing}
Edge cases definedOK / Missing{missing}
Error scenariosOK / Missing{missing}

Readiness Summary

Refinement Status: Ready / Needs Minor Refinement / Needs Major Refinement

Priority Questions:

  1. {Most critical}
  2. {Second}
  3. {etc.}

Step 2: Codebase Scan

Search for affected components in the codebase to ground the analysis.

If the ticket involves libraries or frameworks, fetch documentation using the /fetch-docs skill pattern (resolve-library-id then get-library-docs) to verify API capabilities and catch any assumptions based on outdated behavior. This is especially important for integration gaps — knowing the real API surface prevents specifying features that don't exist.

Step 3: Collaborate & Fill Gaps

Present gap report. Work through priority questions before drafting.

Step 4: Output Files

Create in docs/stories/TICKET-{id}/:

FilePurpose
story.mdTicket with ACs, technical spec
solutions-components.mdComponents changed/created
how-to-test.mdTest instructions
manual-steps.mdManual pre/post deployment steps

Step 5: Tracker Sync

After updating local docs, sync to tracker. Follow write-to-tracker rule:

  1. Check if ticket exists → create if not, update if yes
  2. If tracker was updated since last local commit, compare and merge
  3. Push updated content

Quality Checklist

  • Specific mappings with identifiers (not display names)
  • Explicit values verified from source of truth
  • Clear relationships with entity names
  • Trigger conditions defined
  • No verbose Given/When/Then

Related Skills

  • /draft-story - New tickets from requirements
  • /check-readiness - Automated readiness validation
  • Domain skills - Project-specific context

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.