issue-craft
Skill2 starsChanged 3 months agoMITView on GitHub
Phase 3 of ACF. Crafts a context-rich GitHub issue with structured labels, acceptance criteria referencing test commands and CI checks, and compressed body. Use when ACF delegates issue creation, or when the user asks to "create an issue", "craft an issue", or "write a contextualized issue".
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- context-loadSkill
- stack-auditSkill
- pr-contextSkill
- frontend-previewSkill
- label-metadataSkill
- compactionSkill
- cavemanSkill
- graph-scopeSkill
- acfSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Every crafted issue MUST have:
- Distinctive: line 129
If stack-audit found a library opportunity:
- Distinctive: line 131
Create the main issue (the actual change)
- Distinctive: line 132
Create a separate enhancement issue:
- Distinctive: line 152
Before creating an issue, validate that the required labels exist in the repo:
- Distinctive: line 161
Validate label assignment: every crafted issue MUST have at minimum:
- Very specific: line 166
If any of these three categories is missing, add needs-metadata label and flag the issue for review.
- Very specific: line 188
ghnot authenticated: run gh auth status. If not authed, report "gh not authenticated — run gh auth login and retry." Save the draft. - Very specific: line 190
GitHub API rate limits: if gh issue create fails with a rate limit error, save the draft and report "Rate limited — retry after [reset …
- Very specific: line 195
Commands fail: if gh issue create fails for any other reason (network, permissions), save the draft and report the error.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Issue-Craft
Produces issues that give an AI agent (or human) everything needed to implement and verify a change — without reading the entire codebase.
Prerequisites
- Context-load snapshot is complete (phase 1)
- Stack-audit findings are available (phase 2)
Issue Structure
Every crafted issue MUST have:
Title
<type>: <concise description>Types: feat, fix, docs, refactor, chore, test, security
Labels (from label-metadata)
- Type label:
bug,enhancement,documentation,refactor,chore,test,security - Priority label:
priority:P0|priority:P1|priority:P2|priority:P3 - Area label:
area:backend|area:frontend|area:ci|area:docs|area:security|area:devops - Status label:
ready-to-implement(if ready for autonomous work) |needs-human(if it requires a human decision) |blocked(if blocked by a dependency) - Enhancement label (if applicable):
library-review(separate lib issue) |batch-delivery(>2 AC, needs decomposition)
Type → Label Mapping
The issue title prefix maps to a type label:
| Title prefix | Type label | Description |
feat: | enhancement | New feature or improvement |
fix: | bug | Bug fix |
docs: | documentation | Documentation change |
refactor: | refactor | Code reorganization, no behavior change |
chore: | chore | Build, CI, deps, tooling |
test: | test | Test additions or infrastructure |
security: | security | Security fix or hardening |
Body (compressed)
## Summary
[1-2 sentences: what is broken or missing]
## Context
- Architecture: [path to architecture doc, not inline]
- Related: #[issue numbers from stack-audit, if any]
## Affected Files (best guess)
- `path/to/likely/file1`
- `path/to/likely/file2`
## Acceptance Criteria
- [ ] [Specific, verifiable behavior — reference file:function]
- [ ] [Test added in `path/to/test_file` reproducing/verifying the change]
- [ ] [N tests pass — `exact test command from context-load`]
- [ ] [CI check name passes — e.g., "test (lune)"]
- [ ] [Convention rule from AGENTS.md — e.g., "--!strict in all new files"]
## Validation
[Exact command to verify, e.g., `bash scripts/dev.sh --test`]
## Complexity
Simple | Medium | Complex
- **Simple**: 1 file, <50 lines, obvious fix
- **Medium**: 2-3 files, <200 lines, clear scope
- **Complex**: >3 files or architectural decision — consider decompositionAcceptance Criteria Rules
- Specific — name the file, function, or behavior exactly
- Verifiable — can be confirmed with a test or manual step
- Binary — pass or fail, no ambiguity
- Contextualized — reference the project's architecture (services, controllers, signals, constants — whatever the stack uses)
- Max 2 AC for autonomous issues — more than 2 = decompose or add
batch-deliverylabel
AC Patterns by Issue Type
Bug Fix (fix:)
- [ ] [Behavior] no longer occurs when [reproduction steps]
- [ ] Regression test added in `[test_file]`
- [ ] [N] tests pass — `[test command]`Feature (feat:)
- [ ] [Component] implemented in `[path]`
- [ ] Follows [convention from AGENTS.md — e.g., "--!strict"]
- [ ] Tests added in `[test_file]`
- [ ] [N] tests + new tests pass — `[test command]`
- [ ] CI check `[check name]` passesRefactor (refactor:)
- [ ] [File:function] refactored — [measurable metric, e.g., "≤50 lines"]
- [ ] No behavior change (tests pass unchanged)
- [ ] [N] tests pass — `[test command]`Documentation (docs:)
- [ ] Content reflects current code state
- [ ] No stale references
- [ ] No duplication with other docs (reference instead)Library Suggestion Handling
If stack-audit found a library opportunity:
- Create the main issue (the actual change)
- Create a separate enhancement issue:
## Summary Evaluate [library name] for [problem it solves] ## Context - Could simplify: #[main issue number] - License: [license] - Bundle size: [size or "N/A"] - Maintenance: [active/abandoned] ## Acceptance Criteria - [ ] Library evaluated against project conventions - [ ] Trade-offs documented (license, size, deps) - [ ] Decision recorded (adopt/reject + reason) - Reference from main issue:
Related: #NN (library review)
Label Validation
Before creating an issue, validate that the required labels exist in the repo:
- Check existing labels:
gh label list --limit 100 - If a required label is missing, create it first (see
skills/06-label-metadata/SKILL.mdfor the full setup commands). Do not create an issue with missing labels —gh issue createwill fail. Validate label assignment: every crafted issue MUST have at minimum:
- 1 type label (bug, enhancement, documentation, refactor, chore, test, security)
- 1 priority label (priority:P0–P3)
- 1 area label (area:backend, area:frontend, area:ci, area:docs, area:security, area:devops)
If any of these three categories is missing, add
needs-metadatalabel and flag the issue for review.
Launch
gh issue create \
--title "fix: flashlight uses :Fire() instead of :FireServer()" \
--body-file /tmp/issue-body.md \
--label "bug" \
--label "priority:P0" \
--label "area:backend" \
--label "ready-to-implement"Record the issue number in the progress file.
Error Handling
ghCLI not installed: issue-craft cannot create issues withoutgh. Report "gh CLI not found — issue body saved to /tmp/issue-body.md. Install gh to create: https://cli.github.com/" and save the draft for manual creation.ghnot authenticated: rungh auth status. If not authed, report "gh not authenticated — rungh auth loginand retry." Save the draft.- GitHub API rate limits: if
gh issue createfails with a rate limit error, save the draft and report "Rate limited — retry after [reset time]. Issue body at /tmp/issue-body.md." - Labels don't exist: see Label Validation above. Create missing labels
before retrying
gh issue create. - Commands fail: if
gh issue createfails for any other reason (network, permissions), save the draft and report the error. Do not lose the crafted issue body.
Example
Complete crafted issue for a bug fix:
Title: fix: flashlight uses :Fire() instead of :FireServer()
Labels: bug, priority:P0, area:backend, ready-to-implement
## Summary
The flashlight tool calls `:Fire()` on the client, which does not replicate
to the server. It should use `:FireServer()` so the server authorizes the
action.
## Context
- Architecture: docs/ARCHITECTURE.md §Tools
- Related: #12 (orphan PR with same fix attempt)
## Affected Files (best guess)
- src/client/Controllers/ToolController.luau
- src/server/Services/ToolService.luau
## Acceptance Criteria
- [ ] `ToolController:activateTool()` calls `:FireServer()` instead of `:Fire()`
- [ ] Regression test added in `scripts/test_tools.luau`
- [ ] 26 tests pass — `lune run scripts/test_core.luau`
## Validation
`lune run scripts/test_core.luau`
## Complexity
Simple — 1 file, <20 lines, obvious fixDoes 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
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.

