|
| 1 | +# Creating Roadmap Issues |
| 2 | + |
| 3 | +This guide explains how to create and document issues from the project roadmap (`docs/roadmap.md`). It covers the complete workflow from selecting a roadmap task to creating GitHub issues with proper documentation. |
| 4 | + |
| 5 | +## 📋 Overview |
| 6 | + |
| 7 | +The roadmap implementation process involves: |
| 8 | + |
| 9 | +1. **Issue Documentation** - Create detailed specification in `docs/issues/` |
| 10 | +2. **GitHub Issues** - Create epic and/or task issues with proper hierarchy |
| 11 | +3. **Linking** - Connect issues bidirectionally and update roadmap |
| 12 | +4. **File Management** - Follow naming conventions |
| 13 | +5. **Quality Checks** - Run linters before committing |
| 14 | + |
| 15 | +## 🎯 Issue Hierarchy |
| 16 | + |
| 17 | +Our roadmap uses a three-level hierarchy: |
| 18 | + |
| 19 | +```text |
| 20 | +Roadmap (Issue #1) |
| 21 | +└── Epic (e.g., Issue #2: "Scaffolding for main app") |
| 22 | + ├── Task (e.g., Issue #3: "Setup logging for production CLI") |
| 23 | + ├── Task (e.g., Issue #4: "Add configuration file support") |
| 24 | + └── Task (e.g., Issue #5: "Add help command") |
| 25 | +``` |
| 26 | + |
| 27 | +### When to Create Each Type |
| 28 | + |
| 29 | +- **Epic Issue**: For roadmap sections (e.g., "1. Add scaffolding for main app") |
| 30 | + |
| 31 | + - Represents a major feature area or capability |
| 32 | + - Contains multiple related tasks |
| 33 | + - Links directly to roadmap issue (#1) |
| 34 | + |
| 35 | +- **Task Issue**: For individual roadmap items (e.g., "1.1 Setup logging") |
| 36 | + - Represents a single, implementable unit of work |
| 37 | + - Links to parent epic issue |
| 38 | + - Has detailed specification document |
| 39 | + |
| 40 | +## 📝 Complete Workflow |
| 41 | + |
| 42 | +### Step 1: Create Issue Specification Document |
| 43 | + |
| 44 | +Create a detailed specification in `docs/issues/` with temporary name: |
| 45 | + |
| 46 | +```bash |
| 47 | +# Copy the template to create your specification document |
| 48 | +cp docs/issues/TEMPLATE.md docs/issues/setup-logging-for-production-cli.md |
| 49 | + |
| 50 | +# Edit the document to fill in all sections |
| 51 | +vim docs/issues/setup-logging-for-production-cli.md |
| 52 | +``` |
| 53 | + |
| 54 | +#### Document Structure |
| 55 | + |
| 56 | +Use the template at [`docs/issues/TEMPLATE.md`](../issues/TEMPLATE.md) as your starting point. The template includes: |
| 57 | + |
| 58 | +- **Header**: Issue number, parent epic, and related links |
| 59 | +- **Overview**: Clear description of what the task accomplishes |
| 60 | +- **Goals**: High-level objectives with checkboxes |
| 61 | +- **Specifications**: Detailed technical specifications with code examples |
| 62 | +- **Implementation Plan**: Phased breakdown with specific, actionable subtasks |
| 63 | +- **Acceptance Criteria**: Clear definition of what "done" means |
| 64 | +- **Related Documentation**: Links to relevant docs, ADRs, and examples |
| 65 | +- **Notes**: Additional context or considerations |
| 66 | + |
| 67 | +#### Key Principles |
| 68 | + |
| 69 | +- **Be Specific**: Include code examples, command-line arguments, file structures |
| 70 | +- **Be Actionable**: Break work into small, trackable tasks with checkboxes |
| 71 | +- **Provide Context**: Link to related documentation, ADRs, and examples |
| 72 | +- **Estimate Time**: Help others understand scope |
| 73 | +- **Define Success**: Clear acceptance criteria |
| 74 | + |
| 75 | +### Step 2: Create GitHub Epic Issue (if needed) |
| 76 | + |
| 77 | +If this is the first task in a roadmap section, create an epic issue first: |
| 78 | + |
| 79 | +1. **Go to GitHub Issues**: `https://github.com/torrust/torrust-tracker-deployer/issues` |
| 80 | + |
| 81 | +2. **Click "New Issue"** |
| 82 | + |
| 83 | +3. **Fill in Epic Details**: Use the template at [`docs/issues/EPIC-TEMPLATE.md`](../issues/EPIC-TEMPLATE.md) and fill in: |
| 84 | + |
| 85 | + - Title with the roadmap section name |
| 86 | + - Overview describing the epic's purpose |
| 87 | + - Roadmap reference with quote from the roadmap |
| 88 | + - Initial task list (will be updated as tasks are created) |
| 89 | + - Parent link to roadmap issue (#1) |
| 90 | + |
| 91 | +4. **Add Labels**: `epic`, `roadmap` |
| 92 | + |
| 93 | +5. **Set Parent**: In the right sidebar, under "Development", link to parent issue (#1) |
| 94 | + |
| 95 | +6. **Create Issue** - Note the issue number (e.g., #2) |
| 96 | + |
| 97 | +### Step 3: Create GitHub Task Issue |
| 98 | + |
| 99 | +1. **Go to GitHub Issues**: `https://github.com/torrust/torrust-tracker-deployer/issues` |
| 100 | + |
| 101 | +2. **Click "New Issue"** |
| 102 | + |
| 103 | +3. **Fill in Task Details**: Use the template at [`docs/issues/TASK-TEMPLATE.md`](../issues/TASK-TEMPLATE.md) and fill in: |
| 104 | + |
| 105 | + - Title with the task name from roadmap |
| 106 | + - Overview with brief description |
| 107 | + - Specification link (will be updated after file rename) |
| 108 | + - Implementation plan with phased tasks |
| 109 | + - Acceptance criteria |
| 110 | + - Related links to parent epic and specification document |
| 111 | + |
| 112 | +4. **Add Labels**: `task`, `roadmap`, relevant technical labels (`rust`, `cli`, etc.) |
| 113 | + |
| 114 | +5. **Set Parent**: Link to parent epic issue |
| 115 | + |
| 116 | +6. **Create Issue** - Note the issue number (e.g., #3) |
| 117 | + |
| 118 | +### Step 4: Update Issue Specification Document |
| 119 | + |
| 120 | +Update the specification document with the issue number: |
| 121 | + |
| 122 | +```markdown |
| 123 | +# [Task Title] |
| 124 | + |
| 125 | +**Issue**: #3 |
| 126 | +**Parent Epic**: #2 - [Epic Name] |
| 127 | +**Related**: [Links to related issues] |
| 128 | + |
| 129 | +[Rest of document...] |
| 130 | +``` |
| 131 | + |
| 132 | +### Step 5: Rename File with Issue Number |
| 133 | + |
| 134 | +Follow the naming convention: `{issue-number}-{description}.md` |
| 135 | + |
| 136 | +```bash |
| 137 | +# Example: Issue #3 |
| 138 | +mv docs/issues/setup-logging-for-production-cli.md \ |
| 139 | + docs/issues/3-setup-logging-for-production-cli.md |
| 140 | +``` |
| 141 | + |
| 142 | +**Naming Rules**: |
| 143 | + |
| 144 | +- Start with issue number |
| 145 | +- Use lowercase |
| 146 | +- Separate words with hyphens |
| 147 | +- Keep descriptive but concise |
| 148 | +- Match branch naming convention |
| 149 | + |
| 150 | +### Step 6: Update GitHub Task Issue |
| 151 | + |
| 152 | +Update the task issue with the correct file link: |
| 153 | + |
| 154 | +```markdown |
| 155 | +## Specification |
| 156 | + |
| 157 | +See detailed specification: [docs/issues/3-setup-logging-for-production-cli.md](../docs/issues/3-setup-logging-for-production-cli.md) |
| 158 | +``` |
| 159 | + |
| 160 | +### Step 7: Update GitHub Epic Issue |
| 161 | + |
| 162 | +Update the epic issue task list with the new task: |
| 163 | + |
| 164 | +```markdown |
| 165 | +## Tasks |
| 166 | + |
| 167 | +- [ ] #3 - Setup logging for production CLI |
| 168 | +- [ ] #X - [Next task name] |
| 169 | +- [ ] #X - [Another task name] |
| 170 | +``` |
| 171 | + |
| 172 | +### Step 8: Update Roadmap |
| 173 | + |
| 174 | +Update `docs/roadmap.md` to link the epic and task issues: |
| 175 | + |
| 176 | +```markdown |
| 177 | +## 1. Add scaffolding for main app (Epic: [#2](https://github.com/torrust/torrust-tracker-deployer/issues/2)) |
| 178 | + |
| 179 | +- 1.1 Setup logging (Task: [#3](https://github.com/torrust/torrust-tracker-deployer/issues/3)) |
| 180 | +- 1.2 Add configuration file support |
| 181 | +- 1.3 Add help command |
| 182 | +``` |
| 183 | + |
| 184 | +### Step 9: Pre-Commit Verification |
| 185 | + |
| 186 | +Follow the [commit process](./commit-process.md) and run the pre-commit verification script: |
| 187 | + |
| 188 | +```bash |
| 189 | +./scripts/pre-commit.sh |
| 190 | +``` |
| 191 | + |
| 192 | +**All checks must pass** before proceeding. |
| 193 | + |
| 194 | +### Step 10: Commit Changes |
| 195 | + |
| 196 | +Follow the [conventional commit format](./commit-process.md): |
| 197 | + |
| 198 | +```bash |
| 199 | +# Stage files |
| 200 | +git add docs/roadmap.md docs/issues/ |
| 201 | + |
| 202 | +# Commit (note: we're on main, not on issue branch yet) |
| 203 | +git commit -m "docs: add issue specification for roadmap task X.Y |
| 204 | +
|
| 205 | +- Create epic issue #X for roadmap section X |
| 206 | +- Create task issue #Y for task X.Y |
| 207 | +- Add detailed specification document |
| 208 | +- Update roadmap with issue links" |
| 209 | + |
| 210 | +# Push to remote |
| 211 | +git push |
| 212 | +``` |
| 213 | + |
| 214 | +## 🔍 Complete Example |
| 215 | + |
| 216 | +Here's a complete example following the workflow: |
| 217 | + |
| 218 | +### Scenario |
| 219 | + |
| 220 | +Implementing roadmap task **1.1 Setup logging** |
| 221 | + |
| 222 | +### Execution |
| 223 | + |
| 224 | +```bash |
| 225 | +# 1. Create initial specification document from template |
| 226 | +cp docs/issues/TEMPLATE.md docs/issues/setup-logging-for-production-cli.md |
| 227 | +vim docs/issues/setup-logging-for-production-cli.md |
| 228 | +# ... fill in all sections: overview, goals, specs, implementation plan ... |
| 229 | + |
| 230 | +# 2. Create GitHub Epic Issue #2: "Scaffolding for main app" |
| 231 | +# - Browser: Create issue, link to #1, add labels |
| 232 | +# - Note issue number: #2 |
| 233 | + |
| 234 | +# 3. Create GitHub Task Issue #3: "Setup logging for production CLI" |
| 235 | +# - Browser: Create issue, link to #2, add labels |
| 236 | +# - Note issue number: #3 |
| 237 | + |
| 238 | +# 4. Update specification with issue numbers |
| 239 | +vim docs/issues/setup-logging-for-production-cli.md |
| 240 | +# Add: **Issue**: #3 |
| 241 | +# Add: **Parent Epic**: #2 |
| 242 | + |
| 243 | +# 5. Rename file with issue number |
| 244 | +mv docs/issues/setup-logging-for-production-cli.md \ |
| 245 | + docs/issues/3-setup-logging-for-production-cli.md |
| 246 | + |
| 247 | +# 6. Update GitHub Task Issue #3 |
| 248 | +# - Browser: Update specification link to correct filename |
| 249 | + |
| 250 | +# 7. Update GitHub Epic Issue #2 |
| 251 | +# - Browser: Add task to task list: "- [ ] #3 - Setup logging..." |
| 252 | + |
| 253 | +# 8. Update roadmap |
| 254 | +vim docs/roadmap.md |
| 255 | +# Update section 1.1 with issue link |
| 256 | + |
| 257 | +# 9. Run pre-commit checks (see docs/contributing/commit-process.md) |
| 258 | +./scripts/pre-commit.sh |
| 259 | + |
| 260 | +# 10. Commit and push |
| 261 | +git add docs/roadmap.md docs/issues/ |
| 262 | +git commit -m "docs: add issue specification for roadmap task 1.1 |
| 263 | +
|
| 264 | +- Create epic issue #2 for roadmap section 1 |
| 265 | +- Create task issue #3 for task 1.1 |
| 266 | +- Add detailed specification document |
| 267 | +- Update roadmap with issue links" |
| 268 | +git push |
| 269 | +``` |
| 270 | + |
| 271 | +## 📋 Pre-Commit Checklist |
| 272 | + |
| 273 | +Before committing, verify: |
| 274 | + |
| 275 | +- [ ] Issue specification document is complete and detailed |
| 276 | +- [ ] File is named with issue number: `{number}-{description}.md` |
| 277 | +- [ ] Epic issue exists and links to roadmap (#1) |
| 278 | +- [ ] Task issue exists and links to epic |
| 279 | +- [ ] Issue specification references correct issue numbers |
| 280 | +- [ ] GitHub task issue links to correct file path |
| 281 | +- [ ] GitHub epic issue includes task in task list |
| 282 | +- [ ] `docs/roadmap.md` updated with issue links |
| 283 | +- [ ] All links are correct and work |
| 284 | +- [ ] All linters pass (`./scripts/pre-commit.sh`) |
| 285 | +- [ ] Commit message follows [conventional format](./commit-process.md) |
| 286 | + |
| 287 | +## 🚨 Common Mistakes to Avoid |
| 288 | + |
| 289 | +### ❌ Don't Create Implementation Branch Before Specification is Committed |
| 290 | + |
| 291 | +```bash |
| 292 | +# Wrong: Creating branch before specification is committed to main |
| 293 | +git checkout -b 3-setup-logging-for-production-cli |
| 294 | +# Problem: Specification should be on main first |
| 295 | +``` |
| 296 | + |
| 297 | +✅ **Correct**: Commit specification to `main` first |
| 298 | + |
| 299 | +**Exception**: If you plan to use GitHub Copilot agents, create and push the branch after committing the specification but before assigning Copilot to the issue |
| 300 | + |
| 301 | +### ❌ Don't Forget to Rename File |
| 302 | + |
| 303 | +```bash |
| 304 | +# Wrong: File still has temporary name |
| 305 | +docs/issues/setup-logging-for-production-cli.md |
| 306 | +# Problem: Should have issue number prefix |
| 307 | +``` |
| 308 | + |
| 309 | +✅ **Correct**: `docs/issues/3-setup-logging-for-production-cli.md` |
| 310 | + |
| 311 | +### ❌ Don't Skip Bidirectional Linking |
| 312 | + |
| 313 | +```bash |
| 314 | +# Wrong: Only roadmap links to issue |
| 315 | +# Missing: Issue linking back to roadmap |
| 316 | +# Missing: Epic listing the task |
| 317 | +``` |
| 318 | + |
| 319 | +✅ **Correct**: All issues linked in both directions |
| 320 | + |
| 321 | +### ❌ Don't Commit Without Linting |
| 322 | + |
| 323 | +```bash |
| 324 | +# Wrong: git add && git commit without running checks |
| 325 | +# Problem: May have markdown, yaml, or other linting issues |
| 326 | +``` |
| 327 | + |
| 328 | +✅ **Correct**: Always run `./scripts/pre-commit.sh` first |
| 329 | + |
| 330 | +## 🔗 Related Documentation |
| 331 | + |
| 332 | +- [Branching Conventions](./branching.md) - Branch naming for implementation |
| 333 | +- [Commit Process](./commit-process.md) - Conventional commit format |
| 334 | +- [Project Roadmap](../roadmap.md) - The roadmap being implemented |
| 335 | +- [Development Principles](../development-principles.md) - Quality standards |
| 336 | + |
| 337 | +## 📞 Questions? |
| 338 | + |
| 339 | +If you have questions about: |
| 340 | + |
| 341 | +- **Issue structure**: Review existing issues in `docs/issues/` |
| 342 | +- **GitHub linking**: Check how #2 and #3 are connected |
| 343 | +- **Commit format**: See [commit-process.md](./commit-process.md) |
| 344 | +- **Linting**: See [linting.md](./linting.md) |
| 345 | + |
| 346 | +## 🚀 Next Steps |
| 347 | + |
| 348 | +After completing this process, you have two options for implementation: |
| 349 | + |
| 350 | +### Option 1: Manual Implementation (Default) |
| 351 | + |
| 352 | +1. **Create Implementation Branch**: `git checkout -b {issue-number}-{description}` |
| 353 | +2. **Start Implementation**: Follow the plan in the specification document |
| 354 | +3. **Track Progress**: Check off tasks in the GitHub issue as you complete them |
| 355 | +4. **Create PR**: When complete, create pull request for review |
| 356 | + |
| 357 | +### Option 2: Using GitHub Copilot Agent (Optional) |
| 358 | + |
| 359 | +If you want to use GitHub Copilot to assist with implementation: |
| 360 | + |
| 361 | +1. **Create Implementation Branch First**: |
| 362 | + |
| 363 | + ```bash |
| 364 | + git checkout -b {issue-number}-{description} |
| 365 | + git push -u origin {issue-number}-{description} |
| 366 | + ``` |
| 367 | + |
| 368 | + **Important**: The branch must exist on GitHub before assigning Copilot to the issue. |
| 369 | + |
| 370 | +2. **Assign Copilot to the Issue**: |
| 371 | + |
| 372 | + - Go to the GitHub issue page |
| 373 | + - Use the GitHub Copilot interface to assign the agent |
| 374 | + - Copilot will use the existing branch to create a PR with proposed changes |
| 375 | + |
| 376 | +3. **Review Copilot's Work**: |
| 377 | + |
| 378 | + - Review the generated PR carefully |
| 379 | + - Test the changes locally |
| 380 | + - Request modifications if needed |
| 381 | + - Approve and merge when satisfied |
| 382 | + |
| 383 | +4. **Track Progress**: Check off completed tasks in the GitHub issue |
| 384 | + |
| 385 | +**Note**: GitHub Copilot agents work best with well-defined specifications, which is why we create detailed issue documents first. |
| 386 | + |
| 387 | +--- |
| 388 | + |
| 389 | +By following this workflow, you ensure that roadmap tasks are properly documented, tracked, and implemented with high quality and consistency. |
0 commit comments