feat: implement project action tools for enhanced project management capabilities

This commit is contained in:
Roberto Musso
2026-02-24 15:53:32 +01:00
parent 5eb19e022e
commit 7a1aec0d9f
5 changed files with 547 additions and 58 deletions

View File

@@ -1,4 +1,4 @@
## Your Task US-020
## Your Task US-021
1. Read the full app PRD at `prd-main.md` (in the same directory as this file)
2. Read the PRD at `prd.json` (in the same directory as this file)
@@ -23,22 +23,18 @@ APPEND to progress.txt (never replace, always append):
## USER REQUEST
{
"id": "US-020",
"title": "Context-scoped AI chat UI",
"description": "As a user, I want the AI chat (revealed by the Fluid Curtain) to display a context header, support message input, and stream AI responses.",
"id": "US-021",
"title": "@ProjectAgent with project action tools",
"description": "As a user, I want the AI to answer project-specific questions and take actions like adding tasks, summarizing the project, and suggesting checkpoints.",
"acceptanceCriteria": [
"Chat panel shows a context header using shadcn/ui Badge (variant=outline): 'Chatting about: [Project Name]' when opened from a project detail view, or 'Global workspace' when opened from other sections",
"Chat input box uses shadcn/ui Textarea: white background, border #d4d4d4, shadow-lg, min-height 109px, placeholder 'Ask me anything...'; Send uses shadcn/ui Button (black bg, Send Lucide icon + 'Send' label) anchored bottom-right",
"User messages appear as right-aligned message bubbles using shadcn/ui Card; AI responses as left-aligned Cards",
"Streaming: AI response tokens appended to the current AI bubble as they arrive from ai.chat",
"A loading spinner or pulsing indicator (shadcn/ui Skeleton) shown while waiting for first token",
"If ai.chat returns { error }, display the error message in a shadcn/ui Card with destructive border styling",
"Chat history is session-only — cleared when the curtain closes or the app restarts",
"Install shadcn/ui components via 'npx shadcn@latest add textarea' before implementing (card, badge, button, skeleton already installed)",
"Typecheck passes",
"Verify in browser using dev-browser skill"
"read_project_notes tool: fetches all notes for the scoped projectId from SQLite and returns combined content to the model",
"add_task tool: creates a task in the project via tasks.create and confirms with 'Task added: [title]' in the chat response",
"get_summary tool: calls the SDK to generate a 2-3 sentence summary of the project based on its notes and tasks, then calls projects.update to persist the result in project.aiSummary",
"suggest_checkpoints tool: returns a JSON array of { title: string, date: string } proposed checkpoints based on date-anchored commitments found in notes",
"@Orchestrator routes project-context messages to @ProjectAgent",
"Typecheck passes"
],
"priority": 20,
"priority": 21,
"passes": false,
"notes": ""
}