Merge pull request #55 from LazyBachelor/LPM-109
LPM-109 - Remove Unused Tasks
This commit is contained in:
@@ -26,41 +26,23 @@ func init() {
|
||||
task.RegisterInterface("web", web.New())
|
||||
task.RegisterInterface("repl", repl.New())
|
||||
|
||||
task.RegisterTask("backlog_refinement", func(app *app.App) task.Tasker {
|
||||
return tasks.NewBacklogRefinementTask(app)
|
||||
})
|
||||
task.RegisterTask("create_issue", func(app *app.App) task.Tasker {
|
||||
return tasks.NewCreateIssueTask(app)
|
||||
})
|
||||
task.RegisterTask("coding_task", func(app *app.App) task.Tasker {
|
||||
return tasks.NewCodingTask(app)
|
||||
})
|
||||
task.RegisterTask("git_task", func(app *app.App) task.Tasker {
|
||||
return tasks.NewGitTask(app)
|
||||
})
|
||||
task.RegisterTask("sprint_planning", func(app *app.App) task.Tasker {
|
||||
return tasks.NewSprintPlanningTask(app)
|
||||
})
|
||||
task.RegisterTask("issue_triage", func(app *app.App) task.Tasker {
|
||||
return tasks.NewIssueTriageTask(app)
|
||||
})
|
||||
task.RegisterTask("milestone_tracking", func(app *app.App) task.Tasker {
|
||||
return tasks.NewMilestoneTrackingTask(app)
|
||||
})
|
||||
task.RegisterTask("dependency_management", func(app *app.App) task.Tasker {
|
||||
return tasks.NewDependencyManagementTask(app)
|
||||
})
|
||||
task.RegisterTask("team_capacity", func(app *app.App) task.Tasker {
|
||||
return tasks.NewTeamCapacityTask(app)
|
||||
})
|
||||
task.RegisterTask("report_generation", func(app *app.App) task.Tasker {
|
||||
return tasks.NewReportGenerationTask(app)
|
||||
})
|
||||
task.RegisterTask("stakeholder_update", func(app *app.App) task.Tasker {
|
||||
return tasks.NewStakeholderUpdateTask(app)
|
||||
})
|
||||
task.RegisterTask("priority_management", func(app *app.App) task.Tasker {
|
||||
return tasks.NewPriorityManagementTask(app)
|
||||
})
|
||||
task.RegisterTask("backlog_refinement", func(app *app.App) task.Tasker {
|
||||
return tasks.NewBacklogRefinementTask(app)
|
||||
task.RegisterTask("git_task", func(app *app.App) task.Tasker {
|
||||
return tasks.NewGitTask(app)
|
||||
})
|
||||
|
||||
cobra.EnableCommandSorting = false
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils/check"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
const dependencyManagementDescription = `You are tasked with managing issue dependencies.
|
||||
|
||||
Several issues in your project have dependencies on other issues. You need to:
|
||||
|
||||
1. Review the dependency chain described in issue descriptions
|
||||
2. Identify issues that are blocked by others
|
||||
3. Prioritize work on foundational issues (those that unblock others)
|
||||
4. Update issue statuses to reflect dependency resolution
|
||||
5. Ensure no circular dependencies exist
|
||||
|
||||
Resolving dependencies in the right order is critical for efficient team workflow.`
|
||||
|
||||
type DependencyManagementTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
}
|
||||
|
||||
func NewDependencyManagementTask(app *App) *DependencyManagementTask {
|
||||
return &DependencyManagementTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *DependencyManagementTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/dependency-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *DependencyManagementTask) Details(interfaceType InterfaceType) TaskDetails {
|
||||
return BaseDetails(interfaceType).
|
||||
WithTitle("Dependency Management Task").
|
||||
WithDescription(dependencyManagementDescription).
|
||||
WithTimeToComplete("15m").
|
||||
WithDifficulty("Hard")
|
||||
}
|
||||
|
||||
func (t *DependencyManagementTask) Questions(interfaceType InterfaceType) Questions {
|
||||
return BaseQuestions(interfaceType).With(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[int]().
|
||||
Title("How many foundational issues did you identify?").
|
||||
Options(
|
||||
huh.NewOption("1", 1),
|
||||
huh.NewOption("2", 2),
|
||||
huh.NewOption("3+", 3),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
func (t *DependencyManagementTask) Setup(ctx context.Context) error {
|
||||
if err := ClearIssues(t.app); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
depIssues := []*Issue{
|
||||
NewIssueBuilder().
|
||||
WithTitle("Setup database connection").
|
||||
WithDescription("Configure database connection pool.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Define API contract").
|
||||
WithDescription("Create OpenAPI spec.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Implement user repository").
|
||||
WithDescription("Implement data access layer for user management.").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Create user endpoints").
|
||||
WithDescription("REST API for users.").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Build user profile UI").
|
||||
WithDescription("Frontend user profile page.").
|
||||
WithPriority(3).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, depIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t.setupIssue = NewIssueBuilder().
|
||||
WithTitle("Dependency Management").
|
||||
WithDescription(dependencyManagementDescription).
|
||||
Build()
|
||||
|
||||
return t.app.Issues.CreateIssue(ctx, t.setupIssue, "")
|
||||
}
|
||||
|
||||
func (t *DependencyManagementTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
expect := check.NewExpector()
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils/check"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
const issueTriageDescription = `You are tasked with triaging incoming issues.
|
||||
|
||||
The support team has submitted several bug reports and feature requests that need to be reviewed and prioritized. Your job is to:
|
||||
|
||||
1. Review each incoming issue
|
||||
2. Assign appropriate priority
|
||||
3. Set the correct status
|
||||
4. Identify if it's a bug, feature, or task
|
||||
5. Leave comments explaining your decisions
|
||||
|
||||
Make decisions quickly but thoughtfully. Not everything is high priority!`
|
||||
|
||||
type IssueTriageTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *models.Issue
|
||||
}
|
||||
|
||||
func NewIssueTriageTask(app *App) *IssueTriageTask {
|
||||
return &IssueTriageTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *IssueTriageTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/triage-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *IssueTriageTask) Details(interfaceType InterfaceType) TaskDetails {
|
||||
return BaseDetails(interfaceType).
|
||||
WithTitle("Issue Triage Task").
|
||||
WithDescription(issueTriageDescription).
|
||||
WithTimeToComplete("12m").
|
||||
WithDifficulty("Medium")
|
||||
}
|
||||
|
||||
func (t *IssueTriageTask) Questions(interfaceType InterfaceType) Questions {
|
||||
return BaseQuestions(interfaceType).With(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[int]().
|
||||
Title("How many Critical priority issues did you identify?").
|
||||
Options(
|
||||
huh.NewOption("0", 0),
|
||||
huh.NewOption("1", 1),
|
||||
huh.NewOption("2", 2),
|
||||
huh.NewOption("3+", 3),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
func (t *IssueTriageTask) Setup(ctx context.Context) error {
|
||||
if err := ClearIssues(t.app); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
triageIssues := []*models.Issue{
|
||||
models.NewIssueBuilder().
|
||||
WithTitle("App crashes on login").
|
||||
WithDescription("Users report the app crashes immediately after entering credentials. Affects all users on Android 12. Needs urgent attention.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
models.NewIssueBuilder().
|
||||
WithTitle("Dark mode support").
|
||||
WithDescription("Users requesting dark mode theme for better night time usage. Nice to have feature.").
|
||||
WithPriority(3).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
models.NewIssueBuilder().
|
||||
WithTitle("Database timeout errors").
|
||||
WithDescription("Intermittent timeouts when querying large datasets. Needs investigation.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
models.NewIssueBuilder().
|
||||
WithTitle("Add export to CSV feature").
|
||||
WithDescription("Sales team needs ability to export reports to CSV format.").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
models.NewIssueBuilder().
|
||||
WithTitle("Security: Password reset vulnerability").
|
||||
WithDescription("Reported by security audit - password reset tokens don't expire. Critical security issue.").
|
||||
WithPriority(0).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, triageIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t.setupIssue = models.NewBaseIssue().
|
||||
WithTitle("Issue Triage Queue").
|
||||
WithDescription(issueTriageDescription).
|
||||
Build()
|
||||
|
||||
return t.app.Issues.CreateIssue(ctx, t.setupIssue, "")
|
||||
}
|
||||
|
||||
func (t *IssueTriageTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
expect := check.NewExpector()
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils/check"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
const milestoneTrackingDescription = `You are tasked with managing a project milestone.
|
||||
|
||||
The "Q1 Release" milestone is approaching and you need to ensure all issues are on track.
|
||||
Review the milestone issues and:
|
||||
|
||||
1. Identify issues at risk of missing the deadline
|
||||
2. Update issue statuses to reflect current progress
|
||||
3. Flag any blockers or dependencies causing delays
|
||||
4. Close completed issues
|
||||
5. Provide status updates for stakeholder visibility
|
||||
|
||||
The milestone deadline is 2 weeks away. Some issues have dependencies that need to be resolved first.`
|
||||
|
||||
type MilestoneTrackingTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
}
|
||||
|
||||
func NewMilestoneTrackingTask(app *App) *MilestoneTrackingTask {
|
||||
return &MilestoneTrackingTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *MilestoneTrackingTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/milestone-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *MilestoneTrackingTask) Details(interfaceType InterfaceType) TaskDetails {
|
||||
return BaseDetails(interfaceType).
|
||||
WithTitle("Milestone Tracking Task").
|
||||
WithDescription(milestoneTrackingDescription).
|
||||
WithTimeToComplete("10m").
|
||||
WithDifficulty("Easy")
|
||||
}
|
||||
|
||||
func (t *MilestoneTrackingTask) Questions(interfaceType InterfaceType) Questions {
|
||||
return BaseQuestions(interfaceType).With(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[int]().
|
||||
Title("How many issues did you identify as at-risk?").
|
||||
Options(
|
||||
huh.NewOption("0", 0),
|
||||
huh.NewOption("1-2", 1),
|
||||
huh.NewOption("3+", 2),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
func (t *MilestoneTrackingTask) Setup(ctx context.Context) error {
|
||||
if err := ClearIssues(t.app); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
milestoneIssues := []*models.Issue{
|
||||
NewIssueBuilder().
|
||||
WithTitle("Core API endpoints").
|
||||
WithDescription("Implement REST API for core functionality. COMPLETED").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusClosed).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Frontend dashboard").
|
||||
WithDescription("Create main dashboard UI. In progress - 80% complete").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("User management module").
|
||||
WithDescription("Depends on Core API. Add user CRUD operations. Currently blocked").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Analytics reporting").
|
||||
WithDescription("Generate usage analytics reports. Not started yet").
|
||||
WithPriority(3).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Email notifications").
|
||||
WithDescription("Setup email service for alerts. 50% complete").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, milestoneIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t.setupIssue = NewIssueBuilder().
|
||||
WithTitle("Q1 Release Milestone Tracking").
|
||||
WithDescription(milestoneTrackingDescription).
|
||||
Build()
|
||||
|
||||
return t.app.Issues.CreateIssue(ctx, t.setupIssue, "")
|
||||
}
|
||||
|
||||
func (t *MilestoneTrackingTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
expect := check.NewExpector()
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils/check"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
const reportGenerationDescription = `You are tasked with generating a project status report.
|
||||
|
||||
The stakeholders need a weekly status update. Review the current project state and:
|
||||
|
||||
1. Identify completed issues since last report
|
||||
2. Count issues in progress and their status
|
||||
3. Note any blocked items and blockers
|
||||
4. Calculate velocity
|
||||
5. Flag any risks or concerns
|
||||
6. Update the project status
|
||||
|
||||
Add summary comments to at least 3 key issues that stakeholders should know about.`
|
||||
|
||||
type ReportGenerationTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
}
|
||||
|
||||
func NewReportGenerationTask(app *App) *ReportGenerationTask {
|
||||
return &ReportGenerationTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *ReportGenerationTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/report-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *ReportGenerationTask) Details(interfaceType InterfaceType) TaskDetails {
|
||||
return BaseDetails(interfaceType).
|
||||
WithTitle("Status Report Generation").
|
||||
WithDescription(reportGenerationDescription).
|
||||
WithTimeToComplete("10m").
|
||||
WithDifficulty("Easy")
|
||||
}
|
||||
|
||||
func (t *ReportGenerationTask) Questions(interfaceType InterfaceType) Questions {
|
||||
return BaseQuestions(interfaceType).With(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[int]().
|
||||
Title("What is the overall project status?").
|
||||
Options(
|
||||
huh.NewOption("On Track", 1),
|
||||
huh.NewOption("At Risk", 2),
|
||||
huh.NewOption("Off Track", 3),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
func (t *ReportGenerationTask) Setup(ctx context.Context) error {
|
||||
if err := ClearIssues(t.app); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
reportIssues := []*models.Issue{
|
||||
NewIssueBuilder().
|
||||
WithTitle("User login feature").
|
||||
WithDescription("Allow users to login with email/password.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusClosed).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Password reset").
|
||||
WithDescription("Email-based password reset flow. In Progress").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Database optimization").
|
||||
WithDescription("Optimize slow queries identified in profiling.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Mobile responsive design").
|
||||
WithDescription("Make UI work on mobile devices.").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusClosed).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Third-party API integration").
|
||||
WithDescription("Waiting for vendor API documentation.").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, reportIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t.setupIssue = NewIssueBuilder().
|
||||
WithTitle("Weekly Status Report").
|
||||
WithDescription(reportGenerationDescription).
|
||||
Build()
|
||||
|
||||
return t.app.Issues.CreateIssue(ctx, t.setupIssue, "")
|
||||
}
|
||||
|
||||
func (t *ReportGenerationTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
expect := check.NewExpector()
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils/check"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
const stakeholderUpdateDescription = `You are tasked with preparing stakeholder updates.
|
||||
|
||||
A key stakeholder has requested an update on the progress of their requested features.
|
||||
You need to:
|
||||
|
||||
1. Identify issues related to the stakeholder's requests (marked with "stakeholder" in description)
|
||||
2. Review the current status of each issue
|
||||
3. Provide clear, non-technical status updates via comments
|
||||
4. Highlight any blockers or delays
|
||||
5. Set realistic expectations for delivery
|
||||
6. Close completed items with completion notes
|
||||
|
||||
The stakeholder is interested in the Dashboard Enhancement and Export Features specifically.`
|
||||
|
||||
type StakeholderUpdateTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
}
|
||||
|
||||
func NewStakeholderUpdateTask(app *App) *StakeholderUpdateTask {
|
||||
return &StakeholderUpdateTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *StakeholderUpdateTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/stakeholder-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *StakeholderUpdateTask) Details(interfaceType InterfaceType) TaskDetails {
|
||||
return BaseDetails(interfaceType).
|
||||
WithTitle("Stakeholder Update Task").
|
||||
WithDescription(stakeholderUpdateDescription).
|
||||
WithTimeToComplete("10m").
|
||||
WithDifficulty("Easy")
|
||||
}
|
||||
|
||||
func (t *StakeholderUpdateTask) Questions(interfaceType InterfaceType) Questions {
|
||||
return BaseQuestions(interfaceType).With(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[int]().
|
||||
Title("How satisfied will the stakeholder be with this update?").
|
||||
Options(
|
||||
huh.NewOption("Very satisfied", 1),
|
||||
huh.NewOption("Satisfied", 2),
|
||||
huh.NewOption("Neutral", 3),
|
||||
huh.NewOption("Concerned", 4),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
func (t *StakeholderUpdateTask) Setup(ctx context.Context) error {
|
||||
if err := ClearIssues(t.app); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
stakeholderIssues := []*models.Issue{
|
||||
NewIssueBuilder().
|
||||
WithTitle("Dashboard Enhancement - Charts").
|
||||
WithDescription("Add interactive charts to the main dashboard (stakeholder request). COMPLETED").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusClosed).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Dashboard Enhancement - Filters").
|
||||
WithDescription("Add date range filters to dashboard (stakeholder request). In Progress").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Export to PDF").
|
||||
WithDescription("Allow exporting reports to PDF format (stakeholder request). In Progress").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Export to Excel").
|
||||
WithDescription("Allow exporting data to Excel format (stakeholder request). BLOCKED - waiting for library approval").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusBlocked).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, stakeholderIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t.setupIssue = NewIssueBuilder().
|
||||
WithTitle("Stakeholder Update Preparation").
|
||||
WithDescription(stakeholderUpdateDescription).
|
||||
Build()
|
||||
|
||||
return t.app.Issues.CreateIssue(ctx, t.setupIssue, "")
|
||||
}
|
||||
|
||||
func (t *StakeholderUpdateTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
expect := check.NewExpector()
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/models"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils/check"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
const teamCapacityDescription = `You are tasked with managing team capacity.
|
||||
|
||||
You have a team of 4 developers with varying skill and availability.
|
||||
Review the upcoming sprint workload and:
|
||||
|
||||
1. Review assigned issues and their priorities
|
||||
2. Identify overloaded team members based on issue assignments
|
||||
3. Rebalance workload to match capacity
|
||||
4. Consider vacations and time off mentioned in issue descriptions
|
||||
5. Ensure critical tasks have coverage
|
||||
|
||||
Team member Alice is on vacation next week (mentioned in her issues). Bob can only work 50% time due to other commitments.`
|
||||
|
||||
type TeamCapacityTask struct {
|
||||
done bool
|
||||
app *App
|
||||
setupIssue *Issue
|
||||
}
|
||||
|
||||
func NewTeamCapacityTask(app *App) *TeamCapacityTask {
|
||||
return &TeamCapacityTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *TeamCapacityTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/capacity-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *TeamCapacityTask) Details(interfaceType InterfaceType) TaskDetails {
|
||||
return BaseDetails(interfaceType).
|
||||
WithTitle("Team Capacity Management").
|
||||
WithDescription(teamCapacityDescription).
|
||||
WithTimeToComplete("12m").
|
||||
WithDifficulty("Medium")
|
||||
}
|
||||
|
||||
func (t *TeamCapacityTask) Questions(interfaceType InterfaceType) Questions {
|
||||
return BaseQuestions(interfaceType).With(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[int]().
|
||||
Title("How many issues did you reassign or update?").
|
||||
Options(
|
||||
huh.NewOption("0", 0),
|
||||
huh.NewOption("1-2", 1),
|
||||
huh.NewOption("3+", 2),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
func (t *TeamCapacityTask) Setup(ctx context.Context) error {
|
||||
if err := ClearIssues(t.app); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
capacityIssues := []*models.Issue{
|
||||
NewIssueBuilder().
|
||||
WithTitle("Authentication module").
|
||||
WithDescription("Implement OAuth2 flow. Assigned to: Alice (on vacation next week)").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Payment integration").
|
||||
WithDescription("Integrate Stripe API. Assigned to: Alice (on vacation next week)").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Dashboard widgets").
|
||||
WithDescription("Create reusable widget components. Assigned to: Bob (50% capacity)").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusInProgress).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("API rate limiting").
|
||||
WithDescription("Add rate limiting middleware. Assigned to: Bob (50% capacity)").
|
||||
WithPriority(2).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Data migration").
|
||||
WithDescription("Migrate legacy data to new schema. Assigned to: Charlie (full capacity)").
|
||||
WithPriority(3).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
NewIssueBuilder().
|
||||
WithTitle("Bug fixes batch").
|
||||
WithDescription("Fix reported bugs from QA. Assigned to: Diana (full capacity)").
|
||||
WithPriority(1).
|
||||
WithStatus(models.StatusOpen).
|
||||
WithIssueType(models.TypeTask).
|
||||
Build(),
|
||||
}
|
||||
|
||||
if err := t.app.Issues.CreateIssues(ctx, capacityIssues, ""); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
t.setupIssue = NewIssueBuilder().
|
||||
WithTitle("Team Capacity Planning").
|
||||
WithDescription(teamCapacityDescription).
|
||||
Build()
|
||||
|
||||
return t.app.Issues.CreateIssue(ctx, t.setupIssue, "")
|
||||
}
|
||||
|
||||
func (t *TeamCapacityTask) Validate(ctx context.Context) ValidationFeedback {
|
||||
expect := check.NewExpector()
|
||||
|
||||
return expect.Complete()
|
||||
}
|
||||
Reference in New Issue
Block a user