eslint-plugin-traceability 1.8.0 → 1.8.2

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +5 -5
  2. package/README.md +28 -29
  3. package/SECURITY.md +135 -0
  4. package/lib/src/index.d.ts +6 -35
  5. package/lib/src/index.js +8 -5
  6. package/lib/src/maintenance/cli.js +12 -16
  7. package/lib/src/maintenance/detect.js +28 -1
  8. package/lib/src/rules/helpers/require-story-io.d.ts +2 -2
  9. package/lib/src/rules/helpers/require-story-io.js +13 -13
  10. package/lib/src/rules/helpers/valid-annotation-format-internal.d.ts +2 -2
  11. package/lib/src/rules/helpers/valid-annotation-format-internal.js +3 -3
  12. package/lib/src/rules/helpers/valid-annotation-utils.d.ts +5 -0
  13. package/lib/src/rules/helpers/valid-annotation-utils.js +43 -5
  14. package/lib/src/rules/helpers/valid-implements-utils.d.ts +11 -11
  15. package/lib/src/rules/helpers/valid-implements-utils.js +11 -11
  16. package/lib/src/rules/helpers/valid-story-reference-helpers.js +19 -0
  17. package/lib/src/rules/prefer-implements-annotation.d.ts +7 -7
  18. package/lib/src/rules/prefer-implements-annotation.js +21 -21
  19. package/lib/src/rules/valid-annotation-format.js +50 -24
  20. package/lib/src/rules/valid-req-reference.js +9 -9
  21. package/lib/src/utils/annotation-checker.js +3 -1
  22. package/lib/src/utils/reqAnnotationDetection.d.ts +2 -2
  23. package/lib/src/utils/reqAnnotationDetection.js +28 -28
  24. package/lib/tests/config/flat-config-presets-integration.test.d.ts +1 -0
  25. package/lib/tests/config/flat-config-presets-integration.test.js +75 -0
  26. package/lib/tests/maintenance/batch.test.js +11 -11
  27. package/lib/tests/maintenance/cli.test.js +34 -27
  28. package/lib/tests/maintenance/report.test.js +7 -7
  29. package/lib/tests/plugin-default-export-and-configs.test.js +0 -2
  30. package/lib/tests/rules/prefer-implements-annotation.test.js +48 -15
  31. package/lib/tests/rules/require-branch-annotation.test.js +15 -36
  32. package/lib/tests/rules/require-req-annotation.test.js +31 -104
  33. package/lib/tests/rules/require-story-annotation.test.js +3 -3
  34. package/lib/tests/rules/require-story-io-behavior.test.js +2 -7
  35. package/lib/tests/rules/require-story-io.edgecases.test.js +2 -7
  36. package/lib/tests/rules/require-story-visitors-edgecases.test.js +8 -8
  37. package/lib/tests/rules/valid-annotation-format.test.js +23 -23
  38. package/lib/tests/rules/valid-req-reference.test.js +9 -9
  39. package/lib/tests/rules/valid-story-reference.test.js +4 -43
  40. package/lib/tests/utils/annotation-checker.test.js +2 -6
  41. package/lib/tests/utils/fsTestHelpers.d.ts +7 -0
  42. package/lib/tests/utils/fsTestHelpers.js +26 -0
  43. package/lib/tests/utils/ioTestHelpers.d.ts +7 -0
  44. package/lib/tests/utils/ioTestHelpers.js +24 -0
  45. package/lib/tests/utils/temp-dir-helpers.d.ts +14 -0
  46. package/lib/tests/utils/temp-dir-helpers.js +61 -0
  47. package/package.json +8 -7
  48. package/user-docs/api-reference.md +37 -20
  49. package/user-docs/eslint-9-setup-guide.md +89 -6
  50. package/user-docs/migration-guide.md +37 -21
  51. package/docs/ci-cd-pipeline.md +0 -224
  52. package/docs/cli-integration.md +0 -22
  53. package/docs/code-quality-refactor-opportunities-2025-12-03.md +0 -78
  54. package/docs/config-presets.md +0 -38
  55. package/docs/conventional-commits-guide.md +0 -185
  56. package/docs/custom-rules-development-guide.md +0 -659
  57. package/docs/decisions/0001-allow-dynamic-require-for-built-plugins.md +0 -26
  58. package/docs/decisions/001-typescript-for-eslint-plugin.accepted.md +0 -111
  59. package/docs/decisions/002-jest-for-eslint-testing.accepted.md +0 -137
  60. package/docs/decisions/003-code-quality-ratcheting-plan.md +0 -48
  61. package/docs/decisions/004-automated-version-bumping-for-ci-cd.md +0 -196
  62. package/docs/decisions/005-github-actions-validation-tooling.accepted.md +0 -144
  63. package/docs/decisions/006-semantic-release-for-automated-publishing.accepted.md +0 -227
  64. package/docs/decisions/007-github-releases-over-changelog.accepted.md +0 -216
  65. package/docs/decisions/008-ci-audit-flags.accepted.md +0 -60
  66. package/docs/decisions/009-security-focused-lint-rules.accepted.md +0 -64
  67. package/docs/decisions/010-implements-annotation-for-multi-story-requirements.proposed.md +0 -184
  68. package/docs/decisions/adr-0001-console-usage-for-cli-guards.md +0 -190
  69. package/docs/decisions/adr-accept-dev-dep-risk-glob.md +0 -40
  70. package/docs/decisions/adr-commit-branch-tests.md +0 -54
  71. package/docs/decisions/adr-maintenance-cli-interface.md +0 -140
  72. package/docs/decisions/adr-pre-push-parity.md +0 -112
  73. package/docs/decisions/code-quality-ratcheting-plan.md +0 -53
  74. package/docs/dependency-health.md +0 -238
  75. package/docs/eslint-9-setup-guide.md +0 -517
  76. package/docs/eslint-plugin-development-guide.md +0 -487
  77. package/docs/functionality-coverage-2025-12-03.md +0 -250
  78. package/docs/jest-testing-guide.md +0 -100
  79. package/docs/rules/prefer-implements-annotation.md +0 -219
  80. package/docs/rules/require-branch-annotation.md +0 -71
  81. package/docs/rules/require-req-annotation.md +0 -203
  82. package/docs/rules/require-story-annotation.md +0 -159
  83. package/docs/rules/valid-annotation-format.md +0 -418
  84. package/docs/rules/valid-req-reference.md +0 -153
  85. package/docs/rules/valid-story-reference.md +0 -120
  86. package/docs/security-incidents/2025-11-17-glob-cli-incident.md +0 -45
  87. package/docs/security-incidents/2025-11-18-brace-expansion-redos.md +0 -45
  88. package/docs/security-incidents/2025-11-18-bundled-dev-deps-accepted-risk.md +0 -93
  89. package/docs/security-incidents/2025-11-18-tar-race-condition.md +0 -43
  90. package/docs/security-incidents/2025-12-03-dependency-health-review.md +0 -58
  91. package/docs/security-incidents/SECURITY-INCIDENT-2025-11-18-semantic-release-bundled-npm.known-error.md +0 -104
  92. package/docs/security-incidents/SECURITY-INCIDENT-TEMPLATE.md +0 -37
  93. package/docs/security-incidents/dependency-override-rationale.md +0 -57
  94. package/docs/security-incidents/dev-deps-high.json +0 -116
  95. package/docs/security-incidents/handling-procedure.md +0 -54
  96. package/docs/stories/001.0-DEV-PLUGIN-SETUP.story.md +0 -92
  97. package/docs/stories/002.0-DEV-ESLINT-CONFIG.story.md +0 -82
  98. package/docs/stories/003.0-DEV-FUNCTION-ANNOTATIONS.story.md +0 -112
  99. package/docs/stories/004.0-DEV-BRANCH-ANNOTATIONS.story.md +0 -153
  100. package/docs/stories/005.0-DEV-ANNOTATION-VALIDATION.story.md +0 -138
  101. package/docs/stories/006.0-DEV-FILE-VALIDATION.story.md +0 -144
  102. package/docs/stories/007.0-DEV-ERROR-REPORTING.story.md +0 -163
  103. package/docs/stories/008.0-DEV-AUTO-FIX.story.md +0 -150
  104. package/docs/stories/009.0-DEV-MAINTENANCE-TOOLS.story.md +0 -117
  105. package/docs/stories/010.0-DEV-DEEP-VALIDATION.story.md +0 -124
  106. package/docs/stories/010.1-DEV-CONFIGURABLE-PATTERNS.story.md +0 -149
  107. package/docs/stories/010.2-DEV-MULTI-STORY-SUPPORT.story.md +0 -216
  108. package/docs/stories/010.3-DEV-MIGRATE-TO-IMPLEMENTS.story.md +0 -236
  109. package/docs/stories/developer-story.map.md +0 -120
  110. package/docs/ts-jest-presets-guide.md +0 -548
