@agent-plan/core 0.2.28 → 0.3.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.
Files changed (79) hide show
  1. package/dist/accepted-decision-guard.d.ts +94 -0
  2. package/dist/accepted-decision-guard.d.ts.map +1 -0
  3. package/dist/accepted-decision-guard.js +110 -0
  4. package/dist/checklist.d.ts +28 -0
  5. package/dist/checklist.d.ts.map +1 -1
  6. package/dist/checklist.js +59 -0
  7. package/dist/feature-delete.d.ts +62 -0
  8. package/dist/feature-delete.d.ts.map +1 -0
  9. package/dist/feature-delete.js +49 -0
  10. package/dist/guard-decision.d.ts +118 -0
  11. package/dist/guard-decision.d.ts.map +1 -0
  12. package/dist/guard-decision.js +203 -0
  13. package/dist/handoff-context.d.ts +130 -1
  14. package/dist/handoff-context.d.ts.map +1 -1
  15. package/dist/handoff-context.js +167 -9
  16. package/dist/handoff-reply.d.ts +108 -0
  17. package/dist/handoff-reply.d.ts.map +1 -0
  18. package/dist/handoff-reply.js +279 -0
  19. package/dist/index.d.ts +15 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +15 -1
  22. package/dist/mutation-reply.d.ts +105 -0
  23. package/dist/mutation-reply.d.ts.map +1 -0
  24. package/dist/mutation-reply.js +203 -0
  25. package/dist/naming.d.ts +1 -1
  26. package/dist/naming.d.ts.map +1 -1
  27. package/dist/naming.js +1 -1
  28. package/dist/pagination.d.ts +19 -0
  29. package/dist/pagination.d.ts.map +1 -0
  30. package/dist/pagination.js +15 -0
  31. package/dist/payload-fallback.js +1 -1
  32. package/dist/plan-store.d.ts +141 -8
  33. package/dist/plan-store.d.ts.map +1 -1
  34. package/dist/plan-store.js +459 -87
  35. package/dist/project-context-migration.d.ts +5 -0
  36. package/dist/project-context-migration.d.ts.map +1 -1
  37. package/dist/project-context-migration.js +13 -0
  38. package/dist/project-context.d.ts +395 -0
  39. package/dist/project-context.d.ts.map +1 -0
  40. package/dist/project-context.js +295 -0
  41. package/dist/recap.d.ts.map +1 -1
  42. package/dist/recap.js +27 -0
  43. package/dist/recommend-reply.d.ts +51 -0
  44. package/dist/recommend-reply.d.ts.map +1 -0
  45. package/dist/recommend-reply.js +84 -0
  46. package/dist/refs.d.ts +16 -0
  47. package/dist/refs.d.ts.map +1 -1
  48. package/dist/refs.js +38 -0
  49. package/dist/renderer.d.ts.map +1 -1
  50. package/dist/schema.d.ts +7 -2
  51. package/dist/schema.d.ts.map +1 -1
  52. package/dist/schema.js +8 -3
  53. package/dist/stranded-phase.d.ts +73 -0
  54. package/dist/stranded-phase.d.ts.map +1 -0
  55. package/dist/stranded-phase.js +93 -0
  56. package/dist/task-completion-gate.d.ts +84 -0
  57. package/dist/task-completion-gate.d.ts.map +1 -0
  58. package/dist/task-completion-gate.js +72 -0
  59. package/dist/task-context.d.ts +1 -0
  60. package/dist/task-context.d.ts.map +1 -1
  61. package/dist/task-context.js +31 -13
  62. package/dist/task-lifecycle.d.ts +12 -0
  63. package/dist/task-lifecycle.d.ts.map +1 -0
  64. package/dist/task-lifecycle.js +23 -0
  65. package/dist/task-order-context.d.ts +72 -0
  66. package/dist/task-order-context.d.ts.map +1 -0
  67. package/dist/task-order-context.js +82 -0
  68. package/dist/task-selection.d.ts.map +1 -1
  69. package/dist/task-selection.js +14 -12
  70. package/dist/task-start-outcome.d.ts +26 -0
  71. package/dist/task-start-outcome.d.ts.map +1 -1
  72. package/dist/task-start-outcome.js +23 -0
  73. package/dist/text-bounds.d.ts +32 -0
  74. package/dist/text-bounds.d.ts.map +1 -0
  75. package/dist/text-bounds.js +43 -0
  76. package/dist/write-coordination.d.ts +2 -2
  77. package/dist/write-coordination.js +2 -2
  78. package/package.json +1 -1
  79. package/planner-skill.md +30 -12
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,e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AAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC,GAAG;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAA;CAAE,CAAC"}
package/dist/schema.js CHANGED
@@ -183,13 +183,18 @@ export const STATUS_LOG_MOTIVATION_REQUIRED = new Set([
183
183
  ]);
