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:**
|
1. **Copy skill to Clawdbot plugins directory:**
|
||||||
```bash
|
```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:**
|
2. **Set up environment variables:**
|
||||||
|
|
||||||
Add to your `.env` or shell profile:
|
Add to your `.env` or shell profile:
|
||||||
```bash
|
```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_WORKSPACE_ID="your-workspace-uuid"
|
||||||
export MOSAIC_API_TOKEN="your-api-token"
|
export MOSAIC_API_TOKEN="your-api-token"
|
||||||
```
|
```
|
||||||
@@ -75,9 +75,9 @@ The `gantt-api.sh` helper script can be used directly:
|
|||||||
|
|
||||||
### Endpoints
|
### Endpoints
|
||||||
|
|
||||||
- `GET /api/projects` - List projects (paginated)
|
- `GET /projects` - List projects (paginated)
|
||||||
- `GET /api/projects/:id` - Get project with tasks
|
- `GET /projects/:id` - Get project with tasks
|
||||||
- `GET /api/tasks` - List tasks with filters
|
- `GET /tasks` - List tasks with filters
|
||||||
- Query params: `projectId`, `status`, `priority`, `assigneeId`, `page`, `limit`
|
- Query params: `projectId`, `status`, `priority`, `assigneeId`, `page`, `limit`
|
||||||
|
|
||||||
### Authentication
|
### Authentication
|
||||||
|
|||||||
@@ -17,14 +17,14 @@ The Mosaic Stack provides project management capabilities with support for:
|
|||||||
|
|
||||||
## API Endpoints
|
## 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
|
### Projects
|
||||||
- `GET /api/projects` - List all projects with pagination
|
- `GET /projects` - List all projects with pagination
|
||||||
- `GET /api/projects/:id` - Get project details with tasks
|
- `GET /projects/:id` - Get project details with tasks
|
||||||
|
|
||||||
### 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`
|
- Query params: `projectId`, `status`, `priority`, `assigneeId`, `page`, `limit`
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
@@ -33,33 +33,33 @@ Requests require authentication headers:
|
|||||||
- `X-Workspace-Id`: Workspace UUID (from `MOSAIC_WORKSPACE_ID` env var)
|
- `X-Workspace-Id`: Workspace UUID (from `MOSAIC_WORKSPACE_ID` env var)
|
||||||
- `Authorization`: Bearer token (from `MOSAIC_API_TOKEN` env var)
|
- `Authorization`: Bearer token (from `MOSAIC_API_TOKEN` env var)
|
||||||
|
|
||||||
## Usage Patterns
|
## Trigger Phrases & Examples
|
||||||
|
|
||||||
### Query Project Timeline
|
**Query project timeline:**
|
||||||
When the user asks to "show project X timeline" or "what's the status of project Y":
|
- "Show me the timeline for [project name]"
|
||||||
1. List projects to find the matching project (by name or ID)
|
- "What's the status of [project]?"
|
||||||
2. Get full project details including tasks
|
- "Give me an overview of Project Alpha"
|
||||||
3. Present timeline information with task dates and status
|
|
||||||
|
|
||||||
### Check Task Dependencies
|
**Check task dependencies:**
|
||||||
When asked "what blocks task X" or "what are the dependencies for task Y":
|
- "What blocks task [task name]?"
|
||||||
1. Search tasks to find the target task
|
- "What are the dependencies for [task]?"
|
||||||
2. Check `metadata.dependencies` field (array of task IDs)
|
- "Show me what's blocking [task]"
|
||||||
3. Fetch blocking tasks and present the dependency chain
|
|
||||||
|
|
||||||
### Get Project Status Overview
|
**Project status overview:**
|
||||||
When asked for "project status" or "project overview":
|
- "Project status for [project]"
|
||||||
1. Get project with task count
|
- "How is [project] doing?"
|
||||||
2. Calculate status distribution (completed/in-progress/not-started)
|
- "Summary of [project]"
|
||||||
3. Identify tasks approaching or past due dates
|
|
||||||
4. Present summary statistics
|
|
||||||
|
|
||||||
### Identify Critical Path
|
**Identify critical path:**
|
||||||
When asked to "find critical path" or "identify blockers":
|
- "Find the critical path for [project]"
|
||||||
1. Get all project tasks with dependencies
|
- "What's the critical path?"
|
||||||
2. Build dependency graph from `metadata.dependencies`
|
- "Show me blockers for [project]"
|
||||||
3. Calculate longest path through dependencies
|
- "Which tasks can't be delayed in [project]?"
|
||||||
4. Identify tasks with no slack time (critical tasks)
|
|
||||||
|
**Find upcoming deadlines:**
|
||||||
|
- "What tasks are due soon in [project]?"
|
||||||
|
- "Show me tasks approaching deadline"
|
||||||
|
- "What's due this week?"
|
||||||
|
|
||||||
## Data Models
|
## Data Models
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ When presenting information, use supportive, non-judgmental language:
|
|||||||
## Implementation Notes
|
## Implementation Notes
|
||||||
|
|
||||||
1. **Environment Setup**: Ensure `.env` has required variables:
|
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_WORKSPACE_ID` - Workspace UUID
|
||||||
- `MOSAIC_API_TOKEN` - Authentication token
|
- `MOSAIC_API_TOKEN` - Authentication token
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Configuration from environment
|
# 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:-}"
|
WORKSPACE_ID="${MOSAIC_WORKSPACE_ID:-}"
|
||||||
API_TOKEN="${MOSAIC_API_TOKEN:-}"
|
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 TaskStatus = 'NOT_STARTED' | 'IN_PROGRESS' | 'PAUSED' | 'COMPLETED' | 'ARCHIVED';
|
||||||
export type TaskPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
|
export type TaskPriority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT';
|
||||||
|
|
||||||
|
export interface ProjectMetadata {
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Project {
|
export interface Project {
|
||||||
id: string;
|
id: string;
|
||||||
workspaceId: string;
|
workspaceId: string;
|
||||||
@@ -37,7 +41,7 @@ export interface Project {
|
|||||||
startDate: string | null;
|
startDate: string | null;
|
||||||
endDate: string | null;
|
endDate: string | null;
|
||||||
color: string | null;
|
color: string | null;
|
||||||
metadata: Record<string, unknown>;
|
metadata: ProjectMetadata;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
tasks?: Task[];
|
tasks?: Task[];
|
||||||
@@ -47,6 +51,12 @@ export interface Project {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface TaskMetadata {
|
||||||
|
startDate?: string;
|
||||||
|
dependencies?: string[];
|
||||||
|
[key: string]: unknown;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Task {
|
export interface Task {
|
||||||
id: string;
|
id: string;
|
||||||
workspaceId: string;
|
workspaceId: string;
|
||||||
@@ -61,11 +71,7 @@ export interface Task {
|
|||||||
creatorId: string;
|
creatorId: string;
|
||||||
parentId: string | null;
|
parentId: string | null;
|
||||||
sortOrder: number;
|
sortOrder: number;
|
||||||
metadata: {
|
metadata: TaskMetadata;
|
||||||
startDate?: string;
|
|
||||||
dependencies?: string[];
|
|
||||||
[key: string]: unknown;
|
|
||||||
};
|
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
project?: {
|
project?: {
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ export {
|
|||||||
createGanttClientFromEnv,
|
createGanttClientFromEnv,
|
||||||
type GanttClientConfig,
|
type GanttClientConfig,
|
||||||
type Project,
|
type Project,
|
||||||
|
type ProjectMetadata,
|
||||||
type Task,
|
type Task,
|
||||||
|
type TaskMetadata,
|
||||||
type ProjectStatus,
|
type ProjectStatus,
|
||||||
type TaskStatus,
|
type TaskStatus,
|
||||||
type TaskPriority,
|
type TaskPriority,
|
||||||
|
|||||||
Reference in New Issue
Block a user