Skip to content

Commit b3a2873

Browse files
authored
Merge pull request #8 from Oltrematica/005-smart-repo-filter
feat(005): Smart Repository Filtering with Activity Stats
2 parents d5ad6d4 + 8d234a6 commit b3a2873

17 files changed

Lines changed: 3878 additions & 36 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Auto-generated from all feature plans. Last updated: 2025-11-28
88
- Python 3.9+ (per constitution, leveraging type hints) + Standard library only (urllib, json, csv, os, re, datetime, statistics); optional: requests (already used in jira_client.py) (003-jira-quality-metrics)
99
- Python 3.9+ (as per constitution, leveraging type hints) + Standard library only (urllib, json); optional: requests (existing pattern) (004-github-repo-selection)
1010
- N/A (repos.txt file is input, not storage) (004-github-repo-selection)
11+
- Python 3.9+ (per constitution, leveraging type hints) + Standard library (urllib, json); optional: requests (already in codebase) (005-smart-repo-filter)
12+
- N/A (in-memory filtering during selection) (005-smart-repo-filter)
1113

1214
- Python 3.9+ (as per constitution, leveraging type hints) + Standard library only (urllib, json, csv, os, re); optional: requests (001-modular-refactor)
1315

@@ -39,9 +41,9 @@ python github_analyzer.py --days 7
3941
Python 3.9+ (as per constitution, leveraging type hints): Follow standard conventions
4042

4143
## Recent Changes
44+
- 005-smart-repo-filter: Added Python 3.9+ (per constitution, leveraging type hints) + Standard library (urllib, json); optional: requests (already in codebase)
4245
- 004-github-repo-selection: Added Python 3.9+ (as per constitution, leveraging type hints) + Standard library only (urllib, json); optional: requests (existing pattern)
4346
- 003-jira-quality-metrics: Added Python 3.9+ (per constitution, leveraging type hints) + Standard library only (urllib, json, csv, os, re, datetime, statistics); optional: requests (already used in jira_client.py)
44-
- 002-jira-integration: Added Python 3.9+ (per constitution, leveraging type hints) + Standard library (urllib, json, csv, os, re); optional: requests
4547

4648

4749
<!-- MANUAL ADDITIONS START -->

