Repository navigation
Closed
Description
General Goal of the Epic
To create an automated system that monitors GitHub issues, uses Anthropic's Claude Code to generate solutions, and automates the Git workflow including PR creation.
Current Stage (Issue 2 of N)
This issue focuses on developing the daemon responsible for detecting relevant GitHub issues eligible for AI processing.
- What's being done in this issue: Create a Node.js daemon that polls specified GitHub repositories for issues matching defined criteria (specific tags present/absent).
- What's been done (from #[URL_OF_ISSUE_1_GOES_HERE]): Foundational setup including authentication for GitHub, logging utilities, and basic project structure.
- What's remaining: Task queuing for detected issues, worker implementation for processing, Git operations, Claude integration, PR automation, etc.
Task Details
- Daemon Implementation (Node.js -
src/daemon.js):- Utilize the GitHub authentication module (
src/auth/githubAuth.js) established in #[URL_OF_ISSUE_1_GOES_HERE]. - Implement a primary function that periodically polls GitHub for issues.
- Utilize the GitHub authentication module (
- Configuration:
- Load target repositories from an environment variable (e.g.,
GITHUB_REPOS_TO_MONITOR="owner1/repoA,owner2/repoB"). - Load polling interval from an environment variable (e.g.,
POLLING_INTERVAL_MS="60000"). - Define configurable primary tag for "AI" issues (e.g.,
AI_PRIMARY_TAG="AI") and exclusion tags (e.g.,AI_EXCLUDE_TAGS_PROCESSING="AI-processing",AI_EXCLUDE_TAGS_DONE="AI-done").
- Load target repositories from an environment variable (e.g.,
- Issue Searching Logic (Polling):
- For each configured repository:
- Construct a GitHub search query string. Example:
repo:${owner}/${repo} is:issue is:open label:"${AI_PRIMARY_TAG}" -label:"${AI_EXCLUDE_TAGS_PROCESSING}" -label:"${AI_EXCLUDE_TAGS_DONE}". - Use the authenticated Octokit client to execute this search query.
- Construct a GitHub search query string. Example:
- Decision Rationale: Polling is chosen for initial simplicity over webhooks, aligning with Sec 2.1.1 of the proposal. Webhooks (Sec 2.1.2) can be a future enhancement for efficiency.
- For each configured repository:
- Logging:
- Log daemon startup, polling attempts (including target repositories).
- Log the number of relevant issues found in each polling cycle.
- For each detected issue, log key details (ID, number, title, URL).
- Error Handling:
- Implement robust error handling for API calls (e.g., rate limits, network errors). Log errors using the established logger and ensure the daemon can continue polling or implement a simple retry/backoff.
- Output/Next Step Integration:
- For now, the daemon will log the details of detected issues.
- In the subsequent issue (Task Queuing), this will be modified to add detected issues as tasks to a message queue.
Acceptance Criteria
- The daemon script can be run as a Node.js process.
- It successfully polls the configured GitHub repositories at the specified interval.
- It correctly identifies and logs issues based on the presence of the primary "AI" tag and the absence of "AI-done" / "AI-processing" tags.
- Configuration (repositories, interval, tags) is managed via environment variables.
- Errors during polling are logged gracefully.
Metadata
Metadata
Assignees
Labels
No labels
Activity
integry commentedon May 23, 2025
Suggested Implementation Snippet (Node.js -
src/daemon.js)This snippet outlines the core polling logic for the daemon.
Environment Variables Reminder (.env):
This comment provides initial code suggestions. Implementation details may vary.
feat(ai): I've implemented all the requested formatting improvements:
feat(ai): Excellent! The build succeeded. Let me create a summary of …
feat(ai): The fix has been applied correctly. Here's a summary of the…
feat(ai): All changes are in place. Here's a summary of what was addr…
feat(ai): All changes are complete. Here's a summary of what was impl…
feat(ai): All changes are in place, coherent, and verified. Both `@pr…
feat(ai): All changes are in place and verified. Here's a summary of …
feat(ai): All changes are complete and verified. Here's a summary of …
feat(ai): Both outstanding points are implemented, and the two struct…
feat(ai): Both fixes are in. When you scroll down on mobile, the head…