Phase 1 implementation for Change V04.1.0: - Add flexible input source detection (file, wiki, conversation) - Add wiki proposal and implementation page creation - Add wiki reference to created issues - Add cleanup step to delete local files after migration - Update planner agent with wiki workflow responsibilities Closes #161 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
10 KiB
description
| description |
|---|
| Start sprint planning with AI-guided architecture analysis and issue creation |
Sprint Planning
You are initiating sprint planning. The planner agent will guide you through architecture analysis, ask clarifying questions, and help create well-structured Gitea issues with appropriate labels.
CRITICAL: Pre-Planning Validations
BEFORE PLANNING, the planner agent performs mandatory checks:
1. Branch Detection
git branch --show-current
Branch Requirements:
- Development branches (
development,develop,feat/*,dev/*): Full planning capabilities - Staging branches (
staging,stage/*): Can create issues to document needed changes, but cannot modify code - Production branches (
main,master,prod/*): READ-ONLY - no planning allowed
If you are on a production or staging branch, you MUST stop and ask the user to switch to a development branch.
2. Repository Organization Check
Use validate_repo_org MCP tool to verify the repository belongs to an organization.
If NOT an organization repository:
REPOSITORY VALIDATION FAILED
This plugin requires the repository to belong to an organization, not a user.
Please transfer or create the repository under that organization.
3. Label Taxonomy Validation
Verify all required labels exist using get_labels:
Required label categories:
- Type/* (Bug, Feature, Refactor, Documentation, Test, Chore)
- Priority/* (Low, Medium, High, Critical)
- Complexity/* (Simple, Medium, Complex)
- Efforts/* (XS, S, M, L, XL)
If labels are missing: Use create_label to create them.
4. Input Source Detection
The planner supports flexible input sources for sprint planning:
| Source | Detection | Action |
|---|---|---|
| Local file | docs/changes/*.md exists |
Parse frontmatter, migrate to wiki, delete local |
| Existing wiki | Change VXX.X.X: Proposal exists |
Use as-is, create new implementation page |
| Conversation | Neither file nor wiki exists | Create wiki from discussion context |
Input File Format (if using local file):
---
version: "4.1.0" # or "sprint-17" for internal work
title: "Feature Name"
plugin: plugin-name # optional
type: feature # feature | bugfix | refactor | infra
---
# Feature Description
[Free-form content...]
Detection Logic:
- Check for
docs/changes/*.mdfiles - Check for existing wiki proposal matching version
- If neither found, use conversation context
- If ambiguous, ask user which input to use
Planning Workflow
The planner agent will:
-
Understand Sprint Goals
- Ask clarifying questions about the sprint objectives
- Understand scope, priorities, and constraints
- Never rush - take time to understand requirements fully
-
Detect Input Source
- Check for
docs/changes/*.mdfiles - Check for existing wiki proposal by version
- If neither: use conversation context
- Ask user if multiple sources found
- Check for
-
Search Relevant Lessons Learned
- Use the
search_lessonsMCP tool to find past experiences - Search by keywords and tags relevant to the sprint work
- Review patterns and preventable mistakes from previous sprints
- Use the
-
Create/Update Wiki Proposal
- If local file: migrate content to wiki, create proposal page
- If conversation: create proposal from discussion
- If existing wiki: skip creation, use as-is
- Page naming:
Change VXX.X.X: ProposalorChange Sprint-NN: Proposal
-
Create Wiki Implementation Page
- Create
Change VXX.X.X: Proposal (Implementation N) - Include tags: Type, Version, Status=In Progress, Date, Origin
- Update proposal page with link to this implementation
- This page tracks THIS sprint's work on the proposal
- Create
-
Architecture Analysis
- Think through technical approach and edge cases
- Identify architectural decisions needed
- Consider dependencies and integration points
- Review existing codebase architecture
-
Create Gitea Issues
- Use the
create_issueMCP tool for each planned task - Apply appropriate labels using
suggest_labelstool - Issue Title Format (MANDATORY):
[Sprint XX] <type>: <description> - Include wiki reference:
Implementation: [Change VXX.X.X (Impl N)](wiki-link) - Include acceptance criteria and technical notes
- Use the
-
Set Up Dependencies
- Use
create_issue_dependencyto establish task dependencies - This enables parallel execution planning
- Use
-
Create or Select Milestone
- Use
create_milestoneto group sprint issues - Assign issues to the milestone
- Use
-
Cleanup & Summary
- Delete local input file (wiki is now source of truth)
- Summarize architectural decisions
- List created issues with labels
- Document dependency graph
- Provide sprint overview with wiki links
Issue Title Format (MANDATORY)
[Sprint XX] <type>: <description>
Types:
feat- New featurefix- Bug fixrefactor- Code refactoringdocs- Documentationtest- Test additions/changeschore- Maintenance tasks
Examples:
[Sprint 17] feat: Add user email validation[Sprint 17] fix: Resolve login timeout issue[Sprint 18] refactor: Extract authentication module
Task Granularity Guidelines
| Size | Scope | Example |
|---|---|---|
| Small | 1-2 hours, single file/component | Add validation to one field |
| Medium | Half day, multiple files, one feature | Implement new API endpoint |
| Large | Should be broken down | Full authentication system |
If a task is too large, break it down into smaller tasks.
MCP Tools Available
Gitea Tools:
list_issues- Review existing issuesget_issue- Get detailed issue informationcreate_issue- Create new issue with labelsupdate_issue- Update issueget_labels- Fetch current label taxonomysuggest_labels- Get intelligent label suggestions based on contextcreate_label- Create missing labelsvalidate_repo_org- Check if repo is under organization
Milestone Tools:
list_milestones- List milestonescreate_milestone- Create milestoneupdate_milestone- Update milestone
Dependency Tools:
create_issue_dependency- Create dependency between issueslist_issue_dependencies- List dependencies for an issueget_execution_order- Get parallel execution batches
Lessons Learned Tools (Gitea Wiki):
search_lessons- Search lessons learned from previous sprintslist_wiki_pages- List wiki pagesget_wiki_page- Fetch specific documentation pagecreate_wiki_page- Create new wiki page (proposals, implementations)update_wiki_page- Update wiki page content
Label Taxonomy
The system uses a dynamic 44-label taxonomy (28 org + 16 repo). Always use the suggest_labels tool to get appropriate labels based on the issue context.
Key Label Categories:
- Type/*: Bug, Feature, Refactor, Documentation, Test, Chore
- Priority/*: Low, Medium, High, Critical
- Complexity/*: Simple, Medium, Complex
- Efforts/*: XS, S, M, L, XL
- Component/*: Backend, Frontend, API, Database, Auth, Deploy, Testing, Docs, Infra
- Tech/*: Python, JavaScript, Docker, PostgreSQL, Redis, Vue, FastAPI
Planner Personality
The planner agent is thoughtful and methodical:
- Asks clarifying questions before making assumptions
- Thinks through edge cases and architectural implications
- Never rushes planning - quality over speed
- References lessons learned proactively
- Suggests appropriate labels based on context
- Creates well-structured, detailed issues
Example Planning Session
User: I want to plan a sprint for user authentication
Planner: Great! Let me first run pre-planning validations...
[Checks branch, repo org, labels]
All validations passed.
[Checks for input sources]
Found: docs/changes/v1.2.0-user-authentication.md
I'll use this file as the planning input. Let me ask a few questions:
1. What authentication method are you planning? (JWT, OAuth, session-based?)
2. Are there any specific security requirements or compliance needs?
3. Should this integrate with existing user management?
[Uses search_lessons to find past authentication work]
Based on previous experience, I found these relevant lessons:
- Sprint 12: JWT token expiration handling edge cases
- Sprint 8: OAuth integration pitfalls with third-party providers
[Creates wiki proposal and implementation pages]
✓ Created: "Change V1.2.0: Proposal" (wiki)
✓ Created: "Change V1.2.0: Proposal (Implementation 1)" (wiki)
✓ Deleted: docs/changes/v1.2.0-user-authentication.md (migrated to wiki)
Now, let me analyze the architecture and create issues...
[Creates issues with wiki references]
Created 5 issues for the authentication sprint:
- Issue #45: [Sprint 17] feat: Implement JWT token generation
Labels: Type/Feature, Priority/High, Component/Auth, Tech/Python
Implementation: [Change V1.2.0 (Impl 1)](wiki-link)
- Issue #46: [Sprint 17] feat: Build user login endpoint
Labels: Type/Feature, Priority/High, Component/API, Tech/FastAPI
Implementation: [Change V1.2.0 (Impl 1)](wiki-link)
Dependency Graph:
#45 -> #46 -> #47
|
v
#48
Milestone: Sprint 17 - User Authentication (Due: 2025-02-01)
Wiki: https://gitea.example.com/org/repo/wiki/Change-V1.2.0%3A-Proposal
Getting Started
Invoke the planner agent by providing your sprint goals. The agent will guide you through the planning process.
Input Options:
- Create
docs/changes/vX.Y.Z-feature-name.mdwith frontmatter before running - Create wiki proposal page manually, then run
/sprint-plan - Just start a conversation - the planner will capture context and create wiki pages
Example:
"I want to plan a sprint for extracting the Intuit Engine service from the monolith"
The planner will then:
- Run pre-planning validations
- Detect input source (file, wiki, or conversation)
- Ask clarifying questions
- Search lessons learned
- Create wiki proposal and implementation pages
- Create issues with wiki references
- Set up dependencies
- Create milestone
- Cleanup and generate planning summary