Repository navigation
Closed
Labels
migrate:type:auditAuditAuditmigrate:type:featureFeature or enhancementFeature or enhancementtype:audittype:feature
Description
Problem
Planner agent is currently a stub (46 lines, only logs context). Needs core implementation for context analysis, plan generation, and checklist posting.
Acceptance Criteria
- Agent accepts structured input (PR/issue context)
- Analyzes PR/issue body, labels, and linked issues
- Generates structured plan based on type:
- Architecture plan: Design → API contract → Data model → Implementation
- Implementation plan: Setup → Core logic → Tests → Docs → Review
- Task plan: Analysis → Research → Implementation → Verification
- Posts plan as markdown comment on PR/issue
- Dry-run mode works (doesn't post when DRY_RUN=true)
- Error handling in place (try-catch, clear errors)
- Tests pass (coverage ≥ 80%)
- Workflow re-enabled (remove
if: false)
Implementation Plan
1. Define Module Interface
async function run(context = github.context, options = {}) {
// options: { dryRun: false, planType: 'auto'|'architecture'|'implementation'|'task' }
// returns: { success: bool, plan: string, commentId: number, errors: [] }
}2. Implement Context Analysis
- Parse PR/issue body (extract requirements, acceptance criteria)
- Extract linked issues (PR: Add missing chatmode index entries and create master indexes for instructions and collections #123 references)
- Identify labels (epic, feature, bug, enhancement, etc.)
- Auto-detect plan type from labels/description
- Handle edge cases (closed issues, archived repos, etc.)
3. Implement Plan Generation
Create plan template based on type:
Architecture Plan:
- Design Review (Stakeholder alignment, Design docs)
- API Contract (Request/response schemas)
- Data Model (Database schema, migrations)
- Implementation (Code changes, PRs)
- Documentation (API docs, README)
- Deployment (Release notes, breaking changes)
Implementation Plan:
- Setup (Environment, dependencies)
- Core Logic (Main feature implementation)
- Tests (Unit, integration, e2e)
- Documentation (Code comments, user guide)
- Review (Code review, feedback)
- Merge (PR approval, deployment)
Task Plan:
- Analysis (Understand requirements)
- Research (Investigate solutions)
- Implementation (Code changes)
- Verification (Test, verify)
- Documentation (Update docs)
4. Implement Comment Posting
- Format plan as structured markdown
- Include checklist with [ ] checkboxes (auto-progress-tracking)
- Add context links (linked issues, related PRs)
- Post to PR/issue
- Handle dry-run mode (log instead of post)
- Return comment ID for tracking
Test Plan
# Run tests
npm test -- scripts/agents/__tests__/planner.agent.test.js
# Coverage check
npm test -- --coverage scripts/agents/planner.agent.js
# Manual test (dry-run)
DRY_RUN=true node scripts/agents/planner.agent.js
# Integration test
node scripts/agents/planner.agent.js --apply --pr 123
# Should post plan to PR #123Effort Estimate
Large (4-6 hours)
Priority
🟡 MEDIUM - Core planner functionality
Dependencies
- Requires: [Add GitHub Copilot MCP configuration with Playwright and GitHub remote servers #1.1], [Add GitHub Copilot MCP configuration with Playwright and GitHub remote servers #1.2], [Add GitHub Copilot MCP configuration with Playwright and GitHub remote servers #1.3], [Add GitHub Copilot MCP configuration with Playwright and GitHub remote servers #1.4] (Phase 1 completed)
Blocks
- None (independent from reviewer improvements)
Related Issues
- Reference: ai/improvement-plan-planner-reviewer.md (Issue 2.1)
- Related spec:
agents/task-planner.agent.md - Related instructions:
instructions/planner.instructions.md
References
scripts/agents/planner.agent.js(current stub)agents/task-planner.agent.md(specification)ai/audit-planner-reviewer-agents.md(Section 2.1, gap analysis)- GitHub Actions context: https://docs.github.com/en/actions/learn-github-actions/contexts
Metadata
Metadata
Assignees
Labels
migrate:type:auditAuditAuditmigrate:type:featureFeature or enhancementFeature or enhancementtype:audittype:feature
Type
Fields
Priority
None yet
Activity
linear-code commentedon May 31, 2026
LS-793
LS-2877
feat: audit and improve planner & reviewer agents (#610)
docs: update changelog for planner and reviewer agent improvements
Phase 2: Feature Enhancements - Planner & Reviewer Agents
ashleyshaw commentedon May 31, 2026
✅ Completed - Merged in PR #641 (Phase 3 Polish: Complete Agent Implementation and Polish)
Core planner agent functionality has been fully implemented with:
Generated by Claude Code
Wave 5 Issue #670 Phase 3: Standardize plugin and .github subdirector…