mcp-ticketer 0.4.11__py3-none-any.whl → 2.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mcp-ticketer might be problematic. Click here for more details.

Files changed (111) hide show
  1. mcp_ticketer/__init__.py +10 -10
  2. mcp_ticketer/__version__.py +3 -3
  3. mcp_ticketer/adapters/__init__.py +2 -0
  4. mcp_ticketer/adapters/aitrackdown.py +394 -9
  5. mcp_ticketer/adapters/asana/__init__.py +15 -0
  6. mcp_ticketer/adapters/asana/adapter.py +1416 -0
  7. mcp_ticketer/adapters/asana/client.py +292 -0
  8. mcp_ticketer/adapters/asana/mappers.py +348 -0
  9. mcp_ticketer/adapters/asana/types.py +146 -0
  10. mcp_ticketer/adapters/github.py +836 -105
  11. mcp_ticketer/adapters/hybrid.py +47 -5
  12. mcp_ticketer/adapters/jira.py +772 -1
  13. mcp_ticketer/adapters/linear/adapter.py +2293 -108
  14. mcp_ticketer/adapters/linear/client.py +146 -12
  15. mcp_ticketer/adapters/linear/mappers.py +105 -11
  16. mcp_ticketer/adapters/linear/queries.py +168 -1
  17. mcp_ticketer/adapters/linear/types.py +80 -4
  18. mcp_ticketer/analysis/__init__.py +56 -0
  19. mcp_ticketer/analysis/dependency_graph.py +255 -0
  20. mcp_ticketer/analysis/health_assessment.py +304 -0
  21. mcp_ticketer/analysis/orphaned.py +218 -0
  22. mcp_ticketer/analysis/project_status.py +594 -0
  23. mcp_ticketer/analysis/similarity.py +224 -0
  24. mcp_ticketer/analysis/staleness.py +266 -0
  25. mcp_ticketer/automation/__init__.py +11 -0
  26. mcp_ticketer/automation/project_updates.py +378 -0
  27. mcp_ticketer/cache/memory.py +3 -3
  28. mcp_ticketer/cli/adapter_diagnostics.py +4 -2
  29. mcp_ticketer/cli/auggie_configure.py +18 -6
  30. mcp_ticketer/cli/codex_configure.py +175 -60
  31. mcp_ticketer/cli/configure.py +884 -146
  32. mcp_ticketer/cli/cursor_configure.py +314 -0
  33. mcp_ticketer/cli/diagnostics.py +31 -28
  34. mcp_ticketer/cli/discover.py +293 -21
  35. mcp_ticketer/cli/gemini_configure.py +18 -6
  36. mcp_ticketer/cli/init_command.py +880 -0
  37. mcp_ticketer/cli/instruction_commands.py +435 -0
  38. mcp_ticketer/cli/linear_commands.py +99 -15
  39. mcp_ticketer/cli/main.py +109 -2055
  40. mcp_ticketer/cli/mcp_configure.py +673 -99
  41. mcp_ticketer/cli/mcp_server_commands.py +415 -0
  42. mcp_ticketer/cli/migrate_config.py +12 -8
  43. mcp_ticketer/cli/platform_commands.py +6 -6
  44. mcp_ticketer/cli/platform_detection.py +477 -0
  45. mcp_ticketer/cli/platform_installer.py +536 -0
  46. mcp_ticketer/cli/project_update_commands.py +350 -0
  47. mcp_ticketer/cli/queue_commands.py +15 -15
  48. mcp_ticketer/cli/setup_command.py +639 -0
  49. mcp_ticketer/cli/simple_health.py +13 -11
  50. mcp_ticketer/cli/ticket_commands.py +277 -36
  51. mcp_ticketer/cli/update_checker.py +313 -0
  52. mcp_ticketer/cli/utils.py +45 -41
  53. mcp_ticketer/core/__init__.py +35 -1
  54. mcp_ticketer/core/adapter.py +170 -5
  55. mcp_ticketer/core/config.py +38 -31
  56. mcp_ticketer/core/env_discovery.py +33 -3
  57. mcp_ticketer/core/env_loader.py +7 -6
  58. mcp_ticketer/core/exceptions.py +10 -4
  59. mcp_ticketer/core/http_client.py +10 -10
  60. mcp_ticketer/core/instructions.py +405 -0
  61. mcp_ticketer/core/label_manager.py +732 -0
  62. mcp_ticketer/core/mappers.py +32 -20
  63. mcp_ticketer/core/models.py +136 -1
  64. mcp_ticketer/core/onepassword_secrets.py +379 -0
  65. mcp_ticketer/core/priority_matcher.py +463 -0
  66. mcp_ticketer/core/project_config.py +148 -14
  67. mcp_ticketer/core/registry.py +1 -1
  68. mcp_ticketer/core/session_state.py +171 -0
  69. mcp_ticketer/core/state_matcher.py +592 -0
  70. mcp_ticketer/core/url_parser.py +425 -0
  71. mcp_ticketer/core/validators.py +69 -0
  72. mcp_ticketer/defaults/ticket_instructions.md +644 -0
  73. mcp_ticketer/mcp/__init__.py +2 -2
  74. mcp_ticketer/mcp/server/__init__.py +2 -2
  75. mcp_ticketer/mcp/server/diagnostic_helper.py +175 -0
  76. mcp_ticketer/mcp/server/main.py +187 -93
  77. mcp_ticketer/mcp/server/routing.py +655 -0
  78. mcp_ticketer/mcp/server/server_sdk.py +58 -0
  79. mcp_ticketer/mcp/server/tools/__init__.py +37 -9
  80. mcp_ticketer/mcp/server/tools/analysis_tools.py +854 -0
  81. mcp_ticketer/mcp/server/tools/attachment_tools.py +65 -20
  82. mcp_ticketer/mcp/server/tools/bulk_tools.py +259 -202
  83. mcp_ticketer/mcp/server/tools/comment_tools.py +74 -12
  84. mcp_ticketer/mcp/server/tools/config_tools.py +1429 -0
  85. mcp_ticketer/mcp/server/tools/diagnostic_tools.py +211 -0
  86. mcp_ticketer/mcp/server/tools/hierarchy_tools.py +878 -319
  87. mcp_ticketer/mcp/server/tools/instruction_tools.py +295 -0
  88. mcp_ticketer/mcp/server/tools/label_tools.py +942 -0
  89. mcp_ticketer/mcp/server/tools/pr_tools.py +3 -7
  90. mcp_ticketer/mcp/server/tools/project_status_tools.py +158 -0
  91. mcp_ticketer/mcp/server/tools/project_update_tools.py +473 -0
  92. mcp_ticketer/mcp/server/tools/search_tools.py +180 -97
  93. mcp_ticketer/mcp/server/tools/session_tools.py +308 -0
  94. mcp_ticketer/mcp/server/tools/ticket_tools.py +1182 -82
  95. mcp_ticketer/mcp/server/tools/user_ticket_tools.py +364 -0
  96. mcp_ticketer/queue/health_monitor.py +1 -0
  97. mcp_ticketer/queue/manager.py +4 -4
  98. mcp_ticketer/queue/queue.py +3 -3
  99. mcp_ticketer/queue/run_worker.py +1 -1
  100. mcp_ticketer/queue/ticket_registry.py +2 -2
  101. mcp_ticketer/queue/worker.py +15 -13
  102. mcp_ticketer/utils/__init__.py +5 -0
  103. mcp_ticketer/utils/token_utils.py +246 -0
  104. mcp_ticketer-2.0.1.dist-info/METADATA +1366 -0
  105. mcp_ticketer-2.0.1.dist-info/RECORD +122 -0
  106. mcp_ticketer-0.4.11.dist-info/METADATA +0 -496
  107. mcp_ticketer-0.4.11.dist-info/RECORD +0 -77
  108. {mcp_ticketer-0.4.11.dist-info → mcp_ticketer-2.0.1.dist-info}/WHEEL +0 -0
  109. {mcp_ticketer-0.4.11.dist-info → mcp_ticketer-2.0.1.dist-info}/entry_points.txt +0 -0
  110. {mcp_ticketer-0.4.11.dist-info → mcp_ticketer-2.0.1.dist-info}/licenses/LICENSE +0 -0
  111. {mcp_ticketer-0.4.11.dist-info → mcp_ticketer-2.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,644 @@
1
+ # Ticket Writing Instructions
2
+
3
+ This document provides comprehensive guidelines for creating well-structured, actionable tickets across all ticketing platforms (Linear, JIRA, GitHub, etc.). Following these guidelines ensures tickets are clear, complete, and easy to work with.
4
+
5
+ ## Core Principles
6
+
7
+ 1. **Clarity**: Tickets should be immediately understandable by anyone on the team
8
+ 2. **Actionability**: Every ticket should have a clear path to completion
9
+ 3. **Completeness**: Include all necessary context and acceptance criteria
10
+ 4. **Consistency**: Follow the same structure across all tickets
11
+ 5. **Traceability**: Link related work and provide context for decisions
12
+
13
+ ## Title Guidelines
14
+
15
+ ### Structure
16
+ - **Format**: `[Type] Brief description of the work`
17
+ - **Length**: 50-80 characters ideal, maximum 120 characters
18
+ - **Style**: Imperative mood (e.g., "Add", "Fix", "Update", not "Adding", "Fixed")
19
+
20
+ ### Examples
21
+ **Good Titles**:
22
+ - `[Bug] Fix authentication timeout on password reset`
23
+ - `[Feature] Add export to PDF functionality`
24
+ - `[Refactor] Consolidate duplicate payment processing code`
25
+ - `[Docs] Update API authentication examples`
26
+
27
+ **Poor Titles**:
28
+ - `Bug in login` (too vague)
29
+ - `Users are experiencing issues with the authentication system when trying to reset passwords` (too long)
30
+ - `Working on payment stuff` (not specific or actionable)
31
+
32
+ ### Type Prefixes
33
+ - `[Bug]` - Defects in existing functionality
34
+ - `[Feature]` - New functionality or enhancement
35
+ - `[Refactor]` - Code improvements without behavior changes
36
+ - `[Docs]` - Documentation updates
37
+ - `[Test]` - Test coverage or test fixes
38
+ - `[Perf]` - Performance improvements
39
+ - `[Security]` - Security vulnerabilities or improvements
40
+
41
+ ## Description Structure
42
+
43
+ ### Template
44
+ ```markdown
45
+ ## Problem Statement
46
+ [Clear description of what needs to be done and why]
47
+
48
+ ## Background
49
+ [Relevant context, history, or related work]
50
+
51
+ ## Proposed Solution
52
+ [How this should be implemented or resolved]
53
+
54
+ ## Acceptance Criteria
55
+ - [ ] Criterion 1: Specific, measurable outcome
56
+ - [ ] Criterion 2: Specific, measurable outcome
57
+ - [ ] Criterion 3: Specific, measurable outcome
58
+
59
+ ## Technical Notes
60
+ [Implementation details, API endpoints, database changes, etc.]
61
+
62
+ ## Testing Notes
63
+ [How to verify this works, edge cases to test]
64
+
65
+ ## Dependencies
66
+ [Other tickets, external systems, or prerequisites]
67
+
68
+ ## References
69
+ [Links to docs, designs, discussions, or related tickets]
70
+ ```
71
+
72
+ ### Example - Bug Ticket
73
+ ```markdown
74
+ ## Problem Statement
75
+ Users cannot reset their passwords when the session has been idle for more than 30 minutes. This results in a timeout error and forces users to refresh the page.
76
+
77
+ ## Background
78
+ Introduced in v2.1.0 when we updated the session management library. Affects approximately 5% of password reset attempts based on error logs.
79
+
80
+ ## Proposed Solution
81
+ 1. Extend session timeout for password reset flow to 60 minutes
82
+ 2. Add client-side session refresh before password reset submission
83
+ 3. Display user-friendly error if session expires mid-flow
84
+
85
+ ## Acceptance Criteria
86
+ - [ ] Password reset works after 30+ minutes of inactivity
87
+ - [ ] User sees clear error message if session truly expires
88
+ - [ ] No regression in normal login flow timeout behavior
89
+ - [ ] Error rate for password resets drops below 1%
90
+
91
+ ## Technical Notes
92
+ - Update `SESSION_TIMEOUT` config for `/auth/reset-password` route
93
+ - Add `keepalive` endpoint to refresh session without full re-auth
94
+ - Client should call keepalive every 15 minutes during reset flow
95
+
96
+ ## Testing Notes
97
+ - Test with session idle for 31, 45, and 60 minutes
98
+ - Verify timeout still occurs after 60 minutes
99
+ - Test on both web and mobile clients
100
+ - Verify error logging captures the right information
101
+
102
+ ## Dependencies
103
+ - None
104
+
105
+ ## References
106
+ - Error logs: [link]
107
+ - Session management docs: [link]
108
+ - Original feature ticket: PROJ-123
109
+ ```
110
+
111
+ ### Example - Feature Ticket
112
+ ```markdown
113
+ ## Problem Statement
114
+ Users want to export their project reports as PDF files for offline review and sharing with stakeholders who don't have system access.
115
+
116
+ ## Background
117
+ Requested by 15+ customers over the past quarter. Currently users screenshot or copy-paste data into Word documents manually.
118
+
119
+ ## Proposed Solution
120
+ Add "Export to PDF" button on report detail page that:
121
+ 1. Renders report with current filters and date range
122
+ 2. Includes company branding (logo, colors)
123
+ 3. Generates professional PDF layout
124
+ 4. Downloads file named `{project}-report-{date}.pdf`
125
+
126
+ ## Acceptance Criteria
127
+ - [ ] Export button appears on all report types
128
+ - [ ] PDF includes all visible data from current view
129
+ - [ ] PDF maintains company branding and looks professional
130
+ - [ ] Large reports (>100 pages) complete without timeout
131
+ - [ ] File downloads with descriptive filename
132
+ - [ ] Works on all supported browsers
133
+
134
+ ## Technical Notes
135
+ - Use `pdfkit` library for PDF generation
136
+ - Render on server-side (don't rely on browser print)
137
+ - Store temporary PDFs in S3 with 24hr lifecycle policy
138
+ - Add background job for reports >50 pages
139
+ - Max file size: 50MB
140
+
141
+ ## Testing Notes
142
+ - Test with small (1-page), medium (10-page), and large (100+ page) reports
143
+ - Verify images render correctly in PDF
144
+ - Test with different date ranges and filters
145
+ - Check filename is URL-safe and descriptive
146
+
147
+ ## Dependencies
148
+ - Design mockup needed for PDF layout (DESIGN-456)
149
+ - S3 bucket configuration (OPS-789)
150
+
151
+ ## References
152
+ - Customer requests: [link to feedback tracker]
153
+ - PDF library comparison: [link to design doc]
154
+ - Design mockup: [link]
155
+ ```
156
+
157
+ ## Priority Guidelines
158
+
159
+ ### Priority Levels
160
+
161
+ **CRITICAL** - Immediate action required
162
+ - Production outages or data loss
163
+ - Security vulnerabilities with active exploits
164
+ - Complete blocking of critical business functions
165
+ - *Response Time*: Within 1 hour
166
+ - *Example*: Database corruption preventing all logins
167
+
168
+ **HIGH** - Should be addressed soon
169
+ - Significant impact on user experience
170
+ - Blocking issues for major features
171
+ - Security vulnerabilities (not actively exploited)
172
+ - Performance issues affecting many users
173
+ - *Response Time*: Within 1 day
174
+ - *Example*: Payment processing fails for 20% of transactions
175
+
176
+ **MEDIUM** - Normal priority (default)
177
+ - Standard features and improvements
178
+ - Non-blocking bugs with workarounds
179
+ - Technical debt with moderate impact
180
+ - *Response Time*: Within 1 week
181
+ - *Example*: Add sorting to user list table
182
+
183
+ **LOW** - Nice to have
184
+ - Minor cosmetic issues
185
+ - Small optimizations
186
+ - Feature requests with low demand
187
+ - *Response Time*: When capacity allows
188
+ - *Example*: Update button color to match new brand guidelines
189
+
190
+ ### Priority Assignment Rules
191
+ - When in doubt, start with MEDIUM and adjust based on impact
192
+ - Consider both severity (how bad) and scope (how many affected)
193
+ - Re-evaluate priority if blocked or if context changes
194
+
195
+ ## State Workflow
196
+
197
+ ### State Transitions
198
+
199
+ ```
200
+ OPEN → IN_PROGRESS → READY → TESTED → DONE → CLOSED
201
+ ↓ ↓ ↓
202
+ CLOSED WAITING BLOCKED
203
+ ↓ ↓
204
+ IN_PROGRESS ← IN_PROGRESS
205
+ ```
206
+
207
+ ### State Definitions
208
+
209
+ **OPEN** - Initial state
210
+ - Ticket is created but work has not started
211
+ - Still being refined or prioritized
212
+ - In backlog waiting for assignment
213
+
214
+ **IN_PROGRESS** - Active work
215
+ - Developer has started implementation
216
+ - Code is being written or issue being investigated
217
+ - Should have assignee
218
+
219
+ **READY** - Ready for review
220
+ - Work is complete from developer perspective
221
+ - Code submitted for peer review
222
+ - Waiting for testing or deployment
223
+
224
+ **TESTED** - Verification complete
225
+ - QA has verified the implementation
226
+ - All acceptance criteria met
227
+ - Ready for production deployment
228
+
229
+ **DONE** - Complete and deployed
230
+ - Changes live in production
231
+ - Acceptance criteria verified in prod
232
+ - Customer/stakeholder notified if needed
233
+
234
+ **WAITING** - Blocked by external dependency
235
+ - Waiting for information from external party
236
+ - Dependent on another team's work
237
+ - Needs stakeholder decision or approval
238
+ - *Note*: Always add comment explaining what/who you're waiting for
239
+
240
+ **BLOCKED** - Cannot proceed due to impediment
241
+ - Technical blocker (environment, tools, access)
242
+ - Dependency on another ticket
243
+ - Missing critical information
244
+ - *Note*: Always add comment explaining the blocker and how to resolve
245
+
246
+ **CLOSED** - Terminal state
247
+ - Work complete and accepted (DONE → CLOSED)
248
+ - Ticket cancelled or deemed not needed (any state → CLOSED)
249
+ - Duplicate of another ticket
250
+
251
+ ### State Transition Rules
252
+ - Include comment when moving to WAITING or BLOCKED explaining reason
253
+ - Don't skip states unless justified (e.g., simple fixes can go OPEN → IN_PROGRESS → DONE)
254
+ - Update assignee when changing states (e.g., READY should assign to reviewer)
255
+
256
+ ## Tagging Best Practices
257
+
258
+ ### Standard Tag Categories
259
+
260
+ **Component Tags** (what part of system)
261
+ - `frontend`, `backend`, `api`, `database`, `infrastructure`
262
+ - `auth`, `payments`, `notifications`, `reporting`
263
+
264
+ **Type Tags** (kind of work)
265
+ - `bug`, `feature`, `enhancement`, `refactor`
266
+ - `security`, `performance`, `accessibility`
267
+ - `documentation`, `testing`
268
+
269
+ **Impact Tags** (who/what affected)
270
+ - `customer-facing`, `internal-tools`, `developer-experience`
271
+ - `mobile`, `web`, `all-platforms`
272
+
273
+ **Status Tags** (special states)
274
+ - `needs-design`, `needs-review`, `needs-testing`
275
+ - `breaking-change`, `experimental`, `deprecated`
276
+
277
+ **Effort Tags** (size estimates)
278
+ - `quick-win`, `small`, `medium`, `large`, `epic`
279
+
280
+ ### Tagging Guidelines
281
+ - Use 3-7 tags per ticket (not too few, not too many)
282
+ - Be consistent with tag names across tickets
283
+ - Use kebab-case for multi-word tags (`needs-review`, not `needs review`)
284
+ - Create new tags sparingly - reuse existing tags when possible
285
+
286
+ ### Example Tag Combinations
287
+ - Bug: `bug`, `backend`, `payments`, `high-priority`, `customer-facing`
288
+ - Feature: `feature`, `frontend`, `reporting`, `medium`, `needs-design`
289
+ - Refactor: `refactor`, `api`, `technical-debt`, `performance`, `small`
290
+
291
+ ## Hierarchy and Organization
292
+
293
+ ### Three-Level Hierarchy
294
+
295
+ **EPIC** (Strategic level)
296
+ - Large initiatives or projects (2-12 weeks)
297
+ - Contains multiple related issues
298
+ - Has high-level goals and success metrics
299
+ - *Example*: "Redesign Dashboard UI"
300
+
301
+ **ISSUE** (Work item level)
302
+ - Standard unit of work (2-5 days)
303
+ - Concrete, implementable feature or fix
304
+ - Can stand alone or be part of epic
305
+ - *Example*: "Add chart filtering controls"
306
+
307
+ **TASK** (Sub-work level)
308
+ - Small piece of an issue (2-8 hours)
309
+ - Very specific implementation step
310
+ - Always belongs to a parent issue
311
+ - *Example*: "Create DateRangePicker component"
312
+
313
+ ### When to Use Each Level
314
+
315
+ **Create an Epic when**:
316
+ - Work will take more than 2 weeks
317
+ - Multiple developers will be involved
318
+ - There are multiple distinct features/components
319
+ - You need to track progress across related work
320
+
321
+ **Create an Issue when**:
322
+ - Work is a single, cohesive unit (even if multi-day)
323
+ - One developer can own it end-to-end
324
+ - It delivers specific user value
325
+ - It's the "normal" unit of work
326
+
327
+ **Create a Task when**:
328
+ - Breaking down an issue for clarity
329
+ - Multiple steps that can be done in parallel
330
+ - Tracking checklist items within an issue
331
+ - Delegating part of an issue to another developer
332
+
333
+ ### Hierarchy Best Practices
334
+ - Issues should be achievable in a single sprint/iteration
335
+ - Tasks should be completable in a single day
336
+ - Don't create hierarchy for hierarchy's sake - use when it adds clarity
337
+ - Link related issues with references instead of forcing hierarchy
338
+
339
+ ## Markdown Formatting
340
+
341
+ ### Headers
342
+ ```markdown
343
+ # Level 1 - Rarely used in descriptions
344
+ ## Level 2 - Main sections
345
+ ### Level 3 - Subsections
346
+ #### Level 4 - Detailed breakdowns
347
+ ```
348
+
349
+ ### Emphasis
350
+ ```markdown
351
+ **Bold** for important concepts or warnings
352
+ *Italic* for emphasis or introducing terms
353
+ `code` for function names, variables, values
354
+ ```
355
+
356
+ ### Lists
357
+ ```markdown
358
+ Unordered lists:
359
+ - First item
360
+ - Second item
361
+ - Nested item
362
+ - Another nested item
363
+
364
+ Ordered lists:
365
+ 1. First step
366
+ 2. Second step
367
+ 3. Third step
368
+
369
+ Task lists:
370
+ - [ ] Incomplete task
371
+ - [x] Completed task
372
+ ```
373
+
374
+ ### Code Blocks
375
+ ````markdown
376
+ Inline code: `const foo = 'bar'`
377
+
378
+ Code blocks with syntax highlighting:
379
+ ```python
380
+ def calculate_total(items):
381
+ return sum(item.price for item in items)
382
+ ```
383
+
384
+ ```javascript
385
+ const total = items.reduce((sum, item) => sum + item.price, 0);
386
+ ```
387
+ ````
388
+
389
+ ### Links and References
390
+ ```markdown
391
+ [Link text](https://example.com)
392
+ [Reference to ticket](PROJ-123)
393
+ [Section link](#acceptance-criteria)
394
+
395
+ Images:
396
+ ![Alt text](https://example.com/image.png)
397
+ ```
398
+
399
+ ### Tables
400
+ ```markdown
401
+ | Column 1 | Column 2 | Column 3 |
402
+ |----------|----------|----------|
403
+ | Value 1 | Value 2 | Value 3 |
404
+ | Value 4 | Value 5 | Value 6 |
405
+ ```
406
+
407
+ ### Quotes and Callouts
408
+ ```markdown
409
+ > Important note or quote
410
+ > Can span multiple lines
411
+
412
+ **⚠️ Warning**: Critical information that needs attention
413
+ **💡 Tip**: Helpful suggestion or best practice
414
+ **🔒 Security**: Security-related note
415
+ ```
416
+
417
+ ## Common Anti-Patterns to Avoid
418
+
419
+ ### Vague Descriptions
420
+ **Bad**:
421
+ ```markdown
422
+ Title: Update user page
423
+ Description: Make it better
424
+ ```
425
+
426
+ **Good**:
427
+ ```markdown
428
+ Title: [Feature] Add user profile picture upload
429
+ Description:
430
+ ## Problem Statement
431
+ Users cannot upload profile pictures. They can only use default avatars.
432
+
433
+ ## Acceptance Criteria
434
+ - [ ] Upload button on profile page
435
+ - [ ] Supports JPG, PNG, GIF up to 5MB
436
+ - [ ] Image cropped to square and resized to 200x200
437
+ ```
438
+
439
+ ### Missing Acceptance Criteria
440
+ **Bad**:
441
+ ```markdown
442
+ Fix the login bug
443
+ (No acceptance criteria - how do we know when it's done?)
444
+ ```
445
+
446
+ **Good**:
447
+ ```markdown
448
+ ## Acceptance Criteria
449
+ - [ ] Login succeeds with correct credentials
450
+ - [ ] Error message shown for incorrect credentials
451
+ - [ ] Password reset link appears after 3 failed attempts
452
+ - [ ] Session persists for 7 days with "remember me"
453
+ ```
454
+
455
+ ### Over-Specifying Implementation
456
+ **Bad**:
457
+ ```markdown
458
+ Use React Hook Form with Zod validation. Create a useLoginForm hook
459
+ that calls the authService.login method and stores the token in
460
+ localStorage using the TokenManager class...
461
+ ```
462
+
463
+ **Good**:
464
+ ```markdown
465
+ ## Technical Notes
466
+ - Use existing auth service for login
467
+ - Implement client-side validation for email format
468
+ - Persist session according to "remember me" selection
469
+ - Follow existing form patterns in user settings
470
+ ```
471
+
472
+ ### Poor Hierarchy Usage
473
+ **Bad**:
474
+ ```markdown
475
+ Epic: Fix bug in user list
476
+ Issue: Update UserList.tsx
477
+ Task: Change line 47
478
+ ```
479
+
480
+ **Good**:
481
+ ```markdown
482
+ Issue: [Bug] Fix user list pagination reset on filter change
483
+
484
+ ## Acceptance Criteria
485
+ - [ ] Pagination persists when applying filters
486
+ - [ ] Page number resets to 1 only when filter changes result count
487
+ ```
488
+
489
+ ### Missing Context
490
+ **Bad**:
491
+ ```markdown
492
+ Title: Add caching
493
+ Description: Add caching to the API
494
+ ```
495
+
496
+ **Good**:
497
+ ```markdown
498
+ Title: [Perf] Add Redis caching for user profile queries
499
+
500
+ ## Background
501
+ User profile page loads slowly (2-3s) because we query database
502
+ on every page load. Profile data rarely changes but is accessed
503
+ frequently (avg 50 times/day per user).
504
+
505
+ ## Proposed Solution
506
+ Cache user profiles in Redis with 1-hour TTL. Invalidate cache
507
+ on profile update.
508
+
509
+ ## Technical Notes
510
+ - Use existing Redis instance (redis://prod-cache:6379)
511
+ - Key format: `user:profile:{user_id}`
512
+ - TTL: 3600 seconds
513
+ - Invalidate on profile update and delete
514
+ ```
515
+
516
+ ## Template Examples
517
+
518
+ ### Bug Report Template
519
+ ```markdown
520
+ Title: [Bug] {Brief description}
521
+
522
+ ## Problem Statement
523
+ {What's wrong and what's the impact}
524
+
525
+ ## Steps to Reproduce
526
+ 1. {Step 1}
527
+ 2. {Step 2}
528
+ 3. {Step 3}
529
+
530
+ ## Expected Behavior
531
+ {What should happen}
532
+
533
+ ## Actual Behavior
534
+ {What actually happens}
535
+
536
+ ## Environment
537
+ - Platform: {Web/Mobile/Both}
538
+ - Browser/Device: {Chrome 120, iPhone 15, etc.}
539
+ - Version: {v2.3.1}
540
+
541
+ ## Acceptance Criteria
542
+ - [ ] Bug no longer reproducible following steps above
543
+ - [ ] No regression in related functionality
544
+ - [ ] Root cause documented in comments
545
+
546
+ ## Additional Context
547
+ {Screenshots, error logs, related tickets}
548
+ ```
549
+
550
+ ### Feature Request Template
551
+ ```markdown
552
+ Title: [Feature] {Brief description}
553
+
554
+ ## Problem Statement
555
+ {What user need is not being met}
556
+
557
+ ## User Story
558
+ As a {user type}
559
+ I want to {action}
560
+ So that {benefit}
561
+
562
+ ## Proposed Solution
563
+ {How this should work from user perspective}
564
+
565
+ ## Acceptance Criteria
566
+ - [ ] {Measurable outcome 1}
567
+ - [ ] {Measurable outcome 2}
568
+ - [ ] {Measurable outcome 3}
569
+
570
+ ## Out of Scope
571
+ {What this explicitly does NOT include}
572
+
573
+ ## Design Notes
574
+ {Link to mockups, design specs, or design guidance}
575
+
576
+ ## Success Metrics
577
+ {How we'll measure if this was successful}
578
+ ```
579
+
580
+ ### Refactoring Template
581
+ ```markdown
582
+ Title: [Refactor] {Brief description}
583
+
584
+ ## Motivation
585
+ {Why this refactoring is needed}
586
+
587
+ ## Current State
588
+ {Description of current implementation and its issues}
589
+
590
+ ## Proposed Changes
591
+ {What will be changed and how}
592
+
593
+ ## Acceptance Criteria
594
+ - [ ] All existing tests still pass
595
+ - [ ] No behavior changes (unless explicitly documented)
596
+ - [ ] Code complexity reduced (measurable via tools)
597
+ - [ ] Performance same or better
598
+
599
+ ## Testing Strategy
600
+ {How to verify nothing broke}
601
+
602
+ ## Rollback Plan
603
+ {How to undo changes if issues arise}
604
+ ```
605
+
606
+ ---
607
+
608
+ ## Using These Guidelines
609
+
610
+ ### For Ticket Creators
611
+ 1. Start with appropriate template for ticket type
612
+ 2. Fill in all required sections
613
+ 3. Add relevant tags and set appropriate priority
614
+ 4. Link to related tickets and dependencies
615
+ 5. Review before submitting - would you be able to work on this ticket?
616
+
617
+ ### For Ticket Reviewers
618
+ - Check title follows conventions
619
+ - Verify acceptance criteria are clear and measurable
620
+ - Ensure adequate context is provided
621
+ - Confirm priority and tags are appropriate
622
+ - Suggest improvements before work starts
623
+
624
+ ### For Ticket Workers
625
+ - Read entire ticket before starting
626
+ - Ask questions if anything is unclear
627
+ - Update ticket as you work (comments, state changes)
628
+ - Mark acceptance criteria as completed
629
+ - Add notes about implementation decisions
630
+
631
+ ### For AI Agents
632
+ When creating tickets programmatically:
633
+ 1. Use templates as starting point
634
+ 2. Fill in all sections with relevant information
635
+ 3. Generate specific, measurable acceptance criteria
636
+ 4. Include context and links to related resources
637
+ 5. Set appropriate priority based on impact and urgency
638
+ 6. Follow consistent formatting and structure
639
+ 7. Validate ticket has sufficient information before creating
640
+
641
+ ---
642
+
643
+ **Version**: 1.0.0
644
+ **Last Updated**: 2025-11-15
@@ -8,7 +8,7 @@ if TYPE_CHECKING:
8
8
  __all__ = ["MCPTicketServer"]
9
9
 
10
10
 
11
- def __dir__():
11
+ def __dir__() -> list[str]:
12
12
  """Return list of available names for dir().
13
13
 
14
14
  This ensures that MCPTicketServer appears in dir() results
@@ -17,7 +17,7 @@ def __dir__():
17
17
  return __all__
18
18
 
19
19
 
20
- def __getattr__(name: str):
20
+ def __getattr__(name: str) -> type:
21
21
  """Lazy import to avoid premature module loading.
22
22
 
23
23
  This prevents the RuntimeWarning when running:
@@ -4,7 +4,7 @@ This package provides the FastMCP server implementation for ticket management
4
4
  operations via the Model Context Protocol (MCP).
5
5
  """
6
6
 
7
- from typing import TYPE_CHECKING
7
+ from typing import TYPE_CHECKING, Any
8
8
 
9
9
  if TYPE_CHECKING:
10
10
  from .main import MCPTicketServer, main
@@ -12,7 +12,7 @@ if TYPE_CHECKING:
12
12
  __all__ = ["main", "MCPTicketServer"]
13
13
 
14
14
 
15
- def __getattr__(name: str):
15
+ def __getattr__(name: str) -> Any:
16
16
  """Lazy import to avoid premature module loading."""
17
17
  if name == "main":
18
18
  from .main import main