Skip to content

Commit d5ad6d4

Browse files
authored
Merge pull request #6 from Oltrematica/004-github-repo-selection
004 GitHub repo selection
2 parents 3c28953 + a37d85f commit d5ad6d4

17 files changed

Lines changed: 2797 additions & 21 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Auto-generated from all feature plans. Last updated: 2025-11-28
66
- Python 3.9+ (per constitution, leveraging type hints) + Standard library (urllib, json, csv, os, re); optional: requests (002-jira-integration)
77
- CSV files for export (same as existing GitHub exports) (002-jira-integration)
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)
9+
- Python 3.9+ (as per constitution, leveraging type hints) + Standard library only (urllib, json); optional: requests (existing pattern) (004-github-repo-selection)
10+
- N/A (repos.txt file is input, not storage) (004-github-repo-selection)
911

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

@@ -37,10 +39,10 @@ python github_analyzer.py --days 7
3739
Python 3.9+ (as per constitution, leveraging type hints): Follow standard conventions
3840

3941
## Recent Changes
42+
- 004-github-repo-selection: Added Python 3.9+ (as per constitution, leveraging type hints) + Standard library only (urllib, json); optional: requests (existing pattern)
4043
- 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)
4144
- 002-jira-integration: Added Python 3.9+ (per constitution, leveraging type hints) + Standard library (urllib, json, csv, os, re); optional: requests
4245

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