repos.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
Oltrematica/manucloud
2-
Oltrematica/manucloud-app
3-
Oltrematica/PescaraParcheggi
4-
Oltrematica/tutorami
1+
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# Comprehensive Requirements Quality Checklist
2+
3+
**Feature**: 005-smart-repo-filter (Smart Repository Filtering)
4+
**Purpose**: Formal gate validation of requirements quality across API, CLI/UX, and Error Handling
5+
**Created**: 2025-11-29
6+
**Audience**: Peer Reviewer (PR Review)
7+
**Depth**: Formal Gate (~40 items)
8+
9+
---
10+
11+
## Requirement Completeness
12+
13+
- [X] CHK001 - Are all menu options ([A], [L], [O], [S]) explicitly specified with filtering behavior? [Completeness, Spec §FR-003/004/005]
14+
- [X] CHK002 - Is the exact statistics display format fully specified beyond "N repos found, M with activity"? [Completeness, Spec §FR-007]
15+
- [X] CHK003 - Are requirements for the confirmation prompt response options (Y/n/all) documented? [Gap]
16+
- [X] CHK004 - Is the `pushed_at` field parsing format explicitly specified in requirements? [Completeness, Spec §FR-002]
17+
- [X] CHK005 - Are requirements documented for what happens when `--days` parameter is not provided? [Gap]
18+
- [X] CHK006 - Is the cutoff date calculation (inclusive vs exclusive of boundary day) specified? [Gap]
19+
20+
---
21+
22+
## Requirement Clarity
23+
24+
- [X] CHK007 - Is "recent activity" quantified with the specific `pushed_at` field definition? [Clarity, Spec §FR-002]
25+
- [X] CHK008 - Is "gracefully falling back" in FR-008 defined with specific behavior steps? [Clarity, Spec §FR-008]
26+
- [X] CHK009 - Is the "warning" message format for zero results explicitly specified? [Clarity, Spec §FR-009]
27+
- [X] CHK010 - Is "within 5 seconds" in SC-001 measured from what starting point? [Ambiguity, Spec §SC-001]
28+
- [X] CHK011 - Is "without timeout or performance degradation" in SC-005 quantified? [Ambiguity, Spec §SC-005]
29+
- [X] CHK012 - Are the specific Search API query qualifiers (`org:`, `pushed:>`) documented in requirements? [Clarity]
30+
31+
---
32+
33+
## Requirement Consistency
34+
35+
- [X] CHK013 - Are activity filtering requirements consistent between personal repos (FR-003) and org repos (FR-004)? [Consistency]
36+
- [X] CHK014 - Is the confirmation prompt pattern consistent across [A], [L], and [O] handlers? [Consistency]
37+
- [X] CHK015 - Are statistics display formats consistent between personal and organization repos? [Consistency, Spec §FR-007]
38+
- [X] CHK016 - Do plan.md method names align with tasks.md function signatures? [Consistency, Plan/Tasks]
39+
- [X] CHK017 - Are rate limit handling requirements consistent between Search API and REST API? [Consistency, Spec §FR-008]
40+
41+
---
42+
43+
## Acceptance Criteria Quality
44+
45+
- [X] CHK018 - Can "135 repos found, 28 with activity" format be objectively verified? [Measurability, Spec §US1]
46+
- [X] CHK019 - Is the acceptance scenario "only repositories with recent activity are analyzed" testable? [Measurability, Spec §US1-3]
47+
- [X] CHK020 - Can "100% accuracy" in SC-003 be objectively measured? [Measurability, Spec §SC-003]
48+
- [X] CHK021 - Are independent test criteria for each user story specific enough to execute? [Measurability]
49+
- [X] CHK022 - Is "significant time savings" in US1/US2 quantified? [Ambiguity, Spec §US1/US2]
50+
51+
---
52+
53+
## Scenario Coverage - Primary Flows
54+
55+
- [X] CHK023 - Are requirements complete for [A] option with activity filtering? [Coverage, Spec §FR-003]
56+
- [X] CHK024 - Are requirements complete for [L] option with numbered selection + filtering? [Coverage, Spec §FR-003]
57+
- [X] CHK025 - Are requirements complete for [O] option with org name input + Search API? [Coverage, Spec §FR-004]
58+
- [X] CHK026 - Are requirements complete for [S] option explicitly bypassing filter? [Coverage, Spec §FR-005]
59+
60+
---
61+
62+
## Scenario Coverage - Alternate Flows
63+
64+
- [X] CHK027 - Are requirements defined for user selecting "all" to bypass filter? [Coverage, Spec §FR-006]
65+
- [X] CHK028 - Are requirements defined for user adjusting timeframe when zero results? [Coverage, Edge Case §1]
66+
- [X] CHK029 - Are requirements defined for re-prompting after invalid menu selection? [Gap]
67+
- [X] CHK030 - Is the behavior specified when user cancels during confirmation prompt? [Gap]
68+
69+
---
70+
71+
## Scenario Coverage - Exception/Error Flows
72+
73+
- [X] CHK031 - Are requirements complete for Search API rate limit (403) handling? [Coverage, Spec §FR-008]
74+
- [X] CHK032 - Are requirements defined for Search API server errors (5xx)? [Gap, Edge Case §2]
75+
- [X] CHK033 - Is `incomplete_results` flag handling specified with user feedback? [Coverage, Edge Case]
76+
- [X] CHK034 - Are requirements defined for network timeout during Search API call? [Gap]
77+
- [X] CHK035 - Are requirements defined for authentication failure during search? [Gap]
78+
79+
---
80+
81+
## Scenario Coverage - Recovery Flows
82+
83+
- [X] CHK036 - Is fallback-to-unfiltered-mode recovery path fully specified? [Coverage, Spec §FR-008]
84+
- [X] CHK037 - Can user retry with different timeframe after zero results? [Coverage, Edge Case §1]
85+
- [X] CHK038 - Is retry behavior specified for transient Search API failures? [Gap]
86+
87+
---
88+
89+
## Non-Functional Requirements - Performance
90+
91+
- [X] CHK039 - Is the 5-second response requirement (SC-001) defined for all repo counts? [Coverage, Spec §SC-001]
92+
- [X] CHK040 - Are performance requirements specified for 500+ repos scenario (SC-005)? [Coverage, Spec §SC-005]
93+
- [X] CHK041 - Is Search API pagination performance requirement specified for large orgs? [Gap]
94+
- [X] CHK042 - Is memory usage requirement specified for large result sets? [Gap]
95+
96+
---
97+
98+
## Non-Functional Requirements - API Constraints
99+
100+
- [X] CHK043 - Is the 30 requests/minute Search API rate limit documented in requirements? [Coverage, Assumptions]
101+
- [X] CHK044 - Is the 1000 results/query Search API limit documented? [Coverage, Assumptions]
102+
- [X] CHK045 - Are Search API vs REST API rate limit pool differences documented? [Coverage, Assumptions]
103+
104+
---
105+
106+
## Dependencies & Assumptions
107+
108+
- [X] CHK046 - Is the assumption "Search API provides `pushed` date filtering" validated? [Assumption, Spec §Assumptions]
109+
- [X] CHK047 - Is the dependency on Feature 004's `select_github_repos()` documented? [Dependency]
110+
- [X] CHK048 - Is the `--days` parameter availability from existing config documented? [Dependency]
111+
- [X] CHK049 - Is the existing `list_org_repos()` method availability validated for T026? [Dependency]
112+
113+
---
114+
115+
## Ambiguities & Conflicts
116+
117+
- [X] CHK050 - Is there a conflict between "automatic filtering" default and user expectation of seeing all repos? [Conflict]
118+
- [X] CHK051 - Is the term "active" vs "recently pushed" used consistently throughout? [Terminology]
119+
- [X] CHK052 - Is the hybrid approach (Search API for org, client-side for personal) explicitly justified in requirements? [Gap]
120+
121+
---
122+
123+
## Summary
124+
125+
| Category | Items | Focus | Status |
126+
|----------|-------|-------|--------|
127+
| Requirement Completeness | CHK001-CHK006 | Missing specifications | ✅ PASS |
128+
| Requirement Clarity | CHK007-CHK012 | Vague/ambiguous terms | ✅ PASS |
129+
| Requirement Consistency | CHK013-CHK017 | Cross-artifact alignment | ✅ PASS |
130+
| Acceptance Criteria Quality | CHK018-CHK022 | Measurability | ✅ PASS |
131+
| Primary Flow Coverage | CHK023-CHK026 | Core scenarios | ✅ PASS |
132+
| Alternate Flow Coverage | CHK027-CHK030 | User choice paths | ✅ PASS |
133+
| Exception Flow Coverage | CHK031-CHK035 | Error scenarios | ✅ PASS |
134+
| Recovery Flow Coverage | CHK036-CHK038 | Fallback behavior | ✅ PASS |
135+
| Performance NFRs | CHK039-CHK042 | Speed/scale requirements | ✅ PASS |
136+
| API Constraints | CHK043-CHK045 | External limits | ✅ PASS |
137+
| Dependencies | CHK046-CHK049 | External factors | ✅ PASS |
138+
| Ambiguities | CHK050-CHK052 | Conflicts/terminology | ✅ PASS |
139+
140+
**Total Items**: 52
141+
**Completed**: 52/52 (100%)
142+
**Status**: ✅ PASSED
143+
144+
## Resolution Notes
145+
146+
All checklist items have been addressed in the updated `spec.md`:
147+
148+
1. **Glossary added**: Defines "active repository", "inactive repository", "cutoff date", "pushed_at", and "activity filter"
149+
2. **FR-002 updated**: Specifies `pushed_at` ISO 8601 format and exact filtering logic
150+
3. **FR-003/FR-004 updated**: Detailed behavior for each menu option
151+
4. **FR-006 updated**: Confirmation prompt options (Y/n/all) fully documented
152+
5. **FR-008 updated**: Graceful fallback steps for rate limit, server errors, and timeout
153+
6. **FR-010 updated**: Default behavior when --days not provided
154+
7. **Edge cases expanded**: 10 specific scenarios with exact error messages
155+
8. **SC-001 clarified**: "5 seconds" measured from user pressing Enter
156+
9. **SC-005 clarified**: "10 seconds" includes pagination, "without degradation" means <10s response
157+
10. **Performance table added**: Response time and memory limits per scenario
158+
11. **API Constraints section**: Documents 30 req/min, 1000 results/query, separate rate pools
159+
12. **Dependencies section**: Validates all internal dependencies exist
160+
13. **Design Decisions section**: Justifies hybrid approach and default filtering behavior
161+
14. **US1/US2 updated**: Quantified time savings (~80%, ~90%)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Requirements Checklist: Smart Repository Filtering
2+
3+
**Feature**: 005-smart-repo-filter
4+
**Validated**: 2025-11-29
5+
6+
## Specification Quality Criteria
7+
8+
### User Stories
9+
- [x] At least one user story with clear acceptance scenarios
10+
- [x] Each story has priority (P1-P4) with justification
11+
- [x] Independent test scenario for each story
12+
- [x] Edge cases identified and documented
13+
14+
### Functional Requirements
15+
- [x] Requirements use MUST/SHOULD/MAY language
16+
- [x] Each requirement is testable
17+
- [x] Requirements map to user stories
18+
- [x] No conflicting requirements
19+
20+
### Success Criteria
21+
- [x] Measurable outcomes defined
22+
- [x] Criteria are objective (not subjective)
23+
- [x] Performance expectations specified
24+
25+
### Technical Feasibility
26+
- [x] GitHub Search API endpoint documented
27+
- [x] Rate limit considerations addressed (FR-008)
28+
- [x] Fallback behavior defined
29+
30+
## Requirement Traceability
31+
32+
| Requirement | User Story | Testable | Notes |
33+
|-------------|-----------|----------|-------|
34+
| FR-001 | US1, US2 | Yes | Display activity stats |
35+
| FR-002 | US1, US2 | Yes | Filter by pushed date |
36+
| FR-003 | US1 | Yes | Personal repos filtering |
37+
| FR-004 | US2 | Yes | Org repos filtering |
38+
| FR-005 | US3 | Yes | No filter for manual [S] |
39+
| FR-006 | US3 | Yes | Disable filter option |
40+
| FR-007 | US1, US2 | Yes | Stats format |
41+
| FR-008 | Edge Case | Yes | Rate limit fallback |
42+
| FR-009 | Edge Case | Yes | Zero repos warning |
43+
| FR-010 | US1, US2 | Yes | Use --days parameter |
44+
45+
## Validation Summary
46+
47+
- **Total Requirements**: 10
48+
- **Testable Requirements**: 10/10 (100%)
49+
- **User Stories**: 3 (P1, P2, P3)
50+
- **Edge Cases**: 4 documented
51+
- **Status**: PASSED

0 commit comments

Comments
 (0)