184
184
  /**
185
185
  * Returns true when a status transition requires a written motivation.
186
- * - → DONE never requires motivation.
186
+ * - → DONE never requires motivation for an ordinary completion.
187
+ * - → DONE with `forced: true` — a completion pushed through past checklist
188
+ * items still open (see task-completion-gate.ts, P104(F005)/T428) — is the
189
+ * one case where a → DONE transition does require it: the same rule this
190
+ * function already enforces for blocked/canceled/deferred/rejected,
191
+ * applied to the one case where reaching DONE is itself an override.
187
192
  * - → BLOCKED / CANCELED / DEFERRED / REJECTED / WAITING always require it.
188
193
  * - → PLANNED from a non-PLANNED status requires it.
189
194
  */
190
- export function needsMotivation(fromStatus, toStatus) {
195
+ export function needsMotivation(fromStatus, toStatus, forced = false) {
191
196
  if (toStatus === "done")
192
- return false;
197
+ return forced;
193
198
  if (STATUS_LOG_MOTIVATION_REQUIRED.has(toStatus))
194
199
  return true;
195
200
  if (toStatus === "planned" && fromStatus !== "planned")
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Which in-progress phases still have work left, in priority order — the
3
+ * fact `planner-show` / `plan_get`, the planner-load recap, and `task_start`
4
+ * / `planner-task-start` were all missing.
5
+ *
6
+ * P104(F005)/T422: `task_switch` / `planner-task-switch` and `task_deviation`
7
+ * / `planner-task-deviation` both protect an *in-flight task* by
8
+ * checkpointing it with a return target. Neither helps when nothing was in
9
+ * flight — a phase's last started task simply finished (or one was never
10
+ * started) and the phase itself was left at status in-progress. Nothing
11
+ * else says "this phase is still open and has ready work" anywhere cheap to
12
+ * read, so it goes unnoticed while work continues in a lower-priority phase.
13
+ *
14
+ * This computes the fact once: every in-progress phase with work left,
15
+ * priority order, and — separately — how much of that work is actually
16
+ * startable right now (not blocked, not already claimed by an active task).
17
+ * `planner-show` / `plan_get` and the recap render the bounded listing;
18
+ * `task_start` uses the same computation to name the specific
19
+ * higher-priority phase a caller is about to leave open. Same shape as
20
+ * task-order-context.ts (T421): a fact placed at the decision point, not a
21
+ * reminder sentence.
22
+ *
23
+ * Placed in plan-core per AGENTS.md rule 4: both adapters render the
24
+ * identical listing and advisory from here.
25
+ */
26
+ import type { Feature, Phase } from "./schema.js";
27
+ /** Bound on how many phases the human-readable listing names before folding
28
+ * the rest into a count — a line per phase, not a phase dump (P104(F005)/T419). */
29
+ export declare const OPEN_PHASE_WORK_LIST_LIMIT = 5;
30
+ /** One in-progress phase with work left: enough to name it and say how much
31
+ * of that work is actually startable right now. */
32
+ export interface OpenPhaseWork {
33
+ phaseId: string;
34
+ ref: string;
35
+ title: string;
36
+ priority: number;
37
+ /** Tasks in this phase that are planned with every dependency done —
38
+ * startable now. Zero means the remaining work is blocked or already
39
+ * claimed by an active task, which is never itself a reason to switch
40
+ * here (see the recommender's own `ready` filter in task-selection.ts). */
41
+ readyTaskCount: number;
42
+ }
43
+ /**
44
+ * Every in-progress phase with at least one non-terminal task, in priority
45
+ * order. `readyTaskCount` mirrors the task-level half of task-selection.ts's
46
+ * `ready` filter plus its feature-level hard-unavailable check (a phase is
47
+ * never itself hard-unavailable here — it is already status in-progress).
48
+ */
49
+ export declare function listOpenPhaseWork(phases: Phase[], features: Feature[]): OpenPhaseWork[];
50
+ /** The list capped to `OPEN_PHASE_WORK_LIST_LIMIT` — what a structured
51
+ * payload should echo, so the structured field and the rendered text line
52
+ * count never diverge (one bound, shared, per P104(F005)/T419's discipline). */
53
+ export declare function boundedOpenPhaseWork(openPhases: OpenPhaseWork[]): OpenPhaseWork[];
54
+ /** Bounded human-readable rendering of `listOpenPhaseWork`'s result: one
55
+ * line per phase up to the limit, then a fold-in count for the rest. Empty
56
+ * array in, empty string out — callers decide whether to omit the section. */
57
+ export declare function openPhaseWorkLines(openPhases: OpenPhaseWork[]): string;
58
+ /**
59
+ * The single higher-priority open phase a caller starting `targetPhaseId`
60
+ * should be told about, or null when none applies. "Higher priority" means a
61
+ * strictly lower priority number than the target's own phase — a tie is not
62
+ * a reason to advise, since neither phase is more open than the other. Only
63
+ * phases with ready work (`readyTaskCount > 0`) qualify: a higher-priority
64
+ * phase whose remaining tasks are all blocked, or already claimed by its own
65
+ * active task, is not a reason to switch there (an explicit edge case this
66
+ * task called out).
67
+ */
68
+ export declare function findHigherPriorityOpenPhase(phases: Phase[], features: Feature[], targetPhaseId: string, targetPriority: number): OpenPhaseWork | null;
69
+ /** Non-blocking task-start advisory: same shape as the project-context
70
+ * staleness advisory (P102(F005)/T404) — informational, attached to a
71
+ * successful start, never a reason to deny it. */
72
+ export declare function higherPriorityOpenPhaseAdvisory(candidate: OpenPhaseWork | null): string;
73
+ //# sourceMappingURL=stranded-phase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stranded-phase.d.ts","sourceRoot":"","sources":["../src/stranded-phase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAoB,MAAM,aAAa,CAAC;AAMpE;mFACmF;AACnF,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAU5C;mDACmD;AACnD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB;;;+EAG2E;IAC3E,cAAc,EAAE,MAAM,CAAC;CACxB;AAOD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,aAAa,EAAE,CAyBvF;AAED;;gFAEgF;AAChF,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAEjF;AAED;;8EAE8E;AAC9E,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,MAAM,CAOtE;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,KAAK,EAAE,EACf,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,GACrB,aAAa,GAAG,IAAI,CAMtB;AAED;;kDAEkD;AAClD,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,GAAG,MAAM,CAGvF"}
@@ -0,0 +1,93 @@
1
+ import { featureNumberOfPhase, formatPhaseRef } from "./naming.js";
2
+ const TERMINAL_TASK_STATUSES = ["done", "canceled", "rejected"];
3
+ const HARD_UNAVAILABLE_STATUSES = new Set(["blocked", "deferred", "canceled", "rejected"]);
4
+ /** Bound on how many phases the human-readable listing names before folding
5
+ * the rest into a count — a line per phase, not a phase dump (P104(F005)/T419). */
6
+ export const OPEN_PHASE_WORK_LIST_LIMIT = 5;
7
+ function phasePriority(phase) {
8
+ return phase.priority ?? phase.number;
9
+ }
10
+ function compareByPhasePriority(left, right) {
11
+ return phasePriority(left) - phasePriority(right) || left.number - right.number;
12
+ }
13
+ function isReadyTask(task, statusById) {
14
+ if (task.status !== "planned")
15
+ return false;
16
+ return task.dependsOn.every((id) => statusById.get(id) === "done");
17
+ }
18
+ /**
19
+ * Every in-progress phase with at least one non-terminal task, in priority
20
+ * order. `readyTaskCount` mirrors the task-level half of task-selection.ts's
21
+ * `ready` filter plus its feature-level hard-unavailable check (a phase is
22
+ * never itself hard-unavailable here — it is already status in-progress).
23
+ */
24
+ export function listOpenPhaseWork(phases, features) {
25
+ const statusById = new Map();
26
+ for (const phase of phases) {
27
+ for (const task of phase.tasks ?? [])
28
+ statusById.set(task.id, task.status);
29
+ }
30
+ const featureById = new Map(features.map((feature) => [feature.id, feature]));
31
+ return phases
32
+ .filter((phase) => phase.status === "in-progress")
33
+ .filter((phase) => (phase.tasks ?? []).some((task) => !TERMINAL_TASK_STATUSES.includes(task.status)))
34
+ .sort(compareByPhasePriority)
35
+ .map((phase) => {
36
+ const feature = phase.featureId ? featureById.get(phase.featureId) : undefined;
37
+ const featureBlocked = feature ? HARD_UNAVAILABLE_STATUSES.has(feature.status) : false;
38
+ const readyTaskCount = featureBlocked
39
+ ? 0
40
+ : (phase.tasks ?? []).filter((task) => isReadyTask(task, statusById)).length;
41
+ return {
42
+ phaseId: phase.id,
43
+ ref: formatPhaseRef(phase.number, featureNumberOfPhase(phase, features)),
44
+ title: phase.title,
45
+ priority: phasePriority(phase),
46
+ readyTaskCount,
47
+ };
48
+ });
49
+ }
50
+ /** The list capped to `OPEN_PHASE_WORK_LIST_LIMIT` — what a structured
51
+ * payload should echo, so the structured field and the rendered text line
52
+ * count never diverge (one bound, shared, per P104(F005)/T419's discipline). */
53
+ export function boundedOpenPhaseWork(openPhases) {
54
+ return openPhases.slice(0, OPEN_PHASE_WORK_LIST_LIMIT);
55
+ }
56
+ /** Bounded human-readable rendering of `listOpenPhaseWork`'s result: one
57
+ * line per phase up to the limit, then a fold-in count for the rest. Empty
58
+ * array in, empty string out — callers decide whether to omit the section. */
59
+ export function openPhaseWorkLines(openPhases) {
60
+ if (openPhases.length === 0)
61
+ return "";
62
+ const shown = boundedOpenPhaseWork(openPhases);
63
+ const lines = shown.map((phase) => `- ${phase.ref} — ${phase.title} (priority ${phase.priority}; ${phase.readyTaskCount} ready)`);
64
+ const remaining = openPhases.length - shown.length;
65
+ if (remaining > 0)
66
+ lines.push(`- …and ${remaining} more in-progress phase(s) with work left.`);
67
+ return lines.join("\n");
68
+ }
69
+ /**
70
+ * The single higher-priority open phase a caller starting `targetPhaseId`
71
+ * should be told about, or null when none applies. "Higher priority" means a
72
+ * strictly lower priority number than the target's own phase — a tie is not
73
+ * a reason to advise, since neither phase is more open than the other. Only
74
+ * phases with ready work (`readyTaskCount > 0`) qualify: a higher-priority
75
+ * phase whose remaining tasks are all blocked, or already claimed by its own
76
+ * active task, is not a reason to switch there (an explicit edge case this
77
+ * task called out).
78
+ */
79
+ export function findHigherPriorityOpenPhase(phases, features, targetPhaseId, targetPriority) {
80
+ const higherPriority = listOpenPhaseWork(phases, features)
81
+ .filter((entry) => entry.phaseId !== targetPhaseId)
82
+ .filter((entry) => entry.readyTaskCount > 0)
83
+ .filter((entry) => entry.priority < targetPriority);
84
+ return higherPriority[0] ?? null;
85
+ }
86
+ /** Non-blocking task-start advisory: same shape as the project-context
87
+ * staleness advisory (P102(F005)/T404) — informational, attached to a
88
+ * successful start, never a reason to deny it. */
89
+ export function higherPriorityOpenPhaseAdvisory(candidate) {
90
+ if (!candidate)
91
+ return "";
92
+ return `\n\n⚠️ Phase-order advisory: ${candidate.ref} — ${candidate.title} is a higher-priority phase still in progress with ${candidate.readyTaskCount} ready task(s). This start is honored — the user may direct work anywhere — but ${candidate.ref} was not finished first.`;
93
+ }
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Whether a task may complete, given its checklist and a `force` override —
3
+ * the decision `planner-task-complete` (MCP) and `task_complete` (Pi) each
4
+ * re-implemented, with two different refusal messages, neither of which
5
+ * named the way to satisfy the gate.
6
+ *
7
+ * P104(F005)/T428: 26 tasks in this project are `done` with every checklist
8
+ * item still unticked — never some, always every one. The uniformity is the
9
+ * tell. An agent reported the mechanism directly: `task_complete` warned
10
+ * that items were open, and the only route the refusal named was
11
+ * `force=true`. Neither adapter's message mentioned
12
+ * `planner-task-checklist-toggle` / `task_checklist_toggle`, which is how an
13
+ * agent satisfies the gate rather than evades it. Handing over the escape
14
+ * hatch and never the way through is the same defect shape P104(F005)/T420
15
+ * fixed for task start: the denial was the documented path.
16
+ *
17
+ * So the refusal here leads with the toggle command, not `force`. Forcing
18
+ * remains possible — a task's checklist can stop matching the work it turned
19
+ * out to need — but it now costs a motivation (the same convention
20
+ * `needsMotivation` already applies to blocked/canceled/deferred/rejected/
21
+ * waiting, extended with its `forced` parameter rather than duplicated) and
22
+ * records exactly what it overrode.
23
+ *
24
+ * What this never does: tick an item for the caller. An unticked item after
25
+ * a forced completion is information — a step that was skipped, not one
26
+ * that was done — and overwriting that is precisely the mistake T413 fixed
27
+ * for checklist replacement. `overriddenItems` below is for the caller to
28
+ * *record*, never to check off.
29
+ *
30
+ * Placed in plan-core per AGENTS.md rule 4: both `planner-task-complete` and
31
+ * `task_complete` call this once and render its result, rather than each
32
+ * re-deciding it.
33
+ */
34
+ import type { ChecklistItem, TaskStatus } from "./schema.js";
35
+ export type TaskCompletionGateErrorCode = "CHECKLIST_INCOMPLETE" | "FORCE_MOTIVATION_REQUIRED";
36
+ export interface TaskCompletionGateDecision {
37
+ allowed: boolean;
38
+ errorCode?: TaskCompletionGateErrorCode;
39
+ /** Every checklist item still unchecked at the time of the decision. */
40
+ uncheckedItems: ChecklistItem[];
41
+ /** The unchecked items a forced completion is about to override. Empty
42
+ * unless `allowed` is true because of `force` — an ordinary completion
43
+ * with nothing open overrides nothing. Callers record these; they must
44
+ * never mark them checked (see module doc, and T413). */
45
+ overriddenItems: ChecklistItem[];
46
+ }
47
+ /**
48
+ * Decide whether `planner-task-complete` / `task_complete` may proceed.
49
+ * Pure: takes the task's own checklist plus the caller's `force` and
50
+ * `motivation` inputs, returns the decision and what a forced completion
51
+ * would override. No store access, no I/O — the adapter owns persisting
52
+ * whatever this approves.
53
+ */
54
+ export declare function evaluateTaskCompletionGate(checklist: readonly ChecklistItem[], force: boolean, motivation: string | undefined): TaskCompletionGateDecision;
55
+ /**
56
+ * The refusal an agent sees with open checklist items and no `force`. Leads
57
+ * with the way through — tick what was actually done — before naming the
58
+ * exception. `toggleCommandExample` is the adapter's own invocation shape
59
+ * (e.g. `planner-task-checklist-toggle <task> <item>` for MCP,
60
+ * `task_checklist_toggle` for Pi) so the message names a command the caller
61
+ * can run as written, not a tool name it has to guess the shape of.
62
+ */
63
+ export declare function taskCompletionChecklistRefusal(uncheckedItems: readonly ChecklistItem[], toggleCommandExample: string): string;
64
+ /** The refusal when `force=true` is given with open items but no motivation. */
65
+ export declare function taskCompletionForceMotivationRequired(uncheckedItems: readonly ChecklistItem[]): string;
66
+ /**
67
+ * The line appended to completion evidence and the status-log entry when a
68
+ * forced completion overrides open items — so the record of what was
69
+ * skipped survives independently of the checklist (which can itself be
70
+ * replaced later). Empty string when nothing was overridden.
71
+ */
72
+ export declare function taskCompletionOverrideNote(overriddenItems: readonly ChecklistItem[], motivation: string | undefined): string;
73
+ /**
74
+ * The fact a full task view must surface next to its status: a task
75
+ * recorded `done` while its checklist still has open items. This is exactly
76
+ * the contradiction a human reading the Web UI's generated markdown already
77
+ * sees directly (a `Status: done` line above unchecked boxes) — made
78
+ * legible here too, at the same read T421 already annotates with order
79
+ * context, rather than left for a reader to notice by comparing two fields
80
+ * themselves. Computed from live checklist state, not a stored flag, so it
81
+ * reflects reality even if items were ticked after a forced completion.
82
+ */
83
+ export declare function taskCompletionMismatchLine(status: TaskStatus, checklist: readonly ChecklistItem[]): string;
84
+ //# sourceMappingURL=task-completion-gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-completion-gate.d.ts","sourceRoot":"","sources":["../src/task-completion-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG7D,MAAM,MAAM,2BAA2B,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;AAE/F,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,2BAA2B,CAAC;IACxC,wEAAwE;IACxE,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC;;;6DAGyD;IACzD,eAAe,EAAE,aAAa,EAAE,CAAC;CAClC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,SAAS,aAAa,EAAE,EACnC,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,0BAA0B,CAY5B;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAAC,cAAc,EAAE,SAAS,aAAa,EAAE,EAAE,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAK7H;AAED,gFAAgF;AAChF,wBAAgB,qCAAqC,CAAC,cAAc,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAGtG;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,eAAe,EAAE,SAAS,aAAa,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAK5H;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,CAM1G"}
@@ -0,0 +1,72 @@
1
+ import { needsMotivation } from "./schema.js";
2
+ /**
3
+ * Decide whether `planner-task-complete` / `task_complete` may proceed.
4
+ * Pure: takes the task's own checklist plus the caller's `force` and
5
+ * `motivation` inputs, returns the decision and what a forced completion
6
+ * would override. No store access, no I/O — the adapter owns persisting
7
+ * whatever this approves.
8
+ */
9
+ export function evaluateTaskCompletionGate(checklist, force, motivation) {
10
+ const uncheckedItems = checklist.filter((item) => !item.checked);
11
+ if (uncheckedItems.length === 0) {
12
+ return { allowed: true, uncheckedItems, overriddenItems: [] };
13
+ }
14
+ if (!force) {
15
+ return { allowed: false, errorCode: "CHECKLIST_INCOMPLETE", uncheckedItems, overriddenItems: [] };
16
+ }
17
+ if (needsMotivation("in-progress", "done", true) && (!motivation || !motivation.trim())) {
18
+ return { allowed: false, errorCode: "FORCE_MOTIVATION_REQUIRED", uncheckedItems, overriddenItems: [] };
19
+ }
20
+ return { allowed: true, uncheckedItems, overriddenItems: uncheckedItems };
21
+ }
22
+ /**
23
+ * The refusal an agent sees with open checklist items and no `force`. Leads
24
+ * with the way through — tick what was actually done — before naming the
25
+ * exception. `toggleCommandExample` is the adapter's own invocation shape
26
+ * (e.g. `planner-task-checklist-toggle <task> <item>` for MCP,
27
+ * `task_checklist_toggle` for Pi) so the message names a command the caller
28
+ * can run as written, not a tool name it has to guess the shape of.
29
+ */
30
+ export function taskCompletionChecklistRefusal(uncheckedItems, toggleCommandExample) {
31
+ const titles = uncheckedItems.map((item) => item.title).join(", ");
32
+ return `${uncheckedItems.length} checklist item(s) not done: ${titles}. `
33
+ + `Tick the ones you actually completed with ${toggleCommandExample}, then retry. `
34
+ + `If the checklist itself no longer matches the work, complete with force=true and a "motivation" explaining why — the override is recorded, not silent.`;
35
+ }
36
+ /** The refusal when `force=true` is given with open items but no motivation. */
37
+ export function taskCompletionForceMotivationRequired(uncheckedItems) {
38
+ return `Forcing completion past ${uncheckedItems.length} unchecked checklist item(s) requires a motivation. `
39
+ + `Provide the "motivation" parameter explaining why the checklist no longer matches the work.`;
40
+ }
41
+ /**
42
+ * The line appended to completion evidence and the status-log entry when a
43
+ * forced completion overrides open items — so the record of what was
44
+ * skipped survives independently of the checklist (which can itself be
45
+ * replaced later). Empty string when nothing was overridden.
46
+ */
47
+ export function taskCompletionOverrideNote(overriddenItems, motivation) {
48
+ if (overriddenItems.length === 0)
49
+ return "";
50
+ const titles = overriddenItems.map((item) => item.title).join(", ");
51
+ const motivationLine = motivation?.trim() ? ` Motivation: ${motivation.trim()}` : "";
52
+ return `Forced completion overrode ${overriddenItems.length} unchecked checklist item(s): ${titles}.${motivationLine}`;
53
+ }
54
+ /**
55
+ * The fact a full task view must surface next to its status: a task
56
+ * recorded `done` while its checklist still has open items. This is exactly
57
+ * the contradiction a human reading the Web UI's generated markdown already
58
+ * sees directly (a `Status: done` line above unchecked boxes) — made
59
+ * legible here too, at the same read T421 already annotates with order
60
+ * context, rather than left for a reader to notice by comparing two fields
61
+ * themselves. Computed from live checklist state, not a stored flag, so it
62
+ * reflects reality even if items were ticked after a forced completion.
63
+ */
64
+ export function taskCompletionMismatchLine(status, checklist) {
65
+ if (status !== "done")
66
+ return "";
67
+ const uncheckedItems = checklist.filter((item) => !item.checked);
68
+ if (uncheckedItems.length === 0)
69
+ return "";
70
+ const titles = uncheckedItems.map((item) => item.title).join(", ");
71
+ return `⚠️ Marked done with ${uncheckedItems.length} of ${checklist.length} checklist item(s) still open: ${titles}.`;
72
+ }
@@ -15,6 +15,7 @@ export interface PhaseWorkMapEntry {
15
15
  }
16
16
  export interface PhaseWorkMap {
17
17
  content: string;
18
+ /** Mirrors `content`: holds exactly the entries whose rendered block was admitted. Use `total` for the full count. */
18
19
  entries: PhaseWorkMapEntry[];
19
20
  total: number;
20
21
  truncated: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"task-context.d.ts","sourceRoot":"","sources":["../src/task-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAGhG,eAAO,MAAM,mCAAmC,OAAQ,CAAC;AACzD,eAAO,MAAM,wBAAwB,OAAQ,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC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ACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,kBAAkB,GAAE,WAAW,EAAO,EACtC,mBAAmB,GAAE,WAAW,EAAO,EACvC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,mBAAmB,CAAC,EAC7C,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC,GAC3C,MAAM,CA0DR"}
@@ -1,4 +1,5 @@
1
1
  import { formatPhaseRef } from "./naming.js";
2
+ import { truncateAtSafeBoundary } from "./text-bounds.js";
2
3
  export const MAX_ACCEPTED_DECISION_CONTEXT_CHARS = 8_000;
3
4
  export const MAX_PHASE_WORK_MAP_CHARS = 8_000;
4
5
  function indentDecisionValue(value) {
@@ -38,9 +39,16 @@ export function buildBoundedAcceptedDecisionContext(scopes, maxChars = MAX_ACCEP
38
39
  : populated.map((scope) => renderAcceptedDecisionsSection(`Accepted decisions — ${scope.scope}`, scope.decisions)).join("\n\n");
39
40
  if (full.length <= maxChars)
40
41
  return { content: full, total, truncated: false, maxChars };
42
+ // Cut at a safe boundary (paragraph, then line, then word — see
43
+ // truncateAtSafeBoundary) rather than a raw slice, which previously cut
44
+ // mid-word exactly as the handoff path once did (P104(F005)/T419). The
45
+ // helper still returns something even when the first decision alone
46
+ // exceeds `limit`: it falls back to a hard cut only when no boundary
47
+ // exists before it.
41
48
  const suffix = "\n\n[Accepted Decision context truncated for transport safety. Use the relevant full entity read to retrieve every canonical field.]";
42
49
  const limit = Math.max(0, maxChars - suffix.length);
43
- return { content: `${full.slice(0, limit)}${suffix}`.slice(0, maxChars), total, truncated: true, maxChars };
50
+ const bounded = truncateAtSafeBoundary(full, limit);
51
+ return { content: `${bounded}${suffix}`.slice(0, maxChars), total, truncated: true, maxChars };
44
52
  }
45
53
  function conciseTaskGoal(task) {
46
54
  const source = task.description?.trim() || task.notes?.trim() || task.title;
@@ -67,27 +75,37 @@ export function buildPhaseWorkMap(phase, featureNumber, currentTaskId, maxChars
67
75
  current: task.id === currentTaskId,
68
76
  }));
69
77
  const header = `Phase work map — canonical sibling capability ownership (${entries.length}, priority order):`;
70
- const blocks = entries.map((entry) => [
71
- `- ${entry.ref}${entry.current ? " (current)" : ""} — ${entry.title} [priority ${entry.priority}; ${entry.status}]`,
72
- ` Goal: ${entry.conciseGoal}`,
73
- ` Depends on: ${entry.dependencies.length > 0 ? entry.dependencies.join(", ") : "None."}`,
74
- entry.remainingCapabilityOwner
75
- ? ` Ownership: ${entry.ref} owns this remaining capability; do not duplicate it in another task.`
76
- : " Ownership: no remaining capability ownership (terminal task).",
77
- ].join("\n"));
78
- const suffix = "[Phase work map truncated for transport safety. Read the canonical phase and task full views before proposing work; place deeper context under .planner/docs/.]";
78
+ const rendered = entries.map((entry) => ({
79
+ entry,
80
+ block: [
81
+ `- ${entry.ref}${entry.current ? " (current)" : ""} — ${entry.title} [priority ${entry.priority}; ${entry.status}]`,
82
+ ` Goal: ${entry.conciseGoal}`,
83
+ ` Depends on: ${entry.dependencies.length > 0 ? entry.dependencies.join(", ") : "None."}`,
84
+ entry.remainingCapabilityOwner
85
+ ? ` Ownership: ${entry.ref} owns this remaining capability; do not duplicate it in another task.`
86
+ : " Ownership: no remaining capability ownership (terminal task).",
87
+ ].join("\n"),
88
+ }));
89
+ const truncationNotice = (withheldCount) => `[Phase work map truncated for transport safety: ${withheldCount} lower-priority ${withheldCount === 1 ? "entry" : "entries"} withheld. Read the canonical phase and task full views before proposing work; place deeper context under .planner/docs/.]`;
90
+ // Reserve space using the full task count as the withheld-count placeholder: since the
91
+ // eventual withheld count can never exceed it, this reservation is always a safe upper
92
+ // bound on the final notice length, so shrinking it afterward cannot overflow maxChars.
93
+ const reservedSuffixLen = truncationNotice(entries.length).length;
79
94
  const included = [];
95
+ const admittedEntries = [];
80
96
  let truncated = false;
81
- for (const block of blocks) {
97
+ for (const { entry, block } of rendered) {
82
98
  const candidate = [header, ...included, block].join("\n");
83
- if (candidate.length + suffix.length + 1 > maxChars) {
99
+ if (candidate.length + reservedSuffixLen + 1 > maxChars) {
84
100
  truncated = true;
85
101
  break;
86
102
  }
87
103
  included.push(block);
104
+ admittedEntries.push(entry);
88
105
  }
106
+ const suffix = truncationNotice(entries.length - admittedEntries.length);
89
107
  const content = [header, ...included, ...(truncated ? [suffix] : [])].join("\n").slice(0, maxChars);
90
- return { content, entries, total: entries.length, truncated, maxChars };
108
+ return { content, entries: admittedEntries, total: entries.length, truncated, maxChars };
91
109
  }
92
110
  /**
93
111
  * Build a compact, agent-facing context block that surfaces the PARENT PHASE
@@ -0,0 +1,12 @@
1
+ import type { Task } from "./schema.js";
2
+ /**
3
+ * Apply the timestamp side effects of a task status transition: set
4
+ * `startedAt` the first time a task becomes in-progress, stamp
5
+ * `completedAt` on entering `done`, and clear `completedAt` when a task
6
+ * leaves `done` for any other status (reopening). Both adapters carried an
7
+ * identical copy of this decision for every status-changing tool (update,
8
+ * start, complete, reopen, switch). Mutates `task` in place, matching how
9
+ * every call site already used it (fetch, mutate, persist).
10
+ */
11
+ export declare function applyTaskLifecycleDates(task: Task, nextStatus: Task["status"], now: string): void;
12
+ //# sourceMappingURL=task-lifecycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-lifecycle.d.ts","sourceRoot":"","sources":["../src/task-lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAUjG"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Apply the timestamp side effects of a task status transition: set
3
+ * `startedAt` the first time a task becomes in-progress, stamp
4
+ * `completedAt` on entering `done`, and clear `completedAt` when a task
5
+ * leaves `done` for any other status (reopening). Both adapters carried an
6
+ * identical copy of this decision for every status-changing tool (update,
7
+ * start, complete, reopen, switch). Mutates `task` in place, matching how
8
+ * every call site already used it (fetch, mutate, persist).
9
+ */
10
+ export function applyTaskLifecycleDates(task, nextStatus, now) {
11
+ const previousStatus = task.status;
12
+ if (nextStatus === "in-progress" && !task.startedAt)
13
+ task.startedAt = now;
14
+ if (nextStatus === "done") {
15
+ if (!task.startedAt)
16
+ task.startedAt = now;
17
+ task.completedAt = now;
18
+ }
19
+ else if (previousStatus === "done") {
20
+ task.completedAt = "";
21
+ }
22
+ task.status = nextStatus;
23
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Where a single task sits in its phase's priority order — the fact
3
+ * `planner-task-show` / `task_get` (full view) was missing.
4
+ *
5
+ * P104(F005)/T421: `planner-task-list` already renders priority, and
6
+ * `.planner/SKILL.md` already says "follow the lowest visible ready
7
+ * priority", but the full task view showed neither the task's own priority
8
+ * nor its dependencies. An agent reading one task in full had no data to
9
+ * apply the rule with — it had to make a second call (task_recommend) or
10
+ * guess from prose. This puts the same ordering fact the recommender
11
+ * computes at the point an agent reads the task and decides what to do
12
+ * next, so asking again is unnecessary in the common case. Adding another
13
+ * reminder sentence was explicitly rejected: the rule already existed and
14
+ * did not prevent the failure this task was opened from.
15
+ *
16
+ * Readiness here mirrors only the task-level half of task-selection.ts's
17
+ * `ready` filter (status planned, every dependency done) — not the
18
+ * phase/feature hardUnavailable check, which is the global recommender's
19
+ * concern and not something a single task's own read needs to reevaluate.
20
+ *
21
+ * Placed in plan-core per AGENTS.md rule 4: both `planner-task-show` (MCP)
22
+ * and `task_get` (Pi) render the identical line and structured fields from
23
+ * here, the same way handoff-reply.ts / mutation-reply.ts / recommend-reply.ts
24
+ * already do for their tools.
25
+ */
26
+ import type { Feature, Phase, Task, TaskStatus } from "./schema.js";
27
+ /** One dependency, resolved to its composite ref and current status, so a
28
+ * caller can tell "blocked" from "done" without a second read per id. */
29
+ export interface TaskOrderDependency {
30
+ ref: string;
31
+ taskId: string;
32
+ status: TaskStatus;
33
+ }
34
+ export interface TaskOrderContext {
35
+ /** The task's own priority (falls back to its number, same convention as
36
+ * buildPhaseWorkMap / task-selection.ts, for a task with none explicitly set). */
37
+ priority: number;
38
+ /** False for a terminal task: ordering no longer applies, so the
39
+ * ready-count fields below are omitted rather than shown stale. */
40
+ ordersApply: boolean;
41
+ /** Sibling tasks in this task's own phase that are ready to start now:
42
+ * status planned, every dependency done. */
43
+ readyCount: number;
44
+ /** Ready siblings that come before this one in priority order. Zero for
45
+ * the first task in the phase, regardless of whether this task itself is ready. */
46
+ readyAheadCount: number;
47
+ /** Ref of the ready sibling that would be picked first, present only when
48
+ * it differs from this task — i.e. only when this task is not already the
49
+ * one to start next. */
50
+ nextByPriorityRef: string | null;
51
+ dependsOn: TaskOrderDependency[];
52
+ }
53
+ /**
54
+ * Build the ordering context for one task. `allPhases` and `features` are
55
+ * needed (not just the task's own phase) because a dependency can name a
56
+ * task in a different phase (see PlanStore.addTaskDependency, which allows
57
+ * any project-wide target) and its composite ref/status must resolve
58
+ * project-wide, not just among siblings.
59
+ */
60
+ export declare function buildTaskOrderContext(task: Task, phase: Phase, allPhases: Phase[], features: Feature[]): TaskOrderContext;
61
+ /** One line for the human-readable channel of the full task view: the exact
62
+ * shape both adapters render, so the fact is never assembled twice. Bounded
63
+ * by construction — a count, a priority number and a short dependency list,
64
+ * never the entities themselves. */
65
+ export declare function taskOrderContextLine(context: TaskOrderContext, status: TaskStatus): string;
66
+ /** The fact a task-creation confirmation must state: where in the phase's
67
+ * priority order the planner placed the new task. Centralized so the two
68
+ * otherwise differently-worded adapter confirmations never diverge on how
69
+ * this fragment reads (see P104(F005)/T421 — eight tasks were created in
70
+ * this phase without a priority ever being shown). */
71
+ export declare function taskCreatedPriorityFragment(priority: number): string;
72
+ //# sourceMappingURL=task-order-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-order-context.d.ts","sourceRoot":"","sources":["../src/task-order-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAKpE;yEACyE;AACzE,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B;sFACkF;IAClF,QAAQ,EAAE,MAAM,CAAC;IACjB;uEACmE;IACnE,WAAW,EAAE,OAAO,CAAC;IACrB;gDAC4C;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB;uFACmF;IACnF,eAAe,EAAE,MAAM,CAAC;IACxB;;4BAEwB;IACxB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,mBAAmB,EAAE,CAAC;CAClC;AAeD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,KAAK,EAAE,EAClB,QAAQ,EAAE,OAAO,EAAE,GAClB,gBAAgB,CAoClB;AAED;;;oCAGoC;AACpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,UAAU,GAAG,MAAM,CAc1F;AAED;;;;sDAIsD;AACtD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEpE"}