4547
<!-- MANUAL ADDITIONS START -->
4648
<!-- MANUAL ADDITIONS END -->
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
# Requirements Quality Checklist: GitHub Repository Interactive Selection
2+
3+
**Purpose**: Validate specification completeness, clarity, and consistency before implementation
4+
**Created**: 2025-11-29
5+
**Feature**: [spec.md](../spec.md)
6+
**Focus**: Comprehensive (UX, API, Validation, Non-interactive)
7+
**Depth**: Standard (PR review gate)
8+
9+
---
10+
11+
## Requirement Completeness
12+
13+
- [x] CHK001 - Are all five menu options [A/S/O/L/Q] explicitly defined with their behavior? [Completeness, Spec §FR-002] ✓ Defined in FR-002 and Display Format section
14+
- [x] CHK002 - Are requirements for repos.txt file loading specified (path, format, empty handling)? [Completeness, Spec §US1] ✓ US1-AC1,2,3 cover all cases
15+
- [x] CHK003 - Are pagination requirements defined for both user repos AND org repos? [Completeness, Spec §FR-007] ✓ FR-007 covers both explicitly
16+
- [x] CHK004 - Are requirements specified for displaying repository descriptions in the list? [Completeness, Display Format] ✓ Added Display Format section with truncation
17+
- [x] CHK005 - Are requirements for private repository visibility indicator defined? [Completeness, Display Format] ✓ Added [private] marker in Display Format
18+
- [x] CHK006 - Are error message content requirements specified (what text to show for each error type)? [Completeness, Edge Cases] ✓ Added specific error messages to all edge cases
19+
- [x] CHK007 - Are requirements defined for the "retry or quit" flow after org not found? [Completeness, Spec §Edge Cases] ✓ "allow retry or quit" specified
20+
21+
---
22+
23+
## Requirement Clarity
24+
25+
- [x] CHK008 - Is "personal repos" clarified with specific affiliation values (owner,collaborator)? [Clarity, Spec §Clarifications] ✓ Clarified in Session 2025-11-29
26+
- [x] CHK009 - Is the exact menu prompt text specified or left to implementation? [Clarity, Display Format] ✓ Added Menu Prompt Format section with exact text
27+
- [x] CHK010 - Are the performance thresholds "under 10 seconds" and "under 15 seconds" clearly scoped? [Clarity, Spec §SC-002, SC-003] ✓ Scoped to specific repo counts and network conditions
28+
- [x] CHK011 - Is "clear error message" quantified with specific content requirements? [Clarity, Edge Cases] ✓ All error messages now have exact text
29+
- [x] CHK012 - Is "graceful exit" defined with specific behavior and message? [Clarity, Edge Cases] ✓ "GitHub analysis skipped." message specified
30+
- [x] CHK013 - Are the exact validation patterns for repo format documented? [Clarity, Validation Patterns] ✓ Added Validation Patterns section with regex
31+
- [x] CHK014 - Are the exact validation patterns for org name documented? [Clarity, Validation Patterns] ✓ Added with pattern and examples
32+
33+
---
34+
35+
## Requirement Consistency
36+
37+
- [x] CHK015 - Are menu options consistent between spec (A/S/O/L/Q) and quickstart examples? [Consistency] ✓ All use [A/S/O/L/Q]
38+
- [x] CHK016 - Is the selection format "1,3,5" or "1-3" consistent with existing parse_project_selection()? [Consistency, Spec §FR-010] ✓ Same format documented
39+
- [x] CHK017 - Are EOF/KeyboardInterrupt handling requirements consistent across all menu states? [Consistency, Spec §FR-004] ✓ FR-004 applies universally
40+
- [x] CHK018 - Are error handling patterns consistent between list_user_repos and list_org_repos? [Consistency, contracts/internal-api.md] ✓ Same RateLimitError/APIError patterns
41+
- [x] CHK019 - Is the "owner/repo" format requirement consistent across manual entry and API responses? [Consistency, Spec §FR-009, FR-011] ✓ full_name format used consistently
42+
43+
---
44+
45+
## Jira Pattern Consistency (FR-003)
46+
47+
- [x] CHK020 - Does the menu structure match select_jira_projects pattern (options display, prompt format)? [Consistency, Spec §FR-003] ✓ Same pattern documented in Display Format
48+
- [x] CHK021 - Is the list numbering format consistent with Jira project list display? [Consistency, Spec §FR-003] ✓ Same "N. name - description" format
49+
- [x] CHK022 - Is the selection input parsing reusing or mirroring parse_project_selection()? [Consistency, research.md §5] ✓ Documented in research.md decision
50+
- [x] CHK023 - Is the "invalid choice retry" behavior consistent with Jira selection flow? [Consistency, Spec §FR-003] ✓ Same retry pattern per FR-003
51+
- [x] CHK024 - Are logging patterns (output.log) consistent with select_jira_projects implementation? [Consistency] ✓ Uses TerminalOutput per contracts
52+
53+
---
54+
55+
## Acceptance Criteria Quality
56+
57+
- [x] CHK025 - Can SC-001 "within 30 seconds" be objectively measured? [Measurability, Spec §SC-001] ✓ Split into menu (2s) and listing (30s) with clear scope
58+
- [x] CHK026 - Can SC-004 "no regression" be verified with specific test criteria? [Measurability, Spec §SC-004] ✓ Testable: repos.txt loading unchanged
59+
- [x] CHK027 - Can SC-005 "UX mirrors Jira" be verified with specific comparison points? [Measurability, Spec §SC-005] ✓ Menu format, prompts, error handling defined
60+
- [x] CHK028 - Are acceptance scenarios in US1-US4 testable without implementation details? [Measurability] ✓ All scenarios use Given/When/Then format
61+
- [x] CHK029 - Is "all repositories are shown" in US2-AC3 measurable (what if 1000+ repos)? [Clarity, Edge Cases] ✓ Partial response edge case added for large lists
62+
63+
---
64+
65+
## Scenario Coverage
66+
67+
### Primary Flow Coverage
68+
- [x] CHK030 - Are requirements complete for [A] all personal repos flow? [Coverage, Spec §US2] ✓ US2-AC1
69+
- [x] CHK031 - Are requirements complete for [S] manual specification flow? [Coverage, Spec §US4] ✓ US4 complete
70+
- [x] CHK032 - Are requirements complete for [O] organization repos flow? [Coverage, Spec §US3] ✓ US3 complete
71+
- [x] CHK033 - Are requirements complete for [L] select from list flow? [Coverage, Spec §US2] ✓ US2-AC2,3,4
72+
- [x] CHK034 - Are requirements complete for [Q] quit/skip flow? [Coverage, Spec §FR-002] ✓ FR-004 covers exit behavior
73+
74+
### Alternate Flow Coverage
75+
- [x] CHK035 - Are requirements defined for re-prompting after invalid menu choice? [Coverage, FR-003] ✓ Jira pattern includes retry
76+
- [x] CHK036 - Are requirements defined for re-prompting after empty manual input? [Coverage, Spec §US4-AC3] ✓ "can correct or continue"
77+
- [x] CHK037 - Are requirements defined for selecting "all" in list mode? [Coverage, Validation Patterns] ✓ "all" documented as valid input
78+
79+
### Exception Flow Coverage
80+
- [x] CHK038 - Are requirements defined for API authentication failure? [Coverage, Edge Cases] ✓ Added with specific error message
81+
- [x] CHK039 - Are requirements defined for network timeout during repo listing? [Coverage, Edge Cases] ✓ Added with retry option
82+
- [x] CHK040 - Are requirements defined for partial API response (some repos fetched, then error)? [Coverage, Edge Cases] ✓ Added graceful degradation
83+
84+
---
85+
86+
## Edge Case Coverage
87+
88+
- [x] CHK041 - Are requirements defined for user with zero repositories? [Edge Case, Edge Cases] ✓ Added with specific message
89+
- [x] CHK042 - Are requirements defined for organization with zero repositories? [Edge Case, Edge Cases] ✓ Added with retry option
90+
- [x] CHK043 - Are rate limit wait time display requirements specified? [Edge Case, Spec §Edge Cases] ✓ "Waiting X seconds..." format
91+
- [x] CHK044 - Are requirements for "special characters in org name" clearly defined? [Edge Case, Validation Patterns] ✓ Regex pattern with examples
92+
- [x] CHK045 - Are requirements defined for repos.txt with invalid entries mixed with valid? [Edge Case, US1-AC3] ✓ Similar to US4-AC4
93+
- [x] CHK046 - Are requirements defined for selection numbers exceeding list length? [Edge Case, Edge Cases] ✓ Added ignore with warning
94+
95+
---
96+
97+
## Non-Functional Requirements
98+
99+
### Performance
100+
- [x] CHK047 - Are performance requirements scoped to specific network conditions? [Clarity, NFR §Performance] ✓ Added "< 200ms latency" assumption
101+
- [x] CHK048 - Are timeout values for API calls specified? [Coverage, NFR §Assumptions] ✓ Uses GitHubClient default 30s
102+
103+
### Security
104+
- [x] CHK049 - Are token exposure prevention requirements documented? [Coverage, NFR §Security] ✓ Added Security section
105+
- [x] CHK050 - Is input validation for org name protecting against injection? [Coverage, NFR §Security] ✓ Regex validation + safe URL construction
106+
107+
### Accessibility
108+
- [x] CHK051 - Are requirements defined for screen reader compatibility of menu output? [Coverage, NFR §Accessibility] ✓ Added Accessibility section
109+
- [x] CHK052 - Are requirements defined for non-ANSI terminal support? [Coverage, NFR §Accessibility] ✓ Plain text, optional formatting
110+
111+
---
112+
113+
## Dependencies & Assumptions
114+
115+
- [x] CHK053 - Is the GitHub token scope requirement ("repo") documented as assumption? [Assumption, Spec §Assumptions] ✓ First assumption listed
116+
- [x] CHK054 - Is the assumption "user knows org names" validated or alternatives considered? [Assumption, Spec §Assumptions] ✓ Documented as design decision
117+
- [x] CHK055 - Are dependencies on existing GitHubClient methods documented? [Dependency, plan.md] ✓ paginate(), rate limit handling
118+
- [x] CHK056 - Is the dependency on TerminalOutput documented? [Dependency, contracts/internal-api.md] ✓ In function signature
119+
120+
---
121+
122+
## Ambiguities & Conflicts
123+
124+
- [x] CHK057 - Is there ambiguity between "skip" (FR-014) and "error message" (US1-AC4) for non-interactive mode? [Resolved] ✓ US1-AC4 updated to "informational log message"
125+
- [x] CHK058 - Is there conflict between "all repos shown" (US2-AC3) and potential max_pages limit? [Resolved, Edge Cases] ✓ Partial response edge case added
126+
- [x] CHK059 - Is the term "valid repositories" in US1-AC3 defined (format valid? exists on GitHub? accessible?)? [Clarity] ✓ Format validation per FR-011
127+
- [x] CHK060 - Is the behavior for [O] option after seeing org list (select vs all) fully specified? [Clarity, US3-AC5] ✓ "choose [A] after seeing the list"
128+
129+
---
130+
131+
## Summary
132+
133+
| Category | Items | Status |
134+
|----------|-------|--------|
135+
| Completeness | 7 | ✅ All resolved |
136+
| Clarity | 7 | ✅ All resolved |
137+
| Consistency | 5 | ✅ All resolved |
138+
| Jira Pattern | 5 | ✅ All resolved |
139+
| Acceptance Criteria | 5 | ✅ All resolved |
140+
| Scenario Coverage | 11 | ✅ All resolved |
141+
| Edge Cases | 6 | ✅ All resolved |
142+
| Non-Functional | 6 | ✅ All resolved |
143+
| Dependencies | 4 | ✅ All resolved |
144+
| Ambiguities | 4 | ✅ All resolved |
145+
146+
**Total Items**: 60
147+
**Completed**: 60
148+
**Status**: ✅ PASS
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Specification Quality Checklist: GitHub Repository Interactive Selection
2+
3+
**Purpose**: Validate specification completeness and quality before proceeding to planning
4+
**Created**: 2025-11-29
5+
**Feature**: [spec.md](../spec.md)
6+
7+
## Content Quality
8+
9+
- [x] No implementation details (languages, frameworks, APIs)
10+
- [x] Focused on user value and business needs
11+
- [x] Written for non-technical stakeholders
12+
- [x] All mandatory sections completed
13+
14+
## Requirement Completeness
15+
16+
- [x] No [NEEDS CLARIFICATION] markers remain
17+
- [x] Requirements are testable and unambiguous
18+
- [x] Success criteria are measurable
19+
- [x] Success criteria are technology-agnostic (no implementation details)
20+
- [x] All acceptance scenarios are defined
21+
- [x] Edge cases are identified
22+
- [x] Scope is clearly bounded
23+
- [x] Dependencies and assumptions identified
24+
25+
## Feature Readiness
26+
27+
- [x] All functional requirements have clear acceptance criteria
28+
- [x] User scenarios cover primary flows
29+
- [x] Feature meets measurable outcomes defined in Success Criteria
30+
- [x] No implementation details leak into specification
31+
32+
## Notes
33+
34+
- Spec follows the same pattern as 002-jira-integration FR-009a
35+
- UX consistency with select_jira_projects is explicitly required
36+
- API endpoints mentioned (GET /user/repos, GET /orgs/{org}/repos) are part of the functional description, not implementation details
37+
- Ready for `/speckit.plan` or `/speckit.clarify`
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
# GitHub API Contract for Repository Listing
2+
# Feature: 004-github-repo-selection
3+
# These are the external GitHub API endpoints used by this feature
4+
5+
openapi: 3.0.3
6+
info:
7+
title: GitHub API - Repository Endpoints (Subset)
8+
version: 2022-11-28
9+
description: |
10+
External API contracts for GitHub repository listing.
11+
This documents the subset of GitHub REST API used by the
12+
interactive repository selection feature.
13+
14+
paths:
15+
/user/repos:
16+
get:
17+
operationId: listUserRepos
18+
summary: List repositories for the authenticated user
19+
description: |
20+
Lists repositories that the authenticated user has explicit permission
21+
to access. Used for FR-005 (personal repository listing).
22+
parameters:
23+
- name: affiliation
24+
in: query
25+
description: |
26+
Comma-separated list of values. Can include: owner, collaborator,
27+
organization_member. Feature uses "owner,collaborator" per spec clarification.
28+
schema:
29+
type: string
30+
default: "owner,collaborator,organization_member"
31+
example: "owner,collaborator"
32+
- name: visibility
33+
in: query
34+
description: Filter by visibility
35+
schema:
36+
type: string
37+
enum: [all, public, private]
38+
default: all
39+
- name: sort
40+
in: query
41+
schema:
42+
type: string
43+
enum: [created, updated, pushed, full_name]
44+
default: full_name
45+
- name: direction
46+
in: query
47+
schema:
48+
type: string
49+
enum: [asc, desc]
50+
default: asc
51+
- name: per_page
52+
in: query
53+
schema:
54+
type: integer
55+
minimum: 1
56+
maximum: 100
57+
default: 30
58+
- name: page
59+
in: query
60+
schema:
61+
type: integer
62+
minimum: 1
63+
default: 1
64+
responses:
65+
'200':
66+
description: List of repositories
67+
content:
68+
application/json:
69+
schema:
70+
type: array
71+
items:
72+
$ref: '#/components/schemas/Repository'
73+
'401':
74+
description: Authentication required
75+
'403':
76+
description: Rate limit exceeded or insufficient permissions
77+
78+
/orgs/{org}/repos:
79+
get:
80+
operationId: listOrgRepos
81+
summary: List organization repositories
82+
description: |
83+
Lists repositories for the specified organization. Used for FR-006.
84+
parameters:
85+
- name: org
86+
in: path
87+
required: true
88+
description: The organization name (case-insensitive)
89+
schema:
90+
type: string
91+
pattern: "^[a-zA-Z0-9]([a-zA-Z0-9-]{0,37}[a-zA-Z0-9])?$"
92+
- name: type
93+
in: query
94+
description: Repository type filter
95+
schema:
96+
type: string
97+
enum: [all, public, private, forks, sources, member]
98+
default: all
99+
- name: sort
100+
in: query
101+
schema:
102+
type: string
103+
enum: [created, updated, pushed, full_name]
104+
default: created
105+
- name: direction
106+
in: query
107+
schema:
108+
type: string
109+
enum: [asc, desc]
110+
- name: per_page
111+
in: query
112+
schema:
113+
type: integer
114+
minimum: 1
115+
maximum: 100
116+
default: 30
117+
- name: page
118+
in: query
119+
schema:
120+
type: integer
121+
minimum: 1
122+
default: 1
123+
responses:
124+
'200':
125+
description: List of repositories
126+
content:
127+
application/json:
128+
schema:
129+
type: array
130+
items:
131+
$ref: '#/components/schemas/Repository'
132+
'404':
133+
description: Organization not found
134+
135+
components:
136+
schemas:
137+
Repository:
138+
type: object
139+
description: GitHub repository (minimal fields used by feature)
140+
required:
141+
- id
142+
- full_name
143+
- name
144+
- owner
145+
- private
146+
- fork
147+
properties:
148+
id:
149+
type: integer
150+
description: Unique repository ID
151+
full_name:
152+
type: string
153+
description: Full repository name (owner/repo)
154+
example: "octocat/Hello-World"
155+
name:
156+
type: string
157+
description: Repository name
158+
example: "Hello-World"
159+
owner:
160+
$ref: '#/components/schemas/Owner'
161+
description:
162+
type: string
163+
nullable: true
164+
description: Repository description
165+
private:
166+
type: boolean
167+
description: Whether repository is private
168+
fork:
169+
type: boolean
170+
description: Whether repository is a fork
171+
html_url:
172+
type: string
173+
format: uri
174+
description: GitHub URL for repository
175+
176+
Owner:
177+
type: object
178+
required:
179+
- login
180+
properties:
181+
login:
182+
type: string
183+
description: Owner username/org name
184+
example: "octocat"
185+
id:
186+
type: integer
187+
type:
188+
type: string
189+
enum: [User, Organization]

0 commit comments

Comments
 (0)