@critical-path/mcp 0.18.1 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +70 -25
- package/dist/bin/args.d.ts +8 -0
- package/dist/bin/args.d.ts.map +1 -1
- package/dist/bin/args.js +20 -0
- package/dist/bin/args.js.map +1 -1
- package/dist/bin/cli.js +37 -3
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/skills.d.ts +15 -0
- package/dist/bin/skills.d.ts.map +1 -0
- package/dist/bin/skills.js +28 -0
- package/dist/bin/skills.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +27 -13
- package/dist/server/index.js.map +1 -1
- package/dist/skills/catalog.generated.d.ts +3 -0
- package/dist/skills/catalog.generated.d.ts.map +1 -0
- package/dist/skills/catalog.generated.js +33 -0
- package/dist/skills/catalog.generated.js.map +1 -0
- package/dist/skills/index.d.ts +13 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +7 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/tools/definitions.d.ts +86 -8
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +302 -52
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/instructions.d.ts +10 -0
- package/dist/tools/instructions.d.ts.map +1 -0
- package/dist/tools/instructions.js +48 -0
- package/dist/tools/instructions.js.map +1 -0
- package/dist/tools/outputs.d.ts +2443 -0
- package/dist/tools/outputs.d.ts.map +1 -0
- package/dist/tools/outputs.js +190 -0
- package/dist/tools/outputs.js.map +1 -0
- package/dist/web/index.d.ts +16 -0
- package/dist/web/index.d.ts.map +1 -1
- package/dist/web/index.js +13 -12
- package/dist/web/index.js.map +1 -1
- package/package.json +13 -8
- package/skills/analyze-schedule/SKILL.md +44 -0
- package/skills/investigate-task/SKILL.md +41 -0
- package/skills/plan-capacity/SKILL.md +32 -0
- package/skills/plan-project/SKILL.md +46 -0
- package/skills/report-status/SKILL.md +46 -0
- package/skills/triage-tasks/SKILL.md +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../../src/tools/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;gCAKF,CAAC;AAEzB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAaF,CAAC;AAUtB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOlB,CAAC;AAEtB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;gCAKgB,CAAC;AAE9C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;gCAKF,CAAC;AAE7B,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;gCAKG,CAAC;AA4B9B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;gCAoBrC,CAAC;AAEH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAKtB,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Output schemas for the MCP tools. They describe the top-level shape of each result so agents
|
|
4
|
+
* know which fields they can read and pass to the next tool. Every object is `passthrough()`:
|
|
5
|
+
* the schema documents the important fields without rejecting the others the engine returns.
|
|
6
|
+
*/
|
|
7
|
+
const obj = (shape) => z.object(shape).passthrough();
|
|
8
|
+
/** Optional fields may be absent or null depending on the backend. */
|
|
9
|
+
const opt = (schema) => schema.nullable().optional();
|
|
10
|
+
const anyObject = z.object({}).passthrough();
|
|
11
|
+
export const ProjectOutput = obj({
|
|
12
|
+
id: z.string().describe('Project id; pass as projectId to other tools'),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
key: opt(z.string()).describe('Short prefix, e.g. "PROJ"'),
|
|
15
|
+
description: opt(z.string())
|
|
16
|
+
}).describe('A project');
|
|
17
|
+
export const TaskOutput = obj({
|
|
18
|
+
id: z.string().describe('Task id; pass as id or taskId to other tools'),
|
|
19
|
+
projectId: z.string(),
|
|
20
|
+
title: z.string(),
|
|
21
|
+
status: z.string().describe('Workflow status key'),
|
|
22
|
+
priority: z.string().describe('urgent, high, medium, low or none'),
|
|
23
|
+
assigneeId: opt(z.string()),
|
|
24
|
+
dueDate: opt(z.string()),
|
|
25
|
+
deadline: opt(z.string()).describe('Latest acceptable finish, enforced by critical path analysis'),
|
|
26
|
+
isMilestone: opt(z.boolean()).describe('A zero-duration checkpoint'),
|
|
27
|
+
estimatedHours: opt(z.number()),
|
|
28
|
+
loggedHours: opt(z.number()),
|
|
29
|
+
isBlocked: opt(z.boolean())
|
|
30
|
+
}).describe('A task');
|
|
31
|
+
const DependencyLinkOutput = obj({
|
|
32
|
+
dependencyId: z.string().describe('Id of the dependency record'),
|
|
33
|
+
taskId: z.string().describe('The other task'),
|
|
34
|
+
title: z.string(),
|
|
35
|
+
status: z.string(),
|
|
36
|
+
type: z.string().describe("'blocking' (the waiting task cannot start until the other finishes) or 'relates_to' (informational)")
|
|
37
|
+
});
|
|
38
|
+
export const TaskWithDependenciesOutput = TaskOutput.extend({
|
|
39
|
+
dependencies: opt(obj({
|
|
40
|
+
dependsOn: z.array(DependencyLinkOutput).describe('Tasks this task waits for (upstream)'),
|
|
41
|
+
dependents: z.array(DependencyLinkOutput).describe('Tasks waiting for this task (downstream)')
|
|
42
|
+
})).describe('Present when includeDependencies is true')
|
|
43
|
+
}).describe('A task');
|
|
44
|
+
export const DependencyOutput = obj({
|
|
45
|
+
id: z.string(),
|
|
46
|
+
taskId: z.string().describe('The task that waits'),
|
|
47
|
+
dependsOnTaskId: z.string().describe('The task it waits for'),
|
|
48
|
+
type: z.string().describe('blocking or relates_to')
|
|
49
|
+
}).describe('A dependency between two tasks');
|
|
50
|
+
export const DeliverableOutput = obj({
|
|
51
|
+
id: z.string(),
|
|
52
|
+
projectId: z.string(),
|
|
53
|
+
title: z.string(),
|
|
54
|
+
dueDate: opt(z.string())
|
|
55
|
+
}).describe('A deliverable');
|
|
56
|
+
export const CommentOutput = obj({
|
|
57
|
+
id: z.string(),
|
|
58
|
+
taskId: z.string(),
|
|
59
|
+
content: z.string(),
|
|
60
|
+
authorId: opt(z.string())
|
|
61
|
+
}).describe('A task comment');
|
|
62
|
+
const OverallocationOutput = obj({
|
|
63
|
+
assigneeId: opt(z.string()),
|
|
64
|
+
teamId: opt(z.string()),
|
|
65
|
+
capacity: z.number().describe('1 for a person, headcount for a team pool'),
|
|
66
|
+
allocation: z.number().describe('Total booked in the period, e.g. 1.5 for 150%'),
|
|
67
|
+
start: z.string(),
|
|
68
|
+
end: z.string(),
|
|
69
|
+
taskIds: z.array(z.string())
|
|
70
|
+
});
|
|
71
|
+
const TaskScheduleOutput = obj({
|
|
72
|
+
taskId: z.string(),
|
|
73
|
+
isCritical: z.boolean().describe('True when any delay to this task delays the project end'),
|
|
74
|
+
totalSlack: z.number().describe('Slack in hours; 0 means critical, negative means a deadline is missed by that much'),
|
|
75
|
+
slackWorkingHours: opt(z.number()).describe('Slack in working hours on the task calendar'),
|
|
76
|
+
earlyStartDate: opt(z.string()),
|
|
77
|
+
earlyFinishDate: opt(z.string()),
|
|
78
|
+
lateStartDate: opt(z.string()),
|
|
79
|
+
lateFinishDate: opt(z.string()),
|
|
80
|
+
levelingDelayHours: opt(z.number()).describe('With levelling: hours spent waiting for the assignee'),
|
|
81
|
+
waitingOn: opt(z.string()).describe('With levelling: the task this one waited for'),
|
|
82
|
+
isMilestone: opt(z.boolean()).describe('True for a milestone'),
|
|
83
|
+
deadlineDate: opt(z.string()).describe("The task's deadline as an instant"),
|
|
84
|
+
deadlineVarianceHours: opt(z.number()).describe('Working hours from forecast finish to deadline; negative means it will be missed')
|
|
85
|
+
});
|
|
86
|
+
export const CriticalPathOutput = obj({
|
|
87
|
+
projectId: z.string(),
|
|
88
|
+
projectStartDate: opt(z.string()),
|
|
89
|
+
projectEndDate: opt(z.string()).describe('Forecast finish date'),
|
|
90
|
+
totalDurationHours: z.number(),
|
|
91
|
+
criticalTaskIds: z.array(z.string()).describe('Tasks with zero or negative slack, in schedule order'),
|
|
92
|
+
missedDeadlineTaskIds: opt(z.array(z.string())).describe('Tasks forecast to finish after their deadline'),
|
|
93
|
+
tasks: z.array(TaskScheduleOutput),
|
|
94
|
+
leveled: opt(z.boolean()),
|
|
95
|
+
unleveledProjectEndDate: opt(z.string()).describe('With levelling: the end date before levelling'),
|
|
96
|
+
overallocations: opt(z.array(OverallocationOutput)).describe('Assignee mode: periods where someone is booked above capacity')
|
|
97
|
+
});
|
|
98
|
+
export const PortfolioCriticalPathOutput = obj({
|
|
99
|
+
projects: z.array(CriticalPathOutput).describe('One analysis per project'),
|
|
100
|
+
projectEndDate: opt(z.string()).describe('The latest project end'),
|
|
101
|
+
leveled: opt(z.boolean()),
|
|
102
|
+
overallocations: z.array(OverallocationOutput)
|
|
103
|
+
});
|
|
104
|
+
const PhaseOutput = obj({
|
|
105
|
+
id: z.string(),
|
|
106
|
+
type: z.string().describe('container, iteration, deliverable or phase'),
|
|
107
|
+
name: z.string(),
|
|
108
|
+
health: z.string().describe('on_track, at_risk, blocked, overdue or completed'),
|
|
109
|
+
progressPercentage: z.number().describe('0-100'),
|
|
110
|
+
isCritical: z.boolean(),
|
|
111
|
+
blockedTasks: z.number(),
|
|
112
|
+
taskIds: z.array(z.string())
|
|
113
|
+
});
|
|
114
|
+
export const TimelineLadderOutput = obj({
|
|
115
|
+
projectId: z.string(),
|
|
116
|
+
level: z.string(),
|
|
117
|
+
macro: opt(obj({
|
|
118
|
+
health: z.string().describe('on_track, at_risk, blocked, overdue or completed'),
|
|
119
|
+
overallProgressPercentage: z.number().describe('0-100'),
|
|
120
|
+
projectedFinishDate: opt(z.string()),
|
|
121
|
+
totalTasks: z.number(),
|
|
122
|
+
completedTasks: z.number(),
|
|
123
|
+
blockedTasks: z.number(),
|
|
124
|
+
phases: z.array(PhaseOutput)
|
|
125
|
+
})).describe('Phase-level summary'),
|
|
126
|
+
standard: opt(anyObject).describe('Task timeline: { tasks, criticalPathTaskIds, dependencies, totalDurationHours }'),
|
|
127
|
+
concrete: opt(z.record(anyObject)).describe('Work evidence (time entries, attachments) by task id')
|
|
128
|
+
});
|
|
129
|
+
export const TaskLadderOutput = obj({
|
|
130
|
+
taskId: z.string(),
|
|
131
|
+
macroPhase: opt(PhaseOutput).describe('The phase this task belongs to'),
|
|
132
|
+
standard: anyObject.describe('The task with cpm (isCritical, slackWorkingHours, dates), blockingTaskIds and dependentTaskIds'),
|
|
133
|
+
concrete: anyObject.describe('Evidence of work on the task'),
|
|
134
|
+
metrics: opt(anyObject).describe('Same as get_task_metrics')
|
|
135
|
+
});
|
|
136
|
+
export const TaskProgressHistoryOutput = obj({
|
|
137
|
+
taskId: z.string(),
|
|
138
|
+
points: z.array(obj({ timestamp: z.string(), progress: z.number().describe('0-100'), status: z.string() })),
|
|
139
|
+
curveProfile: z.string().describe('linear, s_curve, early_surge, late_rush, stalled or insufficient_data')
|
|
140
|
+
});
|
|
141
|
+
export const TaskMetricsOutput = obj({
|
|
142
|
+
taskId: z.string(),
|
|
143
|
+
progress: obj({
|
|
144
|
+
progressPercentage: z.number().describe('0-100'),
|
|
145
|
+
source: z.string().describe('Where the figure comes from: explicit, todos, time_effort, schedule_elapsed or blended')
|
|
146
|
+
}),
|
|
147
|
+
realityDelta: obj({
|
|
148
|
+
estimatedHours: z.number(),
|
|
149
|
+
loggedHours: z.number(),
|
|
150
|
+
varianceHours: z.number().describe('logged minus estimated'),
|
|
151
|
+
isOverdue: z.boolean(),
|
|
152
|
+
isOverEstimate: z.boolean(),
|
|
153
|
+
scheduleVarianceWorkingDays: opt(z.number()).describe('Working days late (positive) or early (negative)')
|
|
154
|
+
}),
|
|
155
|
+
evm: obj({
|
|
156
|
+
plannedValue: z.number(),
|
|
157
|
+
earnedValue: z.number(),
|
|
158
|
+
actualCost: z.number(),
|
|
159
|
+
costPerformanceIndex: z.number().describe('CPI = EV / AC; below 1 is over budget'),
|
|
160
|
+
schedulePerformanceIndex: z.number().describe('SPI = EV / PV; below 1 is behind schedule')
|
|
161
|
+
}),
|
|
162
|
+
inferredActuals: anyObject.describe('Actual start/end dates and active working time'),
|
|
163
|
+
progressHistory: TaskProgressHistoryOutput
|
|
164
|
+
});
|
|
165
|
+
export const WorkloadDistributionOutput = obj({
|
|
166
|
+
startDate: z.string(),
|
|
167
|
+
endDate: z.string(),
|
|
168
|
+
interval: z.string(),
|
|
169
|
+
groupBy: z.string(),
|
|
170
|
+
metric: z.string(),
|
|
171
|
+
seriesKeys: z.array(z.string()).describe('Ids of the people, teams, etc. in the series'),
|
|
172
|
+
seriesLabels: z.record(z.string()).describe('Display name for each series key'),
|
|
173
|
+
buckets: z.array(obj({
|
|
174
|
+
date: z.string().describe('Start of the bucket (YYYY-MM-DD)'),
|
|
175
|
+
totalHours: z.number(),
|
|
176
|
+
values: z.record(z.number()).describe('Hours per series key'),
|
|
177
|
+
capacity: opt(z.record(z.number())).describe('Capacity hours per series key'),
|
|
178
|
+
utilizationRatio: opt(z.number()).describe('totalHours / totalCapacity; above 1 is overloaded')
|
|
179
|
+
})),
|
|
180
|
+
totalHours: z.number(),
|
|
181
|
+
totalCapacity: opt(z.number()),
|
|
182
|
+
averageUtilization: opt(z.number())
|
|
183
|
+
});
|
|
184
|
+
export const SkillOutput = obj({
|
|
185
|
+
skills: opt(z.array(obj({ name: z.string(), description: z.string() }))).describe('Present when no name was given'),
|
|
186
|
+
name: opt(z.string()),
|
|
187
|
+
description: opt(z.string()),
|
|
188
|
+
content: opt(z.string()).describe('The playbook (markdown); follow its steps')
|
|
189
|
+
});
|
|
190
|
+
//# sourceMappingURL=outputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../src/tools/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AAEH,MAAM,GAAG,GAAG,CAA0B,KAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AACjF,sEAAsE;AACtE,MAAM,GAAG,GAAG,CAAyB,MAAS,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC;AAChF,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;IAC/B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACvE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAA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ACtB,aAAa,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC9B,kBAAkB,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;IAC7B,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,gCAAgC,CAAC;IACnH,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,2CAA2C,CAAC;CAC/E,CAAC,CAAC"}
|
package/dist/web/index.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { CriticalPathClient } from '@critical-path/client';
|
|
2
|
+
import { type ToolsetName } from '../tools/definitions.js';
|
|
3
|
+
export { TOOLSETS, type ToolsetName } from '../tools/definitions.js';
|
|
4
|
+
export { SKILLS, getSkill, type Skill } from '../skills/index.js';
|
|
2
5
|
export interface WebMcpToolRegistration {
|
|
3
6
|
name: string;
|
|
4
7
|
title?: string;
|
|
5
8
|
description: string;
|
|
6
9
|
inputSchema: Record<string, unknown>;
|
|
10
|
+
outputSchema?: Record<string, unknown>;
|
|
7
11
|
annotations?: {
|
|
8
12
|
readOnlyHint?: boolean;
|
|
9
13
|
destructiveHint?: boolean;
|
|
14
|
+
idempotentHint?: boolean;
|
|
15
|
+
openWorldHint?: boolean;
|
|
10
16
|
};
|
|
11
17
|
execute: (input: any) => Promise<any>;
|
|
12
18
|
}
|
|
@@ -21,7 +27,12 @@ export interface ModelContextInterface {
|
|
|
21
27
|
export interface RegisterWebMcpOptions {
|
|
22
28
|
client: CriticalPathClient;
|
|
23
29
|
projectId?: string;
|
|
30
|
+
/** Exact tool names to expose. Combined with `toolsets`; unknown names throw. */
|
|
24
31
|
tools?: string[];
|
|
32
|
+
/** Tool groups to expose (`core`, `collaboration`, `scheduling`, `analytics`, `guidance`). Default: all. */
|
|
33
|
+
toolsets?: ToolsetName[];
|
|
34
|
+
/** Expose only tools that change nothing. */
|
|
35
|
+
readOnly?: boolean;
|
|
25
36
|
signal?: AbortSignal;
|
|
26
37
|
document?: any;
|
|
27
38
|
navigator?: any;
|
|
@@ -31,6 +42,11 @@ export interface RegisterWebMcpOptions {
|
|
|
31
42
|
export interface WebMcpRegistryHandle {
|
|
32
43
|
unregister: () => void;
|
|
33
44
|
getRegisteredTools: () => WebMcpToolRegistration[];
|
|
45
|
+
/**
|
|
46
|
+
* Orientation for the agent: data model, id flow, which tool to use and the available skills.
|
|
47
|
+
* WebMCP has no standard channel for it, so add it to your copilot's system prompt.
|
|
48
|
+
*/
|
|
49
|
+
instructions: string;
|
|
34
50
|
}
|
|
35
51
|
/**
|
|
36
52
|
* Polyfill/shim a minimal ModelContextInterface onto the document/window if not natively present.
|
package/dist/web/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAA6C,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtG,OAAO,EAAE,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAA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AE,WAAW,EAAE,CAAC;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CACtE;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,kBAAkB,EAAE,MAAM,sBAAsB,EAAE,CAAC;IACnD;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,GAAuD,GAAG,qBAAqB,GAAG,IAAI,CAkCjI;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,CAwFxF"}
|
package/dist/web/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { selectTools, runTool } from '../tools/definitions.js';
|
|
2
|
+
import { buildAgentInstructions } from '../tools/instructions.js';
|
|
3
|
+
export { TOOLSETS } from '../tools/definitions.js';
|
|
4
|
+
export { SKILLS, getSkill } from '../skills/index.js';
|
|
2
5
|
/**
|
|
3
6
|
* Polyfill/shim a minimal ModelContextInterface onto the document/window if not natively present.
|
|
4
7
|
*/
|
|
@@ -52,15 +55,14 @@ export function registerWebMcpTools(options) {
|
|
|
52
55
|
else if (doc) {
|
|
53
56
|
modelContext = ensureModelContextShim(doc) ?? undefined;
|
|
54
57
|
}
|
|
55
|
-
const selectedTools = options.tools
|
|
56
|
-
|
|
57
|
-
: ALL_TOOLS;
|
|
58
|
+
const selectedTools = selectTools({ tools: options.tools, toolsets: options.toolsets, readOnly: options.readOnly });
|
|
59
|
+
const instructions = buildAgentInstructions(selectedTools, { projectId: options.projectId });
|
|
58
60
|
const registeredTools = [];
|
|
59
61
|
const abortController = new AbortController();
|
|
60
62
|
// Combine caller signal with our internal abort controller. An already-aborted signal
|
|
61
63
|
// registers nothing (the component unmounted before registration).
|
|
62
64
|
if (options.signal?.aborted) {
|
|
63
|
-
return { unregister: () => { }, getRegisteredTools: () => [] };
|
|
65
|
+
return { unregister: () => { }, getRegisteredTools: () => [], instructions };
|
|
64
66
|
}
|
|
65
67
|
if (options.signal) {
|
|
66
68
|
options.signal.addEventListener('abort', () => abortController.abort(), { once: true });
|
|
@@ -71,14 +73,11 @@ export function registerWebMcpTools(options) {
|
|
|
71
73
|
title: toolDef.title,
|
|
72
74
|
description: toolDef.description,
|
|
73
75
|
inputSchema: toolDef.inputSchema,
|
|
74
|
-
|
|
75
|
-
annotations: {
|
|
76
|
-
readOnlyHint: toolDef.annotations?.readOnlyHint ?? false,
|
|
77
|
-
destructiveHint: toolDef.annotations?.requiresConfirmation ?? false
|
|
78
|
-
},
|
|
76
|
+
outputSchema: toolDef.outputSchema,
|
|
77
|
+
annotations: { ...toolDef.annotations },
|
|
79
78
|
execute: async (input) => {
|
|
80
79
|
const ambientContext = options.projectId ? { projectId: options.projectId } : undefined;
|
|
81
|
-
const result = await
|
|
80
|
+
const result = await runTool(toolDef, input, options.client, ambientContext);
|
|
82
81
|
options.onToolExecuted?.(toolDef.name, input, result);
|
|
83
82
|
return result;
|
|
84
83
|
}
|
|
@@ -97,6 +96,7 @@ export function registerWebMcpTools(options) {
|
|
|
97
96
|
if (win) {
|
|
98
97
|
win.__CRITICAL_PATH_WEBMCP__ = {
|
|
99
98
|
projectId: options.projectId,
|
|
99
|
+
instructions,
|
|
100
100
|
tools: registeredTools,
|
|
101
101
|
execute: async (name, input) => {
|
|
102
102
|
const tool = registeredTools.find((t) => t.name === name);
|
|
@@ -119,7 +119,8 @@ export function registerWebMcpTools(options) {
|
|
|
119
119
|
};
|
|
120
120
|
return {
|
|
121
121
|
unregister,
|
|
122
|
-
getRegisteredTools: () => registeredTools
|
|
122
|
+
getRegisteredTools: () => registeredTools,
|
|
123
|
+
instructions
|
|
123
124
|
};
|
|
124
125
|
}
|
|
125
126
|
//# sourceMappingURL=index.js.map
|
package/dist/web/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/web/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAyC,MAAM,yBAAyB,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAoB,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAc,MAAM,oBAAoB,CAAC;AAkDlE;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAW,OAAO,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;IACjG,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IAEtB,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;QACtB,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkC,CAAC;QAElE,MAAM,IAAI,GAA0B;YAClC,YAAY,CAAC,IAAI,EAAE,OAAO;gBACxB,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACrC,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;oBACpB,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;wBAC5C,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACpC,CAAC,EAAE,EAA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IAAI,CAAC,CAAC;gBAC1D,IAAI,CAAC,IAAI;oBAAE,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,wCAAwC,CAAC,CAAC;gBACzF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,eAAe,CAAC,KAAK,EAAE,CAAC;QACxB,IAAI,YAAY,EAAE,cAAc,EAAE,CAAC;YACjC,KAAK,MAAM,CAAC,IAAI,eAAe,EAAE,CAAC;gBAChC,YAAY,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACtC,CAAC;QACH,CAAC;QACD,IAAI,GAAG,IAAI,GAAG,CAAC,wBAAwB,EAAE,KAAK,KAAK,eAAe,EAAE,CAAC;YACnE,OAAO,GAAG,CAAC,wBAAwB,CAAC;QACtC,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,UAAU;QACV,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe;QACzC,YAAY;KACb,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@critical-path/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.20.0",
|
|
4
|
+
"description": "Model Context Protocol (MCP) server, client-side WebMCP tools and agent skills for Critical Path",
|
|
5
5
|
"author": "Jack James",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -29,17 +29,19 @@
|
|
|
29
29
|
"./web": {
|
|
30
30
|
"types": "./dist/web/index.d.ts",
|
|
31
31
|
"import": "./dist/web/index.js"
|
|
32
|
-
}
|
|
32
|
+
},
|
|
33
|
+
"./skills/*": "./skills/*"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
36
37
|
"zod": "^3.24.0",
|
|
37
38
|
"zod-to-json-schema": "^3.25.2",
|
|
38
|
-
"@critical-path/client": "0.25.
|
|
39
|
-
"@critical-path/core": "0.
|
|
39
|
+
"@critical-path/client": "0.25.2",
|
|
40
|
+
"@critical-path/core": "0.52.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
+
"@anthropic-ai/sdk": "^0.137.0",
|
|
44
|
+
"@types/node": "^26.6.5",
|
|
43
45
|
"typescript": "^5.7.0",
|
|
44
46
|
"vitest": "^3.0.0"
|
|
45
47
|
},
|
|
@@ -48,12 +50,15 @@
|
|
|
48
50
|
},
|
|
49
51
|
"files": [
|
|
50
52
|
"dist",
|
|
53
|
+
"skills",
|
|
51
54
|
"CHANGELOG.md",
|
|
52
55
|
"!dist/**/*.test.*"
|
|
53
56
|
],
|
|
54
57
|
"scripts": {
|
|
55
|
-
"build": "tsc --build",
|
|
58
|
+
"build": "node scripts/generate-skills.mjs && tsc --build",
|
|
56
59
|
"test": "vitest run",
|
|
57
|
-
"clean": "rm -rf dist *.tsbuildinfo"
|
|
60
|
+
"clean": "rm -rf dist *.tsbuildinfo",
|
|
61
|
+
"generate:skills": "node scripts/generate-skills.mjs",
|
|
62
|
+
"eval:tools": "node evals/tool-selection.mjs"
|
|
58
63
|
}
|
|
59
64
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analyze-schedule
|
|
3
|
+
description: Find what drives a project's end date, how much each task can slip and where people are double-booked, then recommend fixes. Use for "when will we finish?", "what is critical?" or deadline-risk questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Analyze the schedule
|
|
7
|
+
|
|
8
|
+
## 1. Run the schedule
|
|
9
|
+
|
|
10
|
+
1. Get the `projectId` (`list_projects`).
|
|
11
|
+
2. Call `calculate_critical_path` with `calendars: "assignee"` and `levelResources: true`, so each person works on one task at a time on their own calendar. If the user wants the ideal schedule with unlimited people, call it with no options instead.
|
|
12
|
+
3. If the question spans projects that share people, call `calculate_portfolio_critical_path` with their `projectIds` (and `projectOrder` if the user ranked them) instead.
|
|
13
|
+
4. For in-flight projects, pass `effort: "remaining"` so finished hours are not scheduled again.
|
|
14
|
+
|
|
15
|
+
## 2. Read the result
|
|
16
|
+
|
|
17
|
+
- `projectEndDate` is the forecast finish. With levelling, compare it with `unleveledProjectEndDate`: the gap is time lost waiting for busy people.
|
|
18
|
+
- `criticalTaskIds` are the tasks with zero or negative slack. Any delay to one of them moves the end date or misses a deadline.
|
|
19
|
+
- `missedDeadlineTaskIds` lists tasks forecast to finish after their `deadline`. Their `deadlineVarianceHours` says by how much (negative working hours), and the negative `totalSlack` on the tasks before them shows which work drives the miss. Entries with `isMilestone: true` are checkpoints such as releases or sign-offs.
|
|
20
|
+
- Each entry in `tasks` has `slackWorkingHours`: how many working hours the task can slip without moving the end. Under about 8 hours is near-critical.
|
|
21
|
+
- `levelingDelayHours` and `waitingOn` show a task that waited for its assignee to finish another task.
|
|
22
|
+
- `overallocations` lists periods where a person (`assigneeId`) or team (`teamId`) is booked above `capacity`; `allocation` 1.5 means 150%.
|
|
23
|
+
|
|
24
|
+
Look up titles for the task ids you mention with `get_task` or `list_tasks`; report titles, not ids. To see why a critical task cannot start earlier, call `get_task` with `includeDependencies: true`: `dependencies.dependsOn` lists what it waits for and `dependencies.dependents` what waits for it.
|
|
25
|
+
|
|
26
|
+
## 3. Recommend
|
|
27
|
+
|
|
28
|
+
Rank fixes by how much they pull the end date in:
|
|
29
|
+
|
|
30
|
+
1. **Unblock critical tasks.** A critical task with `isBlocked: true` delays everything; say what it waits for.
|
|
31
|
+
2. **Move work off the bottleneck person.** If critical tasks wait on one assignee (`waitingOn`), suggest reassigning a non-critical task of theirs.
|
|
32
|
+
3. **Remove false dependencies.** A critical task waiting on work it does not really need (`dependencies.dependsOn`) can start earlier once the link is removed.
|
|
33
|
+
4. **Split long critical tasks** so parts can run in parallel.
|
|
34
|
+
5. **Cut or defer** tasks feeding late deliverables, if dates are fixed.
|
|
35
|
+
|
|
36
|
+
Show the recommendation to the user. Change tasks (`update_task`) or dependencies (`add_dependency`, `remove_dependency`) only when they ask, then run the schedule again to show the effect.
|
|
37
|
+
|
|
38
|
+
## Report format
|
|
39
|
+
|
|
40
|
+
- Forecast finish date, and against any deadline the user gave. If the user gives a date that is not yet on a task, offer to record it as a `deadline` (on a milestone task with `isMilestone: true` if it is a checkpoint) so later runs track it.
|
|
41
|
+
- Each milestone: forecast date against its deadline.
|
|
42
|
+
- Critical path: task titles in order, with assignee.
|
|
43
|
+
- Top risks: near-critical tasks, blocked critical tasks, over-allocations.
|
|
44
|
+
- Recommended actions, each with its expected effect.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: investigate-task
|
|
3
|
+
description: Work out why a specific task is late, stalled or over budget and what it puts at risk. Use when the user asks about one task's status, delay or overrun.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Investigate a task
|
|
7
|
+
|
|
8
|
+
## 1. Identify the task
|
|
9
|
+
|
|
10
|
+
If the user named the task rather than giving its id, find it with `list_tasks` (filter by project, assignee or status) and confirm which one they mean if several match.
|
|
11
|
+
|
|
12
|
+
## 2. Gather evidence
|
|
13
|
+
|
|
14
|
+
1. `get_task` with `includeDependencies: true`: status, assignee, estimate, logged hours, due date, `isBlocked` and `blockedReason`, plus the tasks it waits for (`dependencies.dependsOn`, with their status) and the tasks waiting on it (`dependencies.dependents`).
|
|
15
|
+
2. `get_task_metrics`: progress and variance.
|
|
16
|
+
3. `get_task_ladder`: its phase (`macroPhase`) and that phase's health, and its schedule in `standard.cpm` (`isCritical`, `slackWorkingHours`).
|
|
17
|
+
4. `list_comments`: what people said about it, especially recent blockers or decisions.
|
|
18
|
+
|
|
19
|
+
## 3. Diagnose
|
|
20
|
+
|
|
21
|
+
Check these in order and stop at the ones that explain the problem:
|
|
22
|
+
|
|
23
|
+
| Signal | Meaning |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `isBlocked` true, an unfinished task in `dependencies.dependsOn`, or comments mention waiting | Blocked. Name what it waits for and its status; investigate that task the same way if it is late too. |
|
|
26
|
+
| `progressHistory.curveProfile` is `stalled` | No progress recently. Check whether the assignee moved to other work. |
|
|
27
|
+
| `realityDelta.isOverEstimate` true or `evm.costPerformanceIndex` below 0.9 | Taking more effort than estimated. The estimate was too low or scope grew. |
|
|
28
|
+
| `evm.schedulePerformanceIndex` below 0.9 or `realityDelta.isOverdue` | Behind schedule. Give `scheduleVarianceWorkingDays`. |
|
|
29
|
+
| No `estimatedHours` | Metrics cannot be trusted; say so and suggest adding an estimate. |
|
|
30
|
+
| `curveProfile` is `late_rush` | Most progress lands near the deadline; the remaining work may be underestimated. |
|
|
31
|
+
|
|
32
|
+
## 4. Assess the impact
|
|
33
|
+
|
|
34
|
+
- If the task is critical (`standard.cpm.isCritical`), every day it slips moves the project end. Say so plainly.
|
|
35
|
+
- List the tasks waiting on it (`dependencies.dependents`, by title); they slip with it.
|
|
36
|
+
- Otherwise, report how much slack it has left before it becomes critical.
|
|
37
|
+
- Name the phase or deliverable it endangers.
|
|
38
|
+
|
|
39
|
+
## 5. Answer
|
|
40
|
+
|
|
41
|
+
Lead with a one-sentence diagnosis, then the evidence (with numbers), the impact, and one to three concrete next steps (unblock, re-estimate, reassign, split). Change the task with `update_task` or record the finding with `add_comment` only if the user asks.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-capacity
|
|
3
|
+
description: Check who is overloaded or idle over a time window and rebalance assignments. Use for capacity planning, workload balancing or "can we take on more work?" questions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan capacity
|
|
7
|
+
|
|
8
|
+
## 1. Measure the load
|
|
9
|
+
|
|
10
|
+
1. Decide the window and grain with the user, defaulting to the next 8 weeks by `interval: "week"`.
|
|
11
|
+
2. Call `get_workload_distribution` with `groupBy: "assignee"`, `metric: "remaining"`, `startDate` and `endDate` (YYYY-MM-DD). Pass `projectId` for one project, or omit it for the whole workspace (people usually work across projects). Use `groupBy: "team"` for team-level questions.
|
|
12
|
+
3. If people do not work 40-hour weeks, pass `defaultWeeklyCapacityHours`.
|
|
13
|
+
|
|
14
|
+
## 2. Read it
|
|
15
|
+
|
|
16
|
+
- `seriesKeys` are the people (or teams); `seriesLabels` maps each to a display name.
|
|
17
|
+
- In each bucket, `values[key]` is booked hours and `capacity[key]` is available hours. Load = values / capacity.
|
|
18
|
+
- `utilizationRatio` above 1 is overloaded for the bucket as a whole; check each person too, since one overloaded person hides inside a team average.
|
|
19
|
+
- Treat above 1.0 as overloaded, 0.8-1.0 as full, below 0.5 as spare capacity.
|
|
20
|
+
- Work with no assignee (or team) appears under the key `unassigned`; it is demand nobody has picked up.
|
|
21
|
+
|
|
22
|
+
## 3. Find what to move
|
|
23
|
+
|
|
24
|
+
1. For each overloaded person and week, call `list_tasks` with their `assigneeId` to see the tasks behind it.
|
|
25
|
+
2. Call `calculate_critical_path` (with `calendars: "assignee"`) for the affected project to learn which of those tasks are critical. Move non-critical tasks first; they have slack.
|
|
26
|
+
3. Match each task with a person who has spare capacity in that window.
|
|
27
|
+
|
|
28
|
+
## 4. Propose
|
|
29
|
+
|
|
30
|
+
Give a table: task, from, to, hours moved, effect on both people's load. Note the remaining overload if it cannot be fully resolved, and the options (push dates, add people, cut scope).
|
|
31
|
+
|
|
32
|
+
Apply reassignments with `update_task` (`assigneeId`) only after the user approves, and record each one with `add_comment`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-project
|
|
3
|
+
description: Turn a goal, brief or feature list into a Critical Path project with deliverables, estimated and prioritized tasks, and the dependencies between them. Use when the user asks to plan, scope or break down work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan a project
|
|
7
|
+
|
|
8
|
+
Turn a goal into deliverables (dated outcomes), tasks (estimated units of work) and dependencies (which task waits for which) the scheduler can use.
|
|
9
|
+
|
|
10
|
+
## 1. Find or create the project
|
|
11
|
+
|
|
12
|
+
1. Call `list_projects`. If a project already matches the goal, use it and read it with `get_project` to learn its workflow status keys and custom fields.
|
|
13
|
+
2. Only if none fits, and the user wants a new one, call `create_project` with a `name` and a short `key`.
|
|
14
|
+
3. Call `list_tasks` with the `projectId` and `list_deliverables` to see what already exists. Do not recreate it.
|
|
15
|
+
|
|
16
|
+
## 2. Draft the plan before writing anything
|
|
17
|
+
|
|
18
|
+
Break the goal down in your reply first and show it to the user:
|
|
19
|
+
|
|
20
|
+
- **Deliverables**: 2-6 outcomes someone could accept or reject, each with a due date if the user gave one.
|
|
21
|
+
- **Milestones** for dated checkpoints (a release, a sign-off, a review): a task with `isMilestone: true`, a `deadline` if the date is fixed, and dependencies on the tasks that must finish first. The schedule then reports whether each date will be met.
|
|
22
|
+
- **Tasks** under each deliverable. Each task:
|
|
23
|
+
- starts with a verb and is small enough for one person (about 2-24 hours);
|
|
24
|
+
- has `estimatedHours` (effort, not elapsed time);
|
|
25
|
+
- has a `priority`: `urgent` only for work that blocks others now, `high` for the critical outcome, `medium` by default, `low` for nice-to-haves;
|
|
26
|
+
- lists the tasks it must wait for (its dependencies). Only add a dependency when the work truly cannot start earlier; every extra one lengthens the schedule.
|
|
27
|
+
- Note anything you assumed (team size, dates, scope) as a question.
|
|
28
|
+
|
|
29
|
+
Ask the user to confirm or adjust before creating anything. A plan is cheap to change in chat and tedious to change once created.
|
|
30
|
+
|
|
31
|
+
## 3. Create it
|
|
32
|
+
|
|
33
|
+
1. Create tasks with `create_task` (`projectId`, `title`, `description` with acceptance criteria, `estimatedHours`, `priority`, `assigneeId` if known). Leave `status` out so tasks start in the workflow's default status.
|
|
34
|
+
2. Create each deliverable with `create_deliverable`, passing the ids of its tasks in `taskIds`.
|
|
35
|
+
3. Add each dependency from your plan with `add_dependency`: `taskId` is the task that waits, `dependsOnTaskId` the task that must finish first. Use the ids `create_task` returned. If one is refused as circular, your plan has a loop: fix the order with the user instead of retrying.
|
|
36
|
+
4. If the project already had tasks, check what they wait for with `get_task` and `includeDependencies: true` before linking new work to them.
|
|
37
|
+
|
|
38
|
+
## 4. Check the result
|
|
39
|
+
|
|
40
|
+
1. Call `calculate_critical_path` for the project and report the forecast `projectEndDate` and the `criticalTaskIds` (by title). If every task is critical or the end date looks too early, a dependency is probably missing or reversed.
|
|
41
|
+
2. If the end date misses a deliverable's due date, or `missedDeadlineTaskIds` is not empty, say so and suggest what to cut, split or reassign. The `analyze-schedule` skill covers this in depth.
|
|
42
|
+
|
|
43
|
+
## Guardrails
|
|
44
|
+
|
|
45
|
+
- Never invent user ids for `assigneeId`. Leave tasks unassigned unless the user named the person and you have their id.
|
|
46
|
+
- Keep the plan to what the user asked for; propose extra work as suggestions, not tasks.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: report-status
|
|
3
|
+
description: Write a project status report covering progress, phase health, forecast finish, risks and blockers, backed by the schedule and metrics. Use when the user asks how a project is going or wants a status update.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Report project status
|
|
7
|
+
|
|
8
|
+
## 1. Collect the facts
|
|
9
|
+
|
|
10
|
+
1. Get the `projectId` (`list_projects`).
|
|
11
|
+
2. Call `get_timeline_ladder` with `level: "macro"`. It gives overall `health`, `overallProgressPercentage`, `projectedFinishDate`, task counts and `phases`, each with its own `health`, `progressPercentage` and `isCritical`.
|
|
12
|
+
3. Call `calculate_critical_path` (with `effort: "remaining"`) for the forecast `projectEndDate` and the `criticalTaskIds`.
|
|
13
|
+
4. Call `list_tasks` for blocked and urgent work: once with `priority: "urgent"` and scan the results (and the project's tasks) for `isBlocked: true`.
|
|
14
|
+
5. For each phase that is `at_risk`, `blocked` or `overdue`, pick its most important open tasks (critical ones first) and call `get_task_metrics` on up to 5 of them.
|
|
15
|
+
6. Call `list_deliverables` and compare each due date with the forecast.
|
|
16
|
+
|
|
17
|
+
## 2. Interpret
|
|
18
|
+
|
|
19
|
+
- Phase `health`: `on_track`, `at_risk`, `blocked`, `overdue` or `completed`.
|
|
20
|
+
- Task `evm`: `schedulePerformanceIndex` (SPI) below 0.9 means behind schedule; `costPerformanceIndex` (CPI) below 0.9 means more hours than the progress justifies.
|
|
21
|
+
- `realityDelta.isOverdue` and `scheduleVarianceWorkingDays` give lateness in working days.
|
|
22
|
+
- `progressHistory.curveProfile`: `stalled` needs attention now; `late_rush` suggests hidden risk near the due date.
|
|
23
|
+
|
|
24
|
+
## 3. Write the report
|
|
25
|
+
|
|
26
|
+
Keep it short and lead with the answer.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
**Status: <On track | At risk | Off track>**, <progress>% done, forecast finish <date> (<deadline comparison>).
|
|
30
|
+
|
|
31
|
+
**Phases**
|
|
32
|
+
- <phase>: <health>, <progress>% <one-line reason if not on track>
|
|
33
|
+
|
|
34
|
+
**Risks and blockers**
|
|
35
|
+
- <task title> (<assignee>): <what is wrong, with the number>, <what would fix it>
|
|
36
|
+
|
|
37
|
+
**Deliverables**
|
|
38
|
+
- <title>: due <date>, forecast <on time | late by N days>
|
|
39
|
+
|
|
40
|
+
**Next steps**
|
|
41
|
+
- <owner>: <action>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use task titles, not ids. Name a number for every claim (dates, percentages, hours). If data is missing (no estimates, no logged hours), say so: metrics without estimates are not meaningful.
|
|
45
|
+
|
|
46
|
+
Only post the report with `add_comment` if the user asks.
|