fix: address code review feedback
- Fix incorrect API endpoint paths (removed /api prefix) - Improve TypeScript strict typing with explicit metadata interfaces - Update SKILL.md with clear trigger phrases and examples - Fix README installation path reference - Add clarification about API URL format (no /api suffix needed) - Export new metadata type interfaces
This commit is contained in:
@@ -14,14 +14,14 @@ Clawdbot skill for querying and analyzing project timelines, task dependencies,
|
||||
|
||||
1. **Copy skill to Clawdbot plugins directory:**
|
||||
```bash
|
||||
cp -r ~/src/mosaic-skills/gantt ~/.claude/plugins/mosaic-plugin-gantt
|
||||
cp -r ~/src/mosaic-stack-worktrees/feature-26-gantt-skill/packages/skills/gantt ~/.claude/plugins/mosaic-plugin-gantt
|
||||
```
|
||||
|
||||
2. **Set up environment variables:**
|
||||
|
||||
Add to your `.env` or shell profile:
|
||||
```bash
|
||||
export MOSAIC_API_URL="http://localhost:3000/api"
|
||||
export MOSAIC_API_URL="http://localhost:3000"
|
||||
export MOSAIC_WORKSPACE_ID="your-workspace-uuid"
|
||||
export MOSAIC_API_TOKEN="your-api-token"
|
||||
```
|
||||
@@ -75,9 +75,9 @@ The `gantt-api.sh` helper script can be used directly:
|
||||
|
||||
### Endpoints
|
||||
|
||||
- `GET /api/projects` - List projects (paginated)
|
||||
- `GET /api/projects/:id` - Get project with tasks
|
||||
- `GET /api/tasks` - List tasks with filters
|
||||
- `GET /projects` - List projects (paginated)
|
||||
- `GET /projects/:id` - Get project with tasks
|
||||
- `GET /tasks` - List tasks with filters
|
||||
- Query params: `projectId`, `status`, `priority`, `assigneeId`, `page`, `limit`
|
||||
|
||||
### Authentication
|
||||
|
||||
@@ -17,14 +17,14 @@ The Mosaic Stack provides project management capabilities with support for:
|
||||
|
||||
## API Endpoints
|
||||
|
||||
**Base URL**: Configured via `MOSAIC_API_URL` environment variable (default: `http://localhost:3000/api`)
|
||||
**Base URL**: Configured via `MOSAIC_API_URL` environment variable (default: `http://localhost:3000`)
|
||||
|
||||
### Projects
|
||||
- `GET /api/projects` - List all projects with pagination
|
||||
- `GET /api/projects/:id` - Get project details with tasks
|
||||
- `GET /projects` - List all projects with pagination
|
||||
- `GET /projects/:id` - Get project details with tasks
|
||||
|
||||
### Tasks
|
||||
- `GET /api/tasks` - List all tasks with optional filters
|
||||
- `GET /tasks` - List all tasks with optional filters
|
||||
- Query params: `projectId`, `status`, `priority`, `assigneeId`, `page`, `limit`
|
||||
|
||||
## Authentication
|
||||
@@ -33,33 +33,33 @@ Requests require authentication headers:
|
||||
- `X-Workspace-Id`: Workspace UUID (from `MOSAIC_WORKSPACE_ID` env var)
|
||||
- `Authorization`: Bearer token (from `MOSAIC_API_TOKEN` env var)
|
||||
|
||||
## Usage Patterns
|
||||
## Trigger Phrases & Examples
|
||||
|
||||
### Query Project Timeline
|
||||
When the user asks to "show project X timeline" or "what's the status of project Y":
|
||||
1. List projects to find the matching project (by name or ID)
|
||||
2. Get full project details including tasks
|
||||
3. Present timeline information with task dates and status
|
||||
**Query project timeline:**
|
||||
- "Show me the timeline for [project name]"
|
||||
- "What's the status of [project]?"
|
||||
- "Give me an overview of Project Alpha"
|
||||
|
||||
### Check Task Dependencies
|
||||
When asked "what blocks task X" or "what are the dependencies for task Y":
|
||||
1. Search tasks to find the target task
|
||||
2. Check `metadata.dependencies` field (array of task IDs)
|
||||
3. Fetch blocking tasks and present the dependency chain
|
||||
**Check task dependencies:**
|
||||
- "What blocks task [task name]?"
|
||||
- "What are the dependencies for [task]?"
|
||||
- "Show me what's blocking [task]"
|
||||
|
||||
### Get Project Status Overview
|
||||
When asked for "project status" or "project overview":
|
||||
1. Get project with task count
|
||||
2. Calculate status distribution (completed/in-progress/not-started)
|
||||
3. Identify tasks approaching or past due dates
|
||||
4. Present summary statistics
|
||||
**Project status overview:**
|
||||
- "Project status for [project]"
|
||||
- "How is [project] doing?"
|
||||
- "Summary of [project]"
|
||||
|
||||
### Identify Critical Path
|
||||
When asked to "find critical path" or "identify blockers":
|
||||
1. Get all project tasks with dependencies
|
||||
2. Build dependency graph from `metadata.dependencies`
|
||||
3. Calculate longest path through dependencies
|
||||
4. Identify tasks with no slack time (critical tasks)
|
||||
**Identify critical path:**
|
||||
- "Find the critical path for [project]"
|
||||
- "What's the critical path?"
|
||||
- "Show me blockers for [project]"
|
||||
- "Which tasks can't be delayed in [project]?"
|
||||
|
||||
**Find upcoming deadlines:**
|
||||
- "What tasks are due soon in [project]?"
|
||||
- "Show me tasks approaching deadline"
|
||||
- "What's due this week?"
|
||||
|
||||
## Data Models
|
||||
|
||||
@@ -130,7 +130,7 @@ When presenting information, use supportive, non-judgmental language:
|
||||
## Implementation Notes
|
||||
|
||||
1. **Environment Setup**: Ensure `.env` has required variables:
|
||||
- `MOSAIC_API_URL` - API base URL
|
||||
- `MOSAIC_API_URL` - API base URL (e.g., `http://localhost:3000`, no `/api` suffix)
|
||||
- `MOSAIC_WORKSPACE_ID` - Workspace UUID
|
||||
- `MOSAIC_API_TOKEN` - Authentication token
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
# Configuration from environment
|
||||
API_URL="${MOSAIC_API_URL:-http://localhost:3000/api}"
|
||||
API_URL="${MOSAIC_API_URL:-http://localhost:3000}"
|
||||
WORKSPACE_ID="${MOSAIC_WORKSPACE_ID:-}"
|
||||
API_TOKEN="${MOSAIC_API_TOKEN:-}"
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ export type ProjectStatus = 'PLANNING' | 'ACTIVE' | 'ON_HOLD' | 'COMPLETED' | 'A
|
||||
export type TaskStatus = 'NOT_STARTED' | 'IN_PROGRESS' | 'PAUSED' | 'COMPLETED' | 'ARCHIVED';
|
||||
export type TaskPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
|
||||
|
||||
export interface ProjectMetadata {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
id: string;
|
||||
workspaceId: string;
|
||||
@@ -37,7 +41,7 @@ export interface Project {
|
||||
startDate: string | null;
|
||||
endDate: string | null;
|
||||
color: string | null;
|
||||
metadata: Record<string, unknown>;
|
||||
metadata: ProjectMetadata;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
tasks?: Task[];
|
||||
@@ -47,6 +51,12 @@ export interface Project {
|
||||
};
|
||||
}
|
||||
|
||||
export interface TaskMetadata {
|
||||
startDate?: string;
|
||||
dependencies?: string[];
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface Task {
|
||||
id: string;
|
||||
workspaceId: string;
|
||||
@@ -61,11 +71,7 @@ export interface Task {
|
||||
creatorId: string;
|
||||
parentId: string | null;
|
||||
sortOrder: number;
|
||||
metadata: {
|
||||
startDate?: string;
|
||||
dependencies?: string[];
|
||||
[key: string]: unknown;
|
||||
};
|
||||
metadata: TaskMetadata;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
project?: {
|
||||
|
||||
@@ -7,7 +7,9 @@ export {
|
||||
createGanttClientFromEnv,
|
||||
type GanttClientConfig,
|
||||
type Project,
|
||||
type ProjectMetadata,
|
||||
type Task,
|
||||
type TaskMetadata,
|
||||
type ProjectStatus,
|
||||
type TaskStatus,
|
||||
type TaskPriority,
|
||||
|
||||
Reference in New Issue
Block a user