feat: include goal in task list output

Amolith created

Change summary

README.md                    |  4 ++++
internal/planning/manager.go | 15 +++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)

Detailed changes

README.md 🔗

@@ -127,6 +127,8 @@ Response: `Tasks added successfully! Get started on your first one once you're r
 
 Response:
 ```
+**Goal:** Create a comprehensive MCP server for task planning and management
+
 Legend: ☐ pending  ⟳ in progress  ☑ completed
 ☐ Set up project structure [a1b2c3d4]
   Create Go module, directories, and basic files
@@ -149,6 +151,8 @@ Legend: ☐ pending  ⟳ in progress  ☑ completed
 
 Response:
 ```
+**Goal:** Create a comprehensive MCP server for task planning and management
+
 Legend: ☐ pending  ⟳ in progress  ☑ completed
 ☑ Set up project structure [a1b2c3d4]
   Create Go module, directories, and basic files

internal/planning/manager.go 🔗

@@ -100,12 +100,23 @@ func (m *Manager) GetTasks() string {
 	m.mu.RLock()
 	defer m.mu.RUnlock()
 
+	var lines []string
+
+	// Add goal if it exists
+	if m.goal != nil && m.goal.Text != "" {
+		lines = append(lines, fmt.Sprintf("**Goal:** %s", m.goal.Text))
+		lines = append(lines, "")
+	}
+
 	if len(m.tasks) == 0 {
+		if len(lines) > 0 {
+			// We have a goal but no tasks
+			lines = append(lines, "No tasks defined yet.")
+			return strings.Join(lines, "\n")
+		}
 		return "No tasks defined yet."
 	}
 
-	var lines []string
-
 	// Sort tasks by creation time for consistent output
 	taskList := make([]*Task, 0, len(m.tasks))
 	for _, task := range m.tasks {