skills/prepare-issue-context/SKILL.md
Use when preparing data and context before /resolve-issue, TDD, or CR runs. Loads the assignment, extracts every concrete user scenario from the task description and acceptance criteria, maps each scenario to the codebase, seeds the development database with the records needed to reproduce the bug or feature end-to-end, and reports any gap that would force the implementing agent to hallucinate.
npx skillsauth add pekral/cursor-rules prepare-issue-contextInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
De-risk the next implementation step (/resolve-issue, TDD, or CR) by front-loading the data and codebase context the agent needs to act without hallucinating. The skill ends with one of two states: ready (the development database holds every record the assignment scenarios refer to, and every scenario is mapped to a concrete code path) or blocked (a gap exists — the calling skill must stop and surface the gap to the user instead of guessing).
@rules/php/core-standards.mdc@rules/git/general.mdc@rules/jira/general.mdc when the assignment lives in JIRA@rules/laravel/laravel.mdc, @rules/laravel/architecture.mdc, @rules/laravel/filament.mdc, and @rules/laravel/livewire.mdcdatabase/seeders/, database/factories/, or a scratch directory; insert rows into the development database; create scratch Pest tests that reproduce the bug. It is never allowed to mutate the production database, run destructive migrations, drop tables, push to the remote, or modify code in src/ / app/ outside of seed-only fixtures.+420604240203-style sentinels, qa-* aliases) explicitly tagged as such.@rules/reports/general.mdc — when a context-preparation summary is published to the tracker (via @skills/pr-summary/SKILL.md), it must be written in the language of the source assignment. The in-conversation ready / blocked status is allowed to stay in English./resolve-issue, /test-driven-development, or any skill that wraps them, and the assignment is non-trivial (multi-scenario, references states / branches / external data)./code-review, /code-review-github, /code-review-jira) is about to start and the reviewer needs to confirm the PR satisfies real assignment scenarios — the CR uses this skill as a pre-flight to verify the developer working set contains enough fixture data to actually reproduce the scenarios named in the assignment, instead of accepting the diff on its face.Do not run this skill for tasks that are obviously stateless (formatting, dependency bumps, docs-only changes).
ASSIGNMENT_REF — required. Issue / JIRA / Bugsnag URL or ID. The same identifier /resolve-issue would accept.MODE — optional. One of resolve-issue (default), tdd, cr. Selects the depth of seeding (see step 5).SCOPE — optional. When the caller already knows which scenarios are in scope, pass the scenario numbers / titles to skip the extraction step.@skills/resolve-issue/references/source-detection.md.skills/code-review-github/scripts/load-issue.sh or skills/code-review-jira/scripts/load-issue.sh. Never call gh, acli, or REST endpoints directly.body / descriptionText, every entry in comments[], every attachment URL, and the linked PRs.@skills/resolve-issue/SKILL.md Comment analysis — keep only the current requirements.For every numbered step, bullet, or paragraph in the Jak otestovat / How to test / acceptance-criteria section of the assignment, record one scenario:
Output the list as a numbered table the rest of the steps refer to.
For each scenario from step 2, locate the concrete code path that owns the behavior:
@rules/laravel/architecture.mdc (or the project-equivalent layer) called from the entry point.When the mapping cannot be made (no matching entry point in the codebase, ambiguous between two services, named entity does not exist), record the scenario as a mapping gap — see step 6.
For every scenario that mapped cleanly in step 3, enumerate the records that must exist in the development database before the scenario can be exercised:
qa-cz-1);created_at, sent_at, delivered_at) set explicitly inside / outside the boundary window — never now, never a random factory value.Group the inventory by table; deduplicate records shared across scenarios.
Run only against the development database — never staging, never production.
database/seeders/ Laravel seeders, model factories under database/factories/, custom Tinker scripts referenced from README.md / CLAUDE.md, fixture loaders for non-Laravel projects (Doctrine fixtures, scratch SQL files). Prefer the project convention; do not introduce a new mechanism unless none exists.Prepare<IssueKey>ContextSeeder (Laravel) or the project equivalent. Keep them under a scratch namespace (e.g. database/seeders/Scratch/) so the caller can delete them after the work is done.resolve-issue (default) — seed every scenario inventory.tdd — seed only the scenarios the caller will use for the RED test (passed via SCOPE); skip the rest so the failing test stays focused.cr — do not insert anything; instead, run the queries the assignment scenarios depend on against the existing dev database and record which scenarios already have realistic data and which would require a new seed. The CR caller decides whether to proceed.Combine everything from steps 2–5 into a single gap list:
Every gap entry must include: the scenario number, what is missing, the exact source of the missing piece (assignment line / code path / table column), and whether the caller can proceed without it.
resolve-issue or tdd)For each scenario without gaps, run a one-shot reproduction against the seeded dev database:
Capture the reproduction step verbatim — entry point, inputs, observed output. The implementing skill will reuse it for the failing test.
Two destinations:
ready or blocked: <count> open gap(s). When blocked, list the gaps as a bulleted checklist so the caller can stop immediately.resolve-issue and at least one gap was filled or one scenario mapped non-trivially): delegate the comment to @skills/pr-summary/SKILL.md. Pass through the assignment URL, the scenario / gap table, the seed plan, and the seeded record counts so the published comment carries the uniform Authors / Available behind / Summary of changes / How to test contract and the testers know which dev-DB state was prepared for them. The non-technical comment never contains code identifiers, file paths, or seed-class names — those stay in the in-conversation report.@skills/resolve-issue/SKILL.md — invoke this skill as a pre-flight between Required approach → Comment analysis and Problem analysis. The caller must abort the resolve flow when the status is blocked and surface the gaps to the user.@skills/test-driven-development/SKILL.md — invoke this skill before the first RED step. The seeded dev database becomes the source of truth for the failing test; the reproduction record from step 7 becomes the test's arrange block.@skills/code-review/SKILL.md / code-review-github / code-review-jira — invoke this skill with MODE=cr as part of Specialized Reviews (alongside assignment-compliance-check). The CR uses the gap report to validate that the PR actually addresses the real assignment scenarios — not just the diff in isolation. CR mode never seeds; it audits.@skills/assignment-compliance-check/SKILL.md — consumes the scenario table from step 2 directly. When this skill runs before compliance-check, the latter reuses the mapping in step 3 instead of re-deriving it.cr mode, the query results were captured).ready or blocked: <count> open gap(s) with the full gap list.MODE=resolve-issue and the caller proceeded, the non-technical tracker comment was delegated to @skills/pr-summary/SKILL.md and posted on the originating tracker.development
Use when autonomously resolving the oldest open GitHub issue end-to-end. Picks the oldest open issue (optionally filtered by label, default `Resolve_by_AI`), delegates resolution to `resolve-issue`, then runs `code-review-github`, `process-code-review`, and `merge-github-pr` on the resulting pull request. Stops and reports any blocker (merge conflict, failing CI, unresolved Critical/Moderate findings) instead of force-merging.
testing
Use when performing a focused security review for Laravel/PHP projects. Prioritize real exploitability, business logic flaws, and high-risk vulnerabilities.
testing
Use when resolving an issue from any supported tracker (GitHub, JIRA, Bugsnag). Detects the source automatically from the provided link or ID, implements a safe fix or feature, validates with tests, and creates a pull request.
development
Use when refactoring controller, job, command, listener, or Livewire entry-point logic into a dedicated Action class while preserving behavior and response contracts.