@@ -1,236 +0,0 @@
1
- # 010.3-DEV-MIGRATE-TO-IMPLEMENTS: Recommend @implements and Auto-fix Migration
2
-
3
- ## Release Goal
4
-
5
- _Release 0.1 Enhancement: Provide optional migration tooling and recommendations to convert from @story/@req annotations to the new @implements format_
6
-
7
- This story provides optional warnings and ESLint auto-fix capabilities to help teams migrate from `@story` + `@req` annotations to the new `@implements` format. It encourages adoption of the clearer, more explicit `@implements` syntax while maintaining full support for both formats, with configurable enforcement levels for teams that want to standardize on `@implements`.
8
-
9
- ## How This Story Contributes
10
-
11
- This story enhances the "Fix Issues" journey phase by providing automated tools to migrate from legacy annotations to the new format. It reduces manual migration effort and ensures codebases can adopt the improved `@implements` syntax with minimal friction, while deprecation warnings guide teams toward best practices.
12
-
13
- ## User Story
14
-
15
- **Format**: So that I can easily migrate from `@story`/`@req` annotations to the new `@implements` format, as a Developer or Team Lead, I want optional warnings with auto-fix capabilities that automatically convert my annotations.
16
-
17
- **INVEST Criteria Compliance**:
18
-
19
- - **Independent**: Can be developed after `@implements` support is implemented (depends on 010.2)
20
- - **Negotiable**: Recommendation enforcement level and warning severity can be adjusted
21
- - **Valuable**: Reduces migration friction and guides teams toward best practices
22
- - **Estimable**: Scope is clear - add optional warnings and auto-fix transformation
23
- - **Small**: Can be completed within a single iteration/sprint
24
- - **Testable**: Auto-fix transformation can be thoroughly tested with various annotation patterns
25
-
26
- ## Acceptance Criteria
27
-
28
- Use checkbox format for clear completion tracking:
29
-
30
- - [x] **Optional Warning**: Emit configurable warning/recommendation when `@story` + `@req` annotations are detected (default: off)
31
- - [x] **Auto-fix Support**: Provide ESLint auto-fix that converts `@story` + `@req` to `@implements`
32
- - [x] **Single Story Conversion**: Auto-fix converts single `@story` with multiple `@req` to one `@implements` line
33
- - [x] **Multi-story Detection**: Detect when function has `@req` that don't match `@story` and warn (cannot auto-fix)
34
- - [x] **Preserve Order**: Auto-fix maintains relative position of annotations (after description, before params)
35
- - [x] **Configurable Enforcement**: Allow configuration of recommendation level (off, warn, error) - default off to maintain backward compatibility
36
- - [x] **Both Formats Valid**: Ensure `@story`/`@req` continues to pass all validation when recommendation is disabled
37
- - [x] **Quality Standards**: Auto-fix produces valid `@implements` annotations that pass validation
38
- - [x] **Documentation**: Migration guide with auto-fix examples and opt-in configuration
39
-
40
- ## Requirements (Current Implementation or To Be Implemented)
41
-
42
- Document specific technical requirements using the format:
43
-
44
- - **REQ-OPTIONAL-WARNING**: Emit configurable recommendation warning for `@story` + `@req` usage (default: disabled)
45
- - **REQ-AUTO-FIX**: Implement auto-fix to transform `@story` + `@req` to `@implements`
46
- - **REQ-SINGLE-STORY-FIX**: Auto-fix single-story annotations (one `@story`, multiple `@req`)
47
- - **REQ-MULTI-STORY-DETECT**: Detect and warn about multi-story patterns that cannot be auto-fixed
48
- - **REQ-PRESERVE-FORMAT**: Maintain JSDoc structure and annotation order during conversion
49
- - **REQ-CONFIG-SEVERITY**: Support configurable recommendation severity (off/warn/error), default off
50
- - **REQ-BACKWARD-COMPAT-VALIDATION**: Ensure `@story`/`@req` continues to validate correctly regardless of recommendation setting
51
- - **REQ-VALID-OUTPUT**: Auto-fix output passes all `@implements` validation rules
52
-
53
- ## Dependencies
54
-
55
- List other stories this story depends on, using numbered story references:
56
-
57
- - 001.0-DEV-PLUGIN-SETUP (requires plugin structure foundation)
58
- - 002.0-DEV-ESLINT-CONFIG (requires configuration system)
59
- - 003.0-DEV-FUNCTION-ANNOTATIONS (deprecates function annotation pattern)
60
- - 008.0-DEV-AUTO-FIX (uses auto-fix infrastructure)
61
- - 010.2-DEV-MULTI-STORY-SUPPORT (requires `@implements` annotation support)
62
-
63
- **Dependency Rules**:
64
-
65
- - Story numbers MUST be greater than all dependency story numbers
66
- - Dependencies should be from in-scope stories when possible
67
- - Cross-release dependencies should be clearly justified
68
- - No circular dependencies allowed
69
-
70
- ## Implementation Notes (Optional)
71
-
72
- Additional context for developers:
73
-
74
- **Development Resources**:
75
-
76
- - See [Auto-fix Guide](../custom-rules-development-guide.md#auto-fix) for ESLint auto-fix patterns
77
- - Review story 008.0-DEV-AUTO-FIX for auto-fix infrastructure
78
- - See [Testing Guide](../jest-testing-guide.md) for auto-fix testing patterns
79
-
80
- **Implementation Details**:
81
-
82
- - Add new rule `prefer-implements-annotation` (or similar name indicating preference, not requirement)
83
- - Rule is **disabled by default** to maintain backward compatibility
84
- - When enabled, detect `@story` + `@req` pattern and emit configurable recommendation
85
- - Implement auto-fix that:
86
- 1. Extracts `@story` path
87
- 2. Collects all `@req` IDs
88
- 3. Removes `@story` and `@req` lines
89
- 4. Inserts `@implements <story-path> <REQ-1> <REQ-2> ...` line
90
- 5. Maintains position after description, before `@param`
91
- - Handle edge cases:
92
- - Multiple `@story` annotations (warn, cannot auto-fix)
93
- - `@req` without matching `@story` (warn, cannot auto-fix)
94
- - Mixed `@story`/`@req` and `@implements` (warn, manual migration needed)
95
- - Support configuration option to control recommendation severity (default: "off")
96
- - Ensure `@story`/`@req` validation continues to work correctly when rule is disabled
97
- - Ensure auto-fixed code passes all validation rules
98
-
99
- **Auto-fix Transformation Examples**:
100
-
101
- Before (legacy format):
102
-
103
- ```javascript
104
- /**
105
- * Calculate age in days since publish date.
106
- * @param {string} publishDate - ISO date string
107
- * @returns {number} Days since publish
108
- * @story prompts/002.0-DEV-FETCH-AVAILABLE-VERSIONS.md
109
- * @req REQ-AGE-CALC
110
- */
111
- export function calculateAgeInDays(publishDate) {
112
- ```
113
-
114
- After (auto-fixed to @implements):
115
-
116
- ```javascript
117
- /**
118
- * Calculate age in days since publish date.
119
- * @implements prompts/002.0-DEV-FETCH-AVAILABLE-VERSIONS.md REQ-AGE-CALC
120
- * @param {string} publishDate - ISO date string
121
- * @returns {number} Days since publish
122
- */
123
- export function calculateAgeInDays(publishDate) {
124
- ```
125
-
126
- Before (multiple requirements):
127
-
128
- ```javascript
129
- /**
130
- * Filter packages by age threshold.
131
- * @story prompts/005.0-DEV-CONFIGURABLE-AGE-THRESHOLD.md
132
- * @req REQ-CLI-FLAG
133
- * @req REQ-CONFIG-FILE
134
- * @req REQ-VALIDATION
135
- * @param {Array} rows - Package rows
136
- * @returns {Array} Filtered rows
137
- */
138
- export function filterByAge(rows) {
139
- ```
140
-
141
- After (auto-fixed):
142
-
143
- ```javascript
144
- /**
145
- * Filter packages by age threshold.
146
- * @implements prompts/005.0-DEV-CONFIGURABLE-AGE-THRESHOLD.md REQ-CLI-FLAG REQ-CONFIG-FILE REQ-VALIDATION
147
- * @param {Array} rows - Package rows
148
- * @returns {Array} Filtered rows
149
- */
150
- export function filterByAge(rows) {
151
- ```
152
-
153
- Cannot auto-fix (manual migration needed):
154
-
155
- ```javascript
156
- /**
157
- * Integration function with multiple stories.
158
- * @story prompts/003.0-DEV-IDENTIFY-OUTDATED.md
159
- * @req REQ-AGE-THRESHOLD
160
- * @req REQ-AUDIT-CHECK // From different story!
161
- * @param {Array} rows
162
- */
163
- export function applyFilters(rows) {
164
- ```
165
-
166
- Warning emitted:
167
-
168
- ```
169
- Multiple stories detected. Cannot auto-fix. Manually migrate to @implements format:
170
- @implements prompts/003.0-DEV-IDENTIFY-OUTDATED.md REQ-AGE-THRESHOLD
171
- @implements prompts/004.0-DEV-FILTER-VULNERABLE-VERSIONS.md REQ-AUDIT-CHECK
172
- ```
173
-
174
- **Configuration Options**:
175
-
176
- ```javascript
177
- // eslint.config.js - Default (both formats accepted)
178
- {
179
- "traceability/prefer-implements-annotation": "off" // Default - no warnings
180
- }
181
-
182
- // eslint.config.js - Recommend migration (warnings only)
183
- {
184
- "traceability/prefer-implements-annotation": "warn" // Suggest using @implements
185
- }
186
-
187
- // eslint.config.js - Enforce new format (errors)
188
- {
189
- "traceability/prefer-implements-annotation": "error" // Require @implements
190
- }
191
- ```
192
-
193
- **Recommendation Warning Messages**:
194
-
195
- ```typescript
196
- messages: {
197
- preferImplements: "Consider using @implements instead of @story + @req for clearer traceability. Run ESLint with --fix to auto-convert.",
198
- cannotAutoFix: "Cannot auto-fix: {{reason}}. Manual migration to @implements required.",
199
- multiStoryDetected: "Multiple @story annotations detected. Manually convert to separate @implements lines."
200
- }
201
- ```
202
-
203
- **Testing Strategy**:
204
-
205
- - Unit tests for auto-fix transformation with various annotation patterns
206
- - Tests for single-story, multi-requirement scenarios
207
- - Tests for edge cases that cannot be auto-fixed
208
- - Integration tests verifying auto-fixed code passes validation
209
- - Tests for preserving JSDoc structure and formatting
210
- - Configuration tests for recommendation severity levels (off/warn/error)
211
- - Tests verifying `@story`/`@req` validation works correctly when rule is disabled (default)
212
- - Tests verifying both formats coexist without conflicts
213
-
214
- **Migration Timeline** (Planned):
215
-
216
- 1. **Phase 1 (Release 0.1)**: Add optional recommendation rule (default: off) with auto-fix support
217
- 2. **Phase 2 (Release 0.2+)**: Enable recommendation by default (warn level) to guide new adoption
218
- 3. **Phase 3 (Future Release)**: Consider deprecation warnings (teams can opt-in to error level)
219
- 4. **Phase 4 (Future Major Release)**: Evaluate removing `@story`/`@req` support based on ecosystem adoption
220
-
221
- Note: Both formats remain fully supported indefinitely. Teams control their own migration timeline via configuration.
222
-
223
- ## Definition of Done
224
-
225
- - [x] All acceptance criteria met
226
- - [ ] Code reviewed and approved
227
- - [x] Tests written and passing (auto-fix transformations, edge cases, configuration)
228
- - [x] Documentation updated (migration guide, auto-fix examples, opt-in configuration)
229
- - [ ] Auto-fix verified with dry-aged-deps codebase
230
- - [x] Rule disabled by default (backward compatibility confirmed)
231
- - [x] Recommendation warnings tested at different severity levels (off/warn/error)
232
- - [x] Both annotation formats validated correctly regardless of rule setting
233
- - [x] Cannot-auto-fix scenarios properly detected and reported
234
- - [x] Integration tested with 010.2-DEV-MULTI-STORY-SUPPORT
235
-
236
- ---
@@ -1,120 +0,0 @@
1
- # Developer User Story Map - ESLint Plugin Traceability
2
-
3
- ## Journey Steps (Columns)
4
-
5
- | **Setup Plugin** | **Write Code** | **Validate Annotations** | **Fix Issues** | **Maintain Quality** |
6
- | ------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------- |
7
- | _Install and configure the ESLint plugin in their project to start enforcing traceability_ | _Write functions and code branches with proper @story and @req annotations_ | _Run linting to check that annotations exist and are valid_ | _Address any traceability violations found by the linter_ | _Keep annotations up-to-date as code evolves_ |
8
- | **Installation** | **Function Annotations** | **Annotation Validation** | **Error Resolution** | **Ongoing Maintenance** |
9
- | **Configuration** | **Branch Annotations** | **File Reference Validation** | **Quick Fixes** | **Ongoing Maintenance** |
10
-
11
- ## Personas
12
-
13
- - 🎯 **PRIMARY**: Developer - _A software developer who needs to maintain bidirectional traceability between code and requirements to ensure code quality and enable requirement validation through test execution_
14
- - 👥 **Team Lead** - _A technical lead who needs to ensure team compliance with traceability standards across the codebase_
15
- - 🔧 **QA Engineer** - _A quality assurance engineer who needs to validate that requirements are properly implemented and traceable through code_
16
-
17
- ---
18
-
19
- # User Story Map with Releases
20
-
21
- | **Release 0.1 (Core Validation)** (Planned) | **Setup Plugin** | **Write Code** | **Validate Annotations** | **Fix Issues** | **Maintain Quality** |
22
- | ------------------------------------------- | ------------------------------- | ------------------------------ | ------------------------------- | ------------------------------- | --------------------------- |
23
- | **Plugin Foundation** | 001.0-DEV-PLUGIN-SETUP | 003.0-DEV-FUNCTION-ANNOTATIONS | 005.0-DEV-ANNOTATION-VALIDATION | 007.0-DEV-ERROR-REPORTING | 009.0-DEV-MAINTENANCE-TOOLS |
24
- | **Basic Rules** | 002.0-DEV-ESLINT-CONFIG | 004.0-DEV-BRANCH-ANNOTATIONS | 006.0-DEV-FILE-VALIDATION | 008.0-DEV-AUTO-FIX | 010.0-DEV-DEEP-VALIDATION |
25
- | **Enhanced Configuration** | 010.1-DEV-CONFIGURABLE-PATTERNS | 010.2-DEV-MULTI-STORY-SUPPORT | - | 010.3-DEV-MIGRATE-TO-IMPLEMENTS | - |
26
-
27
- | **Release 0.2 (Enhanced Features)** (Future) | **Setup Plugin** | **Write Code** | **Validate Annotations** | **Fix Issues** | **Maintain Quality** |
28
- | -------------------------------------------- | --------------------------- | ---------------------------- | ---------------------------- | --------------------------- | ------------------------- |
29
- | **Advanced Validation** | 011.0-DEV-IDE-INTEGRATION | 013.0-DEV-SMART-SUGGESTIONS | 015.0-DEV-REAL-TIME-FEEDBACK | 016.0-DEV-BULK-FIXES | 018.0-DEV-QUALITY-METRICS |
30
- | **Developer Experience** | 012.0-DEV-PROJECT-TEMPLATES | 014.0-DEV-ANNOTATION-HELPERS | - | 017.0-DEV-GUIDED-RESOLUTION | 019.0-DEV-DASHBOARD |
31
- | | - | - | - | - | - |
32
-
33
- ---
34
-
35
- ## Release Details
36
-
37
- ### Release 0.1: Core Validation (Planned)
38
-
39
- **Goal**: Provide essential ESLint rules that enforce @story and @req annotations on functions and code branches, with validation that referenced files exist and contain the referenced requirements.
40
- **Success Metric**: Developers can run ESLint and receive clear feedback when traceability annotations are missing, incorrect, or point to non-existent files/requirements.
41
- **Scope**: Basic plugin setup, core validation rules, error reporting, and simple auto-fix capabilities for common issues.
42
-
43
- **Stories by Category:**
44
-
45
- - **Plugin Foundation**: 001.0-DEV-PLUGIN-SETUP (ESLint plugin structure), 002.0-DEV-ESLINT-CONFIG (configuration setup)
46
- - **Core Annotations**: 003.0-DEV-FUNCTION-ANNOTATIONS (validate @story/@req on functions), 004.0-DEV-BRANCH-ANNOTATIONS (validate annotations on branches)
47
- - **Validation Logic**: 005.0-DEV-ANNOTATION-VALIDATION (check annotation format), 006.0-DEV-FILE-VALIDATION (verify story files exist)
48
- - **Developer Support**: 007.0-DEV-ERROR-REPORTING (clear error messages), 008.0-DEV-AUTO-FIX (simple auto-fixes)
49
- - **Ongoing Maintenance**: 009.0-DEV-MAINTENANCE-TOOLS (update helpers)
50
- - **Deep Validation**: 010.0-DEV-DEEP-VALIDATION (requirement content validation)
51
- - **Enhanced Configuration**: 010.1-DEV-CONFIGURABLE-PATTERNS (custom format patterns), 010.2-DEV-MULTI-STORY-SUPPORT (@implements annotation for multi-story requirements), 010.3-DEV-MIGRATE-TO-IMPLEMENTS (deprecate legacy format with auto-fix migration)
52
-
53
- **Total**: 13 stories covering complete basic traceability enforcement workflow with configuration flexibility and migration tooling
54
-
55
- ### Release 0.2: Enhanced Features (Future)
56
-
57
- **Goal**: Enhance developer experience with IDE integration, intelligent suggestions, advanced validation, and quality metrics to make traceability maintenance effortless and valuable.
58
- **Success Metric**: Developers proactively maintain traceability annotations with minimal friction, and teams can track and improve their traceability coverage over time.
59
- **Scope**: IDE extensions, smart auto-completion, deep requirement validation, bulk fixing tools, and traceability quality dashboards.
60
-
61
- **Stories by Category:**
62
-
63
- - **Developer Integration**: 011.0-DEV-IDE-INTEGRATION (VS Code extension), 012.0-DEV-PROJECT-TEMPLATES (starter templates)
64
- - **Smart Features**: 013.0-DEV-SMART-SUGGESTIONS (intelligent annotation suggestions), 014.0-DEV-ANNOTATION-HELPERS (auto-completion)
65
- - **Advanced Validation**: 015.0-DEV-REAL-TIME-FEEDBACK (live validation)
66
- - **Productivity Tools**: 016.0-DEV-BULK-FIXES (mass update tools), 017.0-DEV-GUIDED-RESOLUTION (fix wizards)
67
- - **Quality Management**: 018.0-DEV-QUALITY-METRICS (coverage tracking), 019.0-DEV-DASHBOARD (team dashboard)
68
-
69
- **Total**: 9 stories covering advanced developer experience and team quality management
70
-
71
- ---
72
-
73
- ## Key Questions for Developer
74
-
75
- ### **Release 0.1 Questions:**
76
-
77
- **Plugin Foundation:**
78
-
79
- - How easy is it to add the ESLint plugin to an existing project without disrupting current workflow?
80
- - What configuration options are needed to accommodate different project structures and story file locations?
81
- - How should the plugin handle different story file naming conventions (.story.md vs other formats)?
82
-
83
- **Core Annotations:**
84
-
85
- - What types of functions should require @story annotations (all functions, only exported functions, only functions above certain complexity)?
86
- - Which code branches need traceability annotations (if/else, try/catch, switch cases, loops)?
87
- - How should the plugin handle generated code or third-party code that can't have annotations?
88
- - How should integration functions reference requirements from multiple stories while maintaining clear traceability?
89
-
90
- **Validation Logic:**
91
-
92
- - How strict should annotation format validation be (exact format vs flexible parsing)?
93
- - Should the plugin validate that @req annotations point to actual requirements within the referenced story file?
94
- - How should the plugin handle story files that exist but are empty or malformed?
95
-
96
- **Developer Support:**
97
-
98
- - What information should be included in error messages to help developers fix annotation issues quickly?
99
- - Which annotation errors can be auto-fixed safely (missing @story template, broken file paths)?
100
- - How should the plugin integrate with existing ESLint configurations and other rules?
101
-
102
- ### **Release 0.2 Questions:**
103
-
104
- **Developer Integration:**
105
-
106
- - What IDE features would make maintaining traceability annotations feel natural and effortless?
107
- - How can the plugin provide intelligent suggestions for @story references based on file context?
108
- - What project templates would help new teams adopt traceability practices from the start?
109
-
110
- **Advanced Validation:**
111
-
112
- - Should the plugin parse story files to validate that referenced requirements actually exist in the content?
113
- - How can the plugin detect when story files are updated but code annotations become stale?
114
- - What real-time feedback mechanisms would help developers maintain traceability as they code?
115
-
116
- **Quality Management:**
117
-
118
- - What metrics help teams understand and improve their traceability coverage?
119
- - How can teams track traceability quality trends over time?
120
- - What visualization tools would help identify areas of the codebase with poor traceability?