@agent-plan/core 0.2.19-next.2 → 0.2.19-next.20
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/dist/checklist.d.ts +16 -0
- package/dist/checklist.d.ts.map +1 -0
- package/dist/checklist.js +52 -0
- package/dist/display-status.d.ts +99 -0
- package/dist/display-status.d.ts.map +1 -0
- package/dist/display-status.js +176 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/naming.d.ts +21 -3
- package/dist/naming.d.ts.map +1 -1
- package/dist/naming.js +45 -3
- package/dist/plan-store.d.ts +157 -17
- package/dist/plan-store.d.ts.map +1 -1
- package/dist/plan-store.js +833 -172
- package/dist/recap.d.ts.map +1 -1
- package/dist/recap.js +35 -9
- package/dist/refs.d.ts +23 -0
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +81 -0
- package/dist/schema.d.ts +477 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +55 -4
- package/dist/task-context.d.ts +16 -0
- package/dist/task-context.d.ts.map +1 -0
- package/dist/task-context.js +48 -0
- package/package.json +4 -1
package/dist/schema.d.ts
CHANGED
|
@@ -133,6 +133,10 @@ export declare const ResumeFocusSchema: z.ZodObject<{
|
|
|
133
133
|
currentPhaseId: z.ZodDefault<z.ZodString>;
|
|
134
134
|
inProgressTaskIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
135
135
|
nextSteps: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
136
|
+
/** When `nextSteps` last changed (free-text can go stale; the recap surfaces
|
|
137
|
+
* this so staleness is visible). Preserved across refreshResume (which keeps
|
|
138
|
+
* existing nextSteps); bumped only when saveResume receives new nextSteps. */
|
|
139
|
+
nextStepsUpdatedAt: z.ZodDefault<z.ZodString>;
|
|
136
140
|
blockers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
137
141
|
notes: z.ZodDefault<z.ZodString>;
|
|
138
142
|
lastSessionSummary: z.ZodDefault<z.ZodString>;
|
|
@@ -142,6 +146,7 @@ export declare const ResumeFocusSchema: z.ZodObject<{
|
|
|
142
146
|
currentPhaseId: string;
|
|
143
147
|
inProgressTaskIds: string[];
|
|
144
148
|
nextSteps: string[];
|
|
149
|
+
nextStepsUpdatedAt: string;
|
|
145
150
|
blockers: string[];
|
|
146
151
|
notes: string;
|
|
147
152
|
lastSessionSummary: string;
|
|
@@ -151,6 +156,7 @@ export declare const ResumeFocusSchema: z.ZodObject<{
|
|
|
151
156
|
currentPhaseId?: string | undefined;
|
|
152
157
|
inProgressTaskIds?: string[] | undefined;
|
|
153
158
|
nextSteps?: string[] | undefined;
|
|
159
|
+
nextStepsUpdatedAt?: string | undefined;
|
|
154
160
|
blockers?: string[] | undefined;
|
|
155
161
|
notes?: string | undefined;
|
|
156
162
|
lastSessionSummary?: string | undefined;
|
|
@@ -314,6 +320,10 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
314
320
|
rationale?: string | undefined;
|
|
315
321
|
implementationNotes?: string | undefined;
|
|
316
322
|
}>, "many">>;
|
|
323
|
+
/** Monotonic global sequence counters — assigned at creation, never reused (gaps on delete). */
|
|
324
|
+
nextFeatureNumber: z.ZodDefault<z.ZodNumber>;
|
|
325
|
+
nextPhaseNumber: z.ZodDefault<z.ZodNumber>;
|
|
326
|
+
nextTaskNumber: z.ZodDefault<z.ZodNumber>;
|
|
317
327
|
}, "strip", z.ZodTypeAny, {
|
|
318
328
|
name: string;
|
|
319
329
|
goal: string;
|
|
@@ -340,6 +350,9 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
340
350
|
implementationNotes: string;
|
|
341
351
|
acceptedAt: string;
|
|
342
352
|
}[];
|
|
353
|
+
nextFeatureNumber: number;
|
|
354
|
+
nextPhaseNumber: number;
|
|
355
|
+
nextTaskNumber: number;
|
|
343
356
|
}, {
|
|
344
357
|
name: string;
|
|
345
358
|
workflowRules: {
|
|
@@ -366,6 +379,9 @@ export declare const ProjectSchema: z.ZodObject<{
|
|
|
366
379
|
rationale?: string | undefined;
|
|
367
380
|
implementationNotes?: string | undefined;
|
|
368
381
|
}[] | undefined;
|
|
382
|
+
nextFeatureNumber?: number | undefined;
|
|
383
|
+
nextPhaseNumber?: number | undefined;
|
|
384
|
+
nextTaskNumber?: number | undefined;
|
|
369
385
|
}>;
|
|
370
386
|
export declare const SubtaskStatusSchema: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
371
387
|
export declare const TaskStatusSchema: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
@@ -396,15 +412,21 @@ export declare const SubtaskSchema: z.ZodObject<{
|
|
|
396
412
|
}>;
|
|
397
413
|
export declare const ChecklistItemSchema: z.ZodObject<{
|
|
398
414
|
id: z.ZodString;
|
|
415
|
+
/** Per-task 1-based position, displayed as C{number} (C1, C2, ...). Default 0
|
|
416
|
+
* so legacy on-disk items without a number still parse; the TaskSchema
|
|
417
|
+
* transform overwrites it with the real index+1. */
|
|
418
|
+
number: z.ZodDefault<z.ZodNumber>;
|
|
399
419
|
title: z.ZodString;
|
|
400
420
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
401
421
|
}, "strip", z.ZodTypeAny, {
|
|
422
|
+
number: number;
|
|
402
423
|
id: string;
|
|
403
424
|
title: string;
|
|
404
425
|
checked: boolean;
|
|
405
426
|
}, {
|
|
406
427
|
id: string;
|
|
407
428
|
title: string;
|
|
429
|
+
number?: number | undefined;
|
|
408
430
|
checked?: boolean | undefined;
|
|
409
431
|
}>;
|
|
410
432
|
/** Status transitions that require a motivation note from the agent. */
|
|
@@ -438,9 +460,36 @@ export declare const StatusLogEntrySchema: z.ZodObject<{
|
|
|
438
460
|
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
439
461
|
description?: string | undefined;
|
|
440
462
|
}>;
|
|
463
|
+
/** Like StatusLogEntrySchema but for the DERIVED PHASE status, which includes
|
|
464
|
+
* the "draft" and "discovery" lifecycle states absent from TaskStatus. */
|
|
465
|
+
export declare const PhaseStatusLogEntrySchema: z.ZodObject<{
|
|
466
|
+
id: z.ZodString;
|
|
467
|
+
date: z.ZodString;
|
|
468
|
+
fromStatus: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
469
|
+
toStatus: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
470
|
+
title: z.ZodString;
|
|
471
|
+
description: z.ZodDefault<z.ZodString>;
|
|
472
|
+
}, "strip", z.ZodTypeAny, {
|
|
473
|
+
id: string;
|
|
474
|
+
date: string;
|
|
475
|
+
title: string;
|
|
476
|
+
description: string;
|
|
477
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
478
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
479
|
+
}, {
|
|
480
|
+
id: string;
|
|
481
|
+
date: string;
|
|
482
|
+
title: string;
|
|
483
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
484
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
485
|
+
description?: string | undefined;
|
|
486
|
+
}>;
|
|
441
487
|
export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
442
488
|
id: z.ZodString;
|
|
489
|
+
/** MUST be a phase UUID (not a ref like "P003"). Validated at the schema
|
|
490
|
+
* layer so no adapter can persist an unresolved ref string. */
|
|
443
491
|
phaseId: z.ZodString;
|
|
492
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
444
493
|
number: z.ZodDefault<z.ZodNumber>;
|
|
445
494
|
shortId: z.ZodDefault<z.ZodString>;
|
|
446
495
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -496,15 +545,21 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
496
545
|
}>, "many">>;
|
|
497
546
|
checklist: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
498
547
|
id: z.ZodString;
|
|
548
|
+
/** Per-task 1-based position, displayed as C{number} (C1, C2, ...). Default 0
|
|
549
|
+
* so legacy on-disk items without a number still parse; the TaskSchema
|
|
550
|
+
* transform overwrites it with the real index+1. */
|
|
551
|
+
number: z.ZodDefault<z.ZodNumber>;
|
|
499
552
|
title: z.ZodString;
|
|
500
553
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
501
554
|
}, "strip", z.ZodTypeAny, {
|
|
555
|
+
number: number;
|
|
502
556
|
id: string;
|
|
503
557
|
title: string;
|
|
504
558
|
checked: boolean;
|
|
505
559
|
}, {
|
|
506
560
|
id: string;
|
|
507
561
|
title: string;
|
|
562
|
+
number?: number | undefined;
|
|
508
563
|
checked?: boolean | undefined;
|
|
509
564
|
}>]>, "many">>;
|
|
510
565
|
subtasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -565,6 +620,7 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
565
620
|
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
566
621
|
}[];
|
|
567
622
|
checklist: (string | {
|
|
623
|
+
number: number;
|
|
568
624
|
id: string;
|
|
569
625
|
title: string;
|
|
570
626
|
checked: boolean;
|
|
@@ -613,6 +669,7 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
613
669
|
checklist?: (string | {
|
|
614
670
|
id: string;
|
|
615
671
|
title: string;
|
|
672
|
+
number?: number | undefined;
|
|
616
673
|
checked?: boolean | undefined;
|
|
617
674
|
})[] | undefined;
|
|
618
675
|
subtasks?: {
|
|
@@ -629,6 +686,7 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
629
686
|
}>, {
|
|
630
687
|
checklist: {
|
|
631
688
|
id: string;
|
|
689
|
+
number: number;
|
|
632
690
|
title: string;
|
|
633
691
|
checked: boolean;
|
|
634
692
|
}[];
|
|
@@ -705,6 +763,7 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
705
763
|
checklist?: (string | {
|
|
706
764
|
id: string;
|
|
707
765
|
title: string;
|
|
766
|
+
number?: number | undefined;
|
|
708
767
|
checked?: boolean | undefined;
|
|
709
768
|
})[] | undefined;
|
|
710
769
|
subtasks?: {
|
|
@@ -719,9 +778,28 @@ export declare const TaskSchema: z.ZodEffects<z.ZodObject<{
|
|
|
719
778
|
startedAt?: string | undefined;
|
|
720
779
|
completedAt?: string | undefined;
|
|
721
780
|
}>;
|
|
781
|
+
export declare const HandoffHistoryEntrySchema: z.ZodObject<{
|
|
782
|
+
/** Relative path under .planner/.local/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
783
|
+
file: z.ZodDefault<z.ZodString>;
|
|
784
|
+
clearedAt: z.ZodString;
|
|
785
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
786
|
+
reason: z.ZodDefault<z.ZodString>;
|
|
787
|
+
}, "strip", z.ZodTypeAny, {
|
|
788
|
+
file: string;
|
|
789
|
+
clearedAt: string;
|
|
790
|
+
reason: string;
|
|
791
|
+
}, {
|
|
792
|
+
clearedAt: string;
|
|
793
|
+
file?: string | undefined;
|
|
794
|
+
reason?: string | undefined;
|
|
795
|
+
}>;
|
|
722
796
|
export declare const PhaseSchema: z.ZodObject<{
|
|
723
797
|
id: z.ZodString;
|
|
798
|
+
/** MUST be a feature UUID (not a ref like "F005"). Validated at the schema
|
|
799
|
+
* layer so no adapter can persist an unresolved ref string. Optional only
|
|
800
|
+
* for legacy pre-feature phases. */
|
|
724
801
|
featureId: z.ZodOptional<z.ZodString>;
|
|
802
|
+
/** Global project-wide phase sequence (assigned once at creation from project.nextPhaseNumber; stable, gaps on delete). Bare P00x is unambiguous. */
|
|
725
803
|
number: z.ZodNumber;
|
|
726
804
|
shortId: z.ZodDefault<z.ZodString>;
|
|
727
805
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -766,7 +844,10 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
766
844
|
taskIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
767
845
|
tasks: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
768
846
|
id: z.ZodString;
|
|
847
|
+
/** MUST be a phase UUID (not a ref like "P003"). Validated at the schema
|
|
848
|
+
* layer so no adapter can persist an unresolved ref string. */
|
|
769
849
|
phaseId: z.ZodString;
|
|
850
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
770
851
|
number: z.ZodDefault<z.ZodNumber>;
|
|
771
852
|
shortId: z.ZodDefault<z.ZodString>;
|
|
772
853
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -822,15 +903,21 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
822
903
|
}>, "many">>;
|
|
823
904
|
checklist: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
824
905
|
id: z.ZodString;
|
|
906
|
+
/** Per-task 1-based position, displayed as C{number} (C1, C2, ...). Default 0
|
|
907
|
+
* so legacy on-disk items without a number still parse; the TaskSchema
|
|
908
|
+
* transform overwrites it with the real index+1. */
|
|
909
|
+
number: z.ZodDefault<z.ZodNumber>;
|
|
825
910
|
title: z.ZodString;
|
|
826
911
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
827
912
|
}, "strip", z.ZodTypeAny, {
|
|
913
|
+
number: number;
|
|
828
914
|
id: string;
|
|
829
915
|
title: string;
|
|
830
916
|
checked: boolean;
|
|
831
917
|
}, {
|
|
832
918
|
id: string;
|
|
833
919
|
title: string;
|
|
920
|
+
number?: number | undefined;
|
|
834
921
|
checked?: boolean | undefined;
|
|
835
922
|
}>]>, "many">>;
|
|
836
923
|
subtasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -891,6 +978,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
891
978
|
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
892
979
|
}[];
|
|
893
980
|
checklist: (string | {
|
|
981
|
+
number: number;
|
|
894
982
|
id: string;
|
|
895
983
|
title: string;
|
|
896
984
|
checked: boolean;
|
|
@@ -939,6 +1027,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
939
1027
|
checklist?: (string | {
|
|
940
1028
|
id: string;
|
|
941
1029
|
title: string;
|
|
1030
|
+
number?: number | undefined;
|
|
942
1031
|
checked?: boolean | undefined;
|
|
943
1032
|
})[] | undefined;
|
|
944
1033
|
subtasks?: {
|
|
@@ -955,6 +1044,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
955
1044
|
}>, {
|
|
956
1045
|
checklist: {
|
|
957
1046
|
id: string;
|
|
1047
|
+
number: number;
|
|
958
1048
|
title: string;
|
|
959
1049
|
checked: boolean;
|
|
960
1050
|
}[];
|
|
@@ -1031,6 +1121,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1031
1121
|
checklist?: (string | {
|
|
1032
1122
|
id: string;
|
|
1033
1123
|
title: string;
|
|
1124
|
+
number?: number | undefined;
|
|
1034
1125
|
checked?: boolean | undefined;
|
|
1035
1126
|
})[] | undefined;
|
|
1036
1127
|
subtasks?: {
|
|
@@ -1049,6 +1140,53 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1049
1140
|
updatedAt: z.ZodString;
|
|
1050
1141
|
handoff: z.ZodDefault<z.ZodString>;
|
|
1051
1142
|
handoffUpdatedAt: z.ZodDefault<z.ZodString>;
|
|
1143
|
+
/** When the handoff was last read/acknowledged on recap (ISO). Non-empty means
|
|
1144
|
+
* the agent has seen it; the recap won't re-prompt every turn. The handoff
|
|
1145
|
+
* content is KEPT until a task in the phase starts (auto-clear) or the phase
|
|
1146
|
+
* completes — so a restart between read and resume does not lose context. */
|
|
1147
|
+
handoffReadAt: z.ZodDefault<z.ZodString>;
|
|
1148
|
+
/** Metadata for recently-cleared handoffs (newest-first, capped at 5). The
|
|
1149
|
+
* full content lives as .md files in .planner/.local/handoff-archive/ (gitignored);
|
|
1150
|
+
* this array only holds the pointer + clear reason + timestamp, so the phase
|
|
1151
|
+
* JSON stays lean and the archive is recoverable. */
|
|
1152
|
+
handoffHistory: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1153
|
+
/** Relative path under .planner/.local/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
1154
|
+
file: z.ZodDefault<z.ZodString>;
|
|
1155
|
+
clearedAt: z.ZodString;
|
|
1156
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
1157
|
+
reason: z.ZodDefault<z.ZodString>;
|
|
1158
|
+
}, "strip", z.ZodTypeAny, {
|
|
1159
|
+
file: string;
|
|
1160
|
+
clearedAt: string;
|
|
1161
|
+
reason: string;
|
|
1162
|
+
}, {
|
|
1163
|
+
clearedAt: string;
|
|
1164
|
+
file?: string | undefined;
|
|
1165
|
+
reason?: string | undefined;
|
|
1166
|
+
}>, "many">>;
|
|
1167
|
+
/** Chronological audit trail of the DERIVED status (planned/in-progress/blocked/done/...). Appended ONLY when the derived status changes during a rollup; `status` itself is NOT persisted (still computed from child tasks at read time). Empty = no transition recorded yet (treated as "planned"). */
|
|
1168
|
+
statusLog: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1169
|
+
id: z.ZodString;
|
|
1170
|
+
date: z.ZodString;
|
|
1171
|
+
fromStatus: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1172
|
+
toStatus: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1173
|
+
title: z.ZodString;
|
|
1174
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1175
|
+
}, "strip", z.ZodTypeAny, {
|
|
1176
|
+
id: string;
|
|
1177
|
+
date: string;
|
|
1178
|
+
title: string;
|
|
1179
|
+
description: string;
|
|
1180
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1181
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1182
|
+
}, {
|
|
1183
|
+
id: string;
|
|
1184
|
+
date: string;
|
|
1185
|
+
title: string;
|
|
1186
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1187
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1188
|
+
description?: string | undefined;
|
|
1189
|
+
}>, "many">>;
|
|
1052
1190
|
}, "strip", z.ZodTypeAny, {
|
|
1053
1191
|
number: number;
|
|
1054
1192
|
dependencies: string[];
|
|
@@ -1070,6 +1208,14 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1070
1208
|
}[];
|
|
1071
1209
|
shortId: string;
|
|
1072
1210
|
priority: number;
|
|
1211
|
+
statusLog: {
|
|
1212
|
+
id: string;
|
|
1213
|
+
date: string;
|
|
1214
|
+
title: string;
|
|
1215
|
+
description: string;
|
|
1216
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1217
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1218
|
+
}[];
|
|
1073
1219
|
dependsOn: string[];
|
|
1074
1220
|
slug: string;
|
|
1075
1221
|
discussedAt: string;
|
|
@@ -1084,6 +1230,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1084
1230
|
tasks: {
|
|
1085
1231
|
checklist: {
|
|
1086
1232
|
id: string;
|
|
1233
|
+
number: number;
|
|
1087
1234
|
title: string;
|
|
1088
1235
|
checked: boolean;
|
|
1089
1236
|
}[];
|
|
@@ -1130,6 +1277,12 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1130
1277
|
}[];
|
|
1131
1278
|
handoff: string;
|
|
1132
1279
|
handoffUpdatedAt: string;
|
|
1280
|
+
handoffReadAt: string;
|
|
1281
|
+
handoffHistory: {
|
|
1282
|
+
file: string;
|
|
1283
|
+
clearedAt: string;
|
|
1284
|
+
reason: string;
|
|
1285
|
+
}[];
|
|
1133
1286
|
featureId?: string | undefined;
|
|
1134
1287
|
}, {
|
|
1135
1288
|
number: number;
|
|
@@ -1153,6 +1306,14 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1153
1306
|
}[] | undefined;
|
|
1154
1307
|
shortId?: string | undefined;
|
|
1155
1308
|
priority?: number | undefined;
|
|
1309
|
+
statusLog?: {
|
|
1310
|
+
id: string;
|
|
1311
|
+
date: string;
|
|
1312
|
+
title: string;
|
|
1313
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1314
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
1315
|
+
description?: string | undefined;
|
|
1316
|
+
}[] | undefined;
|
|
1156
1317
|
dependsOn?: string[] | undefined;
|
|
1157
1318
|
featureId?: string | undefined;
|
|
1158
1319
|
discussedAt?: string | undefined;
|
|
@@ -1197,6 +1358,7 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1197
1358
|
checklist?: (string | {
|
|
1198
1359
|
id: string;
|
|
1199
1360
|
title: string;
|
|
1361
|
+
number?: number | undefined;
|
|
1200
1362
|
checked?: boolean | undefined;
|
|
1201
1363
|
})[] | undefined;
|
|
1202
1364
|
subtasks?: {
|
|
@@ -1213,9 +1375,16 @@ export declare const PhaseSchema: z.ZodObject<{
|
|
|
1213
1375
|
}[] | undefined;
|
|
1214
1376
|
handoff?: string | undefined;
|
|
1215
1377
|
handoffUpdatedAt?: string | undefined;
|
|
1378
|
+
handoffReadAt?: string | undefined;
|
|
1379
|
+
handoffHistory?: {
|
|
1380
|
+
clearedAt: string;
|
|
1381
|
+
file?: string | undefined;
|
|
1382
|
+
reason?: string | undefined;
|
|
1383
|
+
}[] | undefined;
|
|
1216
1384
|
}>;
|
|
1217
1385
|
export declare const FeatureSchema: z.ZodObject<{
|
|
1218
1386
|
id: z.ZodString;
|
|
1387
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
1219
1388
|
number: z.ZodDefault<z.ZodNumber>;
|
|
1220
1389
|
shortId: z.ZodDefault<z.ZodString>;
|
|
1221
1390
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1252,6 +1421,29 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1252
1421
|
}>, "many">>;
|
|
1253
1422
|
phaseIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1254
1423
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1424
|
+
/** Chronological audit trail of the DERIVED status (computed from child phases at read time). Appended ONLY when the derived status changes during a rollup; `status` itself is NOT persisted. Empty = no transition recorded yet (treated as "planned"). */
|
|
1425
|
+
statusLog: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1426
|
+
id: z.ZodString;
|
|
1427
|
+
date: z.ZodString;
|
|
1428
|
+
fromStatus: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1429
|
+
toStatus: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1430
|
+
title: z.ZodString;
|
|
1431
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1432
|
+
}, "strip", z.ZodTypeAny, {
|
|
1433
|
+
id: string;
|
|
1434
|
+
date: string;
|
|
1435
|
+
title: string;
|
|
1436
|
+
description: string;
|
|
1437
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1438
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1439
|
+
}, {
|
|
1440
|
+
id: string;
|
|
1441
|
+
date: string;
|
|
1442
|
+
title: string;
|
|
1443
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1444
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1445
|
+
description?: string | undefined;
|
|
1446
|
+
}>, "many">>;
|
|
1255
1447
|
createdAt: z.ZodString;
|
|
1256
1448
|
updatedAt: z.ZodString;
|
|
1257
1449
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1271,6 +1463,14 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1271
1463
|
}[];
|
|
1272
1464
|
shortId: string;
|
|
1273
1465
|
priority: number;
|
|
1466
|
+
statusLog: {
|
|
1467
|
+
id: string;
|
|
1468
|
+
date: string;
|
|
1469
|
+
title: string;
|
|
1470
|
+
description: string;
|
|
1471
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1472
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1473
|
+
}[];
|
|
1274
1474
|
dependsOn: string[];
|
|
1275
1475
|
discussedAt: string;
|
|
1276
1476
|
contextReady: boolean;
|
|
@@ -1297,6 +1497,14 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1297
1497
|
}[] | undefined;
|
|
1298
1498
|
shortId?: string | undefined;
|
|
1299
1499
|
priority?: number | undefined;
|
|
1500
|
+
statusLog?: {
|
|
1501
|
+
id: string;
|
|
1502
|
+
date: string;
|
|
1503
|
+
title: string;
|
|
1504
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1505
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1506
|
+
description?: string | undefined;
|
|
1507
|
+
}[] | undefined;
|
|
1300
1508
|
dependsOn?: string[] | undefined;
|
|
1301
1509
|
discussedAt?: string | undefined;
|
|
1302
1510
|
contextReady?: boolean | undefined;
|
|
@@ -1310,6 +1518,7 @@ export declare const FeatureSchema: z.ZodObject<{
|
|
|
1310
1518
|
export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
1311
1519
|
features: z.ZodArray<z.ZodObject<{
|
|
1312
1520
|
id: z.ZodString;
|
|
1521
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
1313
1522
|
number: z.ZodDefault<z.ZodNumber>;
|
|
1314
1523
|
shortId: z.ZodDefault<z.ZodString>;
|
|
1315
1524
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1346,6 +1555,29 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1346
1555
|
}>, "many">>;
|
|
1347
1556
|
phaseIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1348
1557
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1558
|
+
/** Chronological audit trail of the DERIVED status (computed from child phases at read time). Appended ONLY when the derived status changes during a rollup; `status` itself is NOT persisted. Empty = no transition recorded yet (treated as "planned"). */
|
|
1559
|
+
statusLog: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1560
|
+
id: z.ZodString;
|
|
1561
|
+
date: z.ZodString;
|
|
1562
|
+
fromStatus: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1563
|
+
toStatus: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
1564
|
+
title: z.ZodString;
|
|
1565
|
+
description: z.ZodDefault<z.ZodString>;
|
|
1566
|
+
}, "strip", z.ZodTypeAny, {
|
|
1567
|
+
id: string;
|
|
1568
|
+
date: string;
|
|
1569
|
+
title: string;
|
|
1570
|
+
description: string;
|
|
1571
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1572
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1573
|
+
}, {
|
|
1574
|
+
id: string;
|
|
1575
|
+
date: string;
|
|
1576
|
+
title: string;
|
|
1577
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1578
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1579
|
+
description?: string | undefined;
|
|
1580
|
+
}>, "many">>;
|
|
1349
1581
|
createdAt: z.ZodString;
|
|
1350
1582
|
updatedAt: z.ZodString;
|
|
1351
1583
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1365,6 +1597,14 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1365
1597
|
}[];
|
|
1366
1598
|
shortId: string;
|
|
1367
1599
|
priority: number;
|
|
1600
|
+
statusLog: {
|
|
1601
|
+
id: string;
|
|
1602
|
+
date: string;
|
|
1603
|
+
title: string;
|
|
1604
|
+
description: string;
|
|
1605
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1606
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1607
|
+
}[];
|
|
1368
1608
|
dependsOn: string[];
|
|
1369
1609
|
discussedAt: string;
|
|
1370
1610
|
contextReady: boolean;
|
|
@@ -1391,6 +1631,14 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1391
1631
|
}[] | undefined;
|
|
1392
1632
|
shortId?: string | undefined;
|
|
1393
1633
|
priority?: number | undefined;
|
|
1634
|
+
statusLog?: {
|
|
1635
|
+
id: string;
|
|
1636
|
+
date: string;
|
|
1637
|
+
title: string;
|
|
1638
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1639
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1640
|
+
description?: string | undefined;
|
|
1641
|
+
}[] | undefined;
|
|
1394
1642
|
dependsOn?: string[] | undefined;
|
|
1395
1643
|
discussedAt?: string | undefined;
|
|
1396
1644
|
contextReady?: boolean | undefined;
|
|
@@ -1419,6 +1667,14 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1419
1667
|
}[];
|
|
1420
1668
|
shortId: string;
|
|
1421
1669
|
priority: number;
|
|
1670
|
+
statusLog: {
|
|
1671
|
+
id: string;
|
|
1672
|
+
date: string;
|
|
1673
|
+
title: string;
|
|
1674
|
+
description: string;
|
|
1675
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1676
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1677
|
+
}[];
|
|
1422
1678
|
dependsOn: string[];
|
|
1423
1679
|
discussedAt: string;
|
|
1424
1680
|
contextReady: boolean;
|
|
@@ -1447,6 +1703,14 @@ export declare const FeaturesDocumentSchema: z.ZodObject<{
|
|
|
1447
1703
|
}[] | undefined;
|
|
1448
1704
|
shortId?: string | undefined;
|
|
1449
1705
|
priority?: number | undefined;
|
|
1706
|
+
statusLog?: {
|
|
1707
|
+
id: string;
|
|
1708
|
+
date: string;
|
|
1709
|
+
title: string;
|
|
1710
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1711
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
1712
|
+
description?: string | undefined;
|
|
1713
|
+
}[] | undefined;
|
|
1450
1714
|
dependsOn?: string[] | undefined;
|
|
1451
1715
|
discussedAt?: string | undefined;
|
|
1452
1716
|
contextReady?: boolean | undefined;
|
|
@@ -1712,6 +1976,10 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1712
1976
|
rationale?: string | undefined;
|
|
1713
1977
|
implementationNotes?: string | undefined;
|
|
1714
1978
|
}>, "many">>;
|
|
1979
|
+
/** Monotonic global sequence counters — assigned at creation, never reused (gaps on delete). */
|
|
1980
|
+
nextFeatureNumber: z.ZodDefault<z.ZodNumber>;
|
|
1981
|
+
nextPhaseNumber: z.ZodDefault<z.ZodNumber>;
|
|
1982
|
+
nextTaskNumber: z.ZodDefault<z.ZodNumber>;
|
|
1715
1983
|
}, "strip", z.ZodTypeAny, {
|
|
1716
1984
|
name: string;
|
|
1717
1985
|
goal: string;
|
|
@@ -1738,6 +2006,9 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1738
2006
|
implementationNotes: string;
|
|
1739
2007
|
acceptedAt: string;
|
|
1740
2008
|
}[];
|
|
2009
|
+
nextFeatureNumber: number;
|
|
2010
|
+
nextPhaseNumber: number;
|
|
2011
|
+
nextTaskNumber: number;
|
|
1741
2012
|
}, {
|
|
1742
2013
|
name: string;
|
|
1743
2014
|
workflowRules: {
|
|
@@ -1764,10 +2035,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1764
2035
|
rationale?: string | undefined;
|
|
1765
2036
|
implementationNotes?: string | undefined;
|
|
1766
2037
|
}[] | undefined;
|
|
2038
|
+
nextFeatureNumber?: number | undefined;
|
|
2039
|
+
nextPhaseNumber?: number | undefined;
|
|
2040
|
+
nextTaskNumber?: number | undefined;
|
|
1767
2041
|
}>;
|
|
1768
2042
|
features: z.ZodObject<{
|
|
1769
2043
|
features: z.ZodArray<z.ZodObject<{
|
|
1770
2044
|
id: z.ZodString;
|
|
2045
|
+
/** Global project-wide feature sequence (assigned once at creation from project.nextFeatureNumber; stable, gaps on delete). */
|
|
1771
2046
|
number: z.ZodDefault<z.ZodNumber>;
|
|
1772
2047
|
shortId: z.ZodDefault<z.ZodString>;
|
|
1773
2048
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1804,6 +2079,29 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1804
2079
|
}>, "many">>;
|
|
1805
2080
|
phaseIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1806
2081
|
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2082
|
+
/** Chronological audit trail of the DERIVED status (computed from child phases at read time). Appended ONLY when the derived status changes during a rollup; `status` itself is NOT persisted. Empty = no transition recorded yet (treated as "planned"). */
|
|
2083
|
+
statusLog: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2084
|
+
id: z.ZodString;
|
|
2085
|
+
date: z.ZodString;
|
|
2086
|
+
fromStatus: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
2087
|
+
toStatus: z.ZodEnum<["planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
2088
|
+
title: z.ZodString;
|
|
2089
|
+
description: z.ZodDefault<z.ZodString>;
|
|
2090
|
+
}, "strip", z.ZodTypeAny, {
|
|
2091
|
+
id: string;
|
|
2092
|
+
date: string;
|
|
2093
|
+
title: string;
|
|
2094
|
+
description: string;
|
|
2095
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2096
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2097
|
+
}, {
|
|
2098
|
+
id: string;
|
|
2099
|
+
date: string;
|
|
2100
|
+
title: string;
|
|
2101
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2102
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2103
|
+
description?: string | undefined;
|
|
2104
|
+
}>, "many">>;
|
|
1807
2105
|
createdAt: z.ZodString;
|
|
1808
2106
|
updatedAt: z.ZodString;
|
|
1809
2107
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1823,6 +2121,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1823
2121
|
}[];
|
|
1824
2122
|
shortId: string;
|
|
1825
2123
|
priority: number;
|
|
2124
|
+
statusLog: {
|
|
2125
|
+
id: string;
|
|
2126
|
+
date: string;
|
|
2127
|
+
title: string;
|
|
2128
|
+
description: string;
|
|
2129
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2130
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2131
|
+
}[];
|
|
1826
2132
|
dependsOn: string[];
|
|
1827
2133
|
discussedAt: string;
|
|
1828
2134
|
contextReady: boolean;
|
|
@@ -1849,6 +2155,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1849
2155
|
}[] | undefined;
|
|
1850
2156
|
shortId?: string | undefined;
|
|
1851
2157
|
priority?: number | undefined;
|
|
2158
|
+
statusLog?: {
|
|
2159
|
+
id: string;
|
|
2160
|
+
date: string;
|
|
2161
|
+
title: string;
|
|
2162
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2163
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2164
|
+
description?: string | undefined;
|
|
2165
|
+
}[] | undefined;
|
|
1852
2166
|
dependsOn?: string[] | undefined;
|
|
1853
2167
|
discussedAt?: string | undefined;
|
|
1854
2168
|
contextReady?: boolean | undefined;
|
|
@@ -1877,6 +2191,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1877
2191
|
}[];
|
|
1878
2192
|
shortId: string;
|
|
1879
2193
|
priority: number;
|
|
2194
|
+
statusLog: {
|
|
2195
|
+
id: string;
|
|
2196
|
+
date: string;
|
|
2197
|
+
title: string;
|
|
2198
|
+
description: string;
|
|
2199
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2200
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2201
|
+
}[];
|
|
1880
2202
|
dependsOn: string[];
|
|
1881
2203
|
discussedAt: string;
|
|
1882
2204
|
contextReady: boolean;
|
|
@@ -1905,6 +2227,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
1905
2227
|
}[] | undefined;
|
|
1906
2228
|
shortId?: string | undefined;
|
|
1907
2229
|
priority?: number | undefined;
|
|
2230
|
+
statusLog?: {
|
|
2231
|
+
id: string;
|
|
2232
|
+
date: string;
|
|
2233
|
+
title: string;
|
|
2234
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2235
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2236
|
+
description?: string | undefined;
|
|
2237
|
+
}[] | undefined;
|
|
1908
2238
|
dependsOn?: string[] | undefined;
|
|
1909
2239
|
discussedAt?: string | undefined;
|
|
1910
2240
|
contextReady?: boolean | undefined;
|
|
@@ -2019,7 +2349,11 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2019
2349
|
}>;
|
|
2020
2350
|
phases: z.ZodArray<z.ZodObject<{
|
|
2021
2351
|
id: z.ZodString;
|
|
2352
|
+
/** MUST be a feature UUID (not a ref like "F005"). Validated at the schema
|
|
2353
|
+
* layer so no adapter can persist an unresolved ref string. Optional only
|
|
2354
|
+
* for legacy pre-feature phases. */
|
|
2022
2355
|
featureId: z.ZodOptional<z.ZodString>;
|
|
2356
|
+
/** Global project-wide phase sequence (assigned once at creation from project.nextPhaseNumber; stable, gaps on delete). Bare P00x is unambiguous. */
|
|
2023
2357
|
number: z.ZodNumber;
|
|
2024
2358
|
shortId: z.ZodDefault<z.ZodString>;
|
|
2025
2359
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2064,7 +2398,10 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2064
2398
|
taskIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
2065
2399
|
tasks: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
2066
2400
|
id: z.ZodString;
|
|
2401
|
+
/** MUST be a phase UUID (not a ref like "P003"). Validated at the schema
|
|
2402
|
+
* layer so no adapter can persist an unresolved ref string. */
|
|
2067
2403
|
phaseId: z.ZodString;
|
|
2404
|
+
/** Global project-wide task sequence (assigned once at creation from project.nextTaskNumber; stable, gaps on delete). Bare T00x is unambiguous. */
|
|
2068
2405
|
number: z.ZodDefault<z.ZodNumber>;
|
|
2069
2406
|
shortId: z.ZodDefault<z.ZodString>;
|
|
2070
2407
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2120,15 +2457,21 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2120
2457
|
}>, "many">>;
|
|
2121
2458
|
checklist: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
2122
2459
|
id: z.ZodString;
|
|
2460
|
+
/** Per-task 1-based position, displayed as C{number} (C1, C2, ...). Default 0
|
|
2461
|
+
* so legacy on-disk items without a number still parse; the TaskSchema
|
|
2462
|
+
* transform overwrites it with the real index+1. */
|
|
2463
|
+
number: z.ZodDefault<z.ZodNumber>;
|
|
2123
2464
|
title: z.ZodString;
|
|
2124
2465
|
checked: z.ZodDefault<z.ZodBoolean>;
|
|
2125
2466
|
}, "strip", z.ZodTypeAny, {
|
|
2467
|
+
number: number;
|
|
2126
2468
|
id: string;
|
|
2127
2469
|
title: string;
|
|
2128
2470
|
checked: boolean;
|
|
2129
2471
|
}, {
|
|
2130
2472
|
id: string;
|
|
2131
2473
|
title: string;
|
|
2474
|
+
number?: number | undefined;
|
|
2132
2475
|
checked?: boolean | undefined;
|
|
2133
2476
|
}>]>, "many">>;
|
|
2134
2477
|
subtasks: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -2189,6 +2532,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2189
2532
|
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2190
2533
|
}[];
|
|
2191
2534
|
checklist: (string | {
|
|
2535
|
+
number: number;
|
|
2192
2536
|
id: string;
|
|
2193
2537
|
title: string;
|
|
2194
2538
|
checked: boolean;
|
|
@@ -2237,6 +2581,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2237
2581
|
checklist?: (string | {
|
|
2238
2582
|
id: string;
|
|
2239
2583
|
title: string;
|
|
2584
|
+
number?: number | undefined;
|
|
2240
2585
|
checked?: boolean | undefined;
|
|
2241
2586
|
})[] | undefined;
|
|
2242
2587
|
subtasks?: {
|
|
@@ -2253,6 +2598,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2253
2598
|
}>, {
|
|
2254
2599
|
checklist: {
|
|
2255
2600
|
id: string;
|
|
2601
|
+
number: number;
|
|
2256
2602
|
title: string;
|
|
2257
2603
|
checked: boolean;
|
|
2258
2604
|
}[];
|
|
@@ -2329,6 +2675,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2329
2675
|
checklist?: (string | {
|
|
2330
2676
|
id: string;
|
|
2331
2677
|
title: string;
|
|
2678
|
+
number?: number | undefined;
|
|
2332
2679
|
checked?: boolean | undefined;
|
|
2333
2680
|
})[] | undefined;
|
|
2334
2681
|
subtasks?: {
|
|
@@ -2347,6 +2694,53 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2347
2694
|
updatedAt: z.ZodString;
|
|
2348
2695
|
handoff: z.ZodDefault<z.ZodString>;
|
|
2349
2696
|
handoffUpdatedAt: z.ZodDefault<z.ZodString>;
|
|
2697
|
+
/** When the handoff was last read/acknowledged on recap (ISO). Non-empty means
|
|
2698
|
+
* the agent has seen it; the recap won't re-prompt every turn. The handoff
|
|
2699
|
+
* content is KEPT until a task in the phase starts (auto-clear) or the phase
|
|
2700
|
+
* completes — so a restart between read and resume does not lose context. */
|
|
2701
|
+
handoffReadAt: z.ZodDefault<z.ZodString>;
|
|
2702
|
+
/** Metadata for recently-cleared handoffs (newest-first, capped at 5). The
|
|
2703
|
+
* full content lives as .md files in .planner/.local/handoff-archive/ (gitignored);
|
|
2704
|
+
* this array only holds the pointer + clear reason + timestamp, so the phase
|
|
2705
|
+
* JSON stays lean and the archive is recoverable. */
|
|
2706
|
+
handoffHistory: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2707
|
+
/** Relative path under .planner/.local/handoff-archive/ (e.g. <phaseId>-<ISO>.md). */
|
|
2708
|
+
file: z.ZodDefault<z.ZodString>;
|
|
2709
|
+
clearedAt: z.ZodString;
|
|
2710
|
+
/** Why the handoff was cleared: "task-started" | "phase-done" | "manual" | "superseded" | "imported". */
|
|
2711
|
+
reason: z.ZodDefault<z.ZodString>;
|
|
2712
|
+
}, "strip", z.ZodTypeAny, {
|
|
2713
|
+
file: string;
|
|
2714
|
+
clearedAt: string;
|
|
2715
|
+
reason: string;
|
|
2716
|
+
}, {
|
|
2717
|
+
clearedAt: string;
|
|
2718
|
+
file?: string | undefined;
|
|
2719
|
+
reason?: string | undefined;
|
|
2720
|
+
}>, "many">>;
|
|
2721
|
+
/** Chronological audit trail of the DERIVED status (planned/in-progress/blocked/done/...). Appended ONLY when the derived status changes during a rollup; `status` itself is NOT persisted (still computed from child tasks at read time). Empty = no transition recorded yet (treated as "planned"). */
|
|
2722
|
+
statusLog: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
2723
|
+
id: z.ZodString;
|
|
2724
|
+
date: z.ZodString;
|
|
2725
|
+
fromStatus: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
2726
|
+
toStatus: z.ZodEnum<["draft", "discovery", "planned", "in-progress", "done", "blocked", "canceled", "rejected", "deferred", "waiting"]>;
|
|
2727
|
+
title: z.ZodString;
|
|
2728
|
+
description: z.ZodDefault<z.ZodString>;
|
|
2729
|
+
}, "strip", z.ZodTypeAny, {
|
|
2730
|
+
id: string;
|
|
2731
|
+
date: string;
|
|
2732
|
+
title: string;
|
|
2733
|
+
description: string;
|
|
2734
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2735
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2736
|
+
}, {
|
|
2737
|
+
id: string;
|
|
2738
|
+
date: string;
|
|
2739
|
+
title: string;
|
|
2740
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2741
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2742
|
+
description?: string | undefined;
|
|
2743
|
+
}>, "many">>;
|
|
2350
2744
|
}, "strip", z.ZodTypeAny, {
|
|
2351
2745
|
number: number;
|
|
2352
2746
|
dependencies: string[];
|
|
@@ -2368,6 +2762,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2368
2762
|
}[];
|
|
2369
2763
|
shortId: string;
|
|
2370
2764
|
priority: number;
|
|
2765
|
+
statusLog: {
|
|
2766
|
+
id: string;
|
|
2767
|
+
date: string;
|
|
2768
|
+
title: string;
|
|
2769
|
+
description: string;
|
|
2770
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2771
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2772
|
+
}[];
|
|
2371
2773
|
dependsOn: string[];
|
|
2372
2774
|
slug: string;
|
|
2373
2775
|
discussedAt: string;
|
|
@@ -2382,6 +2784,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2382
2784
|
tasks: {
|
|
2383
2785
|
checklist: {
|
|
2384
2786
|
id: string;
|
|
2787
|
+
number: number;
|
|
2385
2788
|
title: string;
|
|
2386
2789
|
checked: boolean;
|
|
2387
2790
|
}[];
|
|
@@ -2428,6 +2831,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2428
2831
|
}[];
|
|
2429
2832
|
handoff: string;
|
|
2430
2833
|
handoffUpdatedAt: string;
|
|
2834
|
+
handoffReadAt: string;
|
|
2835
|
+
handoffHistory: {
|
|
2836
|
+
file: string;
|
|
2837
|
+
clearedAt: string;
|
|
2838
|
+
reason: string;
|
|
2839
|
+
}[];
|
|
2431
2840
|
featureId?: string | undefined;
|
|
2432
2841
|
}, {
|
|
2433
2842
|
number: number;
|
|
@@ -2451,6 +2860,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2451
2860
|
}[] | undefined;
|
|
2452
2861
|
shortId?: string | undefined;
|
|
2453
2862
|
priority?: number | undefined;
|
|
2863
|
+
statusLog?: {
|
|
2864
|
+
id: string;
|
|
2865
|
+
date: string;
|
|
2866
|
+
title: string;
|
|
2867
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2868
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
2869
|
+
description?: string | undefined;
|
|
2870
|
+
}[] | undefined;
|
|
2454
2871
|
dependsOn?: string[] | undefined;
|
|
2455
2872
|
featureId?: string | undefined;
|
|
2456
2873
|
discussedAt?: string | undefined;
|
|
@@ -2495,6 +2912,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2495
2912
|
checklist?: (string | {
|
|
2496
2913
|
id: string;
|
|
2497
2914
|
title: string;
|
|
2915
|
+
number?: number | undefined;
|
|
2498
2916
|
checked?: boolean | undefined;
|
|
2499
2917
|
})[] | undefined;
|
|
2500
2918
|
subtasks?: {
|
|
@@ -2511,6 +2929,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2511
2929
|
}[] | undefined;
|
|
2512
2930
|
handoff?: string | undefined;
|
|
2513
2931
|
handoffUpdatedAt?: string | undefined;
|
|
2932
|
+
handoffReadAt?: string | undefined;
|
|
2933
|
+
handoffHistory?: {
|
|
2934
|
+
clearedAt: string;
|
|
2935
|
+
file?: string | undefined;
|
|
2936
|
+
reason?: string | undefined;
|
|
2937
|
+
}[] | undefined;
|
|
2514
2938
|
}>, "many">;
|
|
2515
2939
|
}, "strip", z.ZodTypeAny, {
|
|
2516
2940
|
features: {
|
|
@@ -2531,6 +2955,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2531
2955
|
}[];
|
|
2532
2956
|
shortId: string;
|
|
2533
2957
|
priority: number;
|
|
2958
|
+
statusLog: {
|
|
2959
|
+
id: string;
|
|
2960
|
+
date: string;
|
|
2961
|
+
title: string;
|
|
2962
|
+
description: string;
|
|
2963
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2964
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
2965
|
+
}[];
|
|
2534
2966
|
dependsOn: string[];
|
|
2535
2967
|
discussedAt: string;
|
|
2536
2968
|
contextReady: boolean;
|
|
@@ -2594,6 +3026,9 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2594
3026
|
implementationNotes: string;
|
|
2595
3027
|
acceptedAt: string;
|
|
2596
3028
|
}[];
|
|
3029
|
+
nextFeatureNumber: number;
|
|
3030
|
+
nextPhaseNumber: number;
|
|
3031
|
+
nextTaskNumber: number;
|
|
2597
3032
|
};
|
|
2598
3033
|
phases: {
|
|
2599
3034
|
number: number;
|
|
@@ -2616,6 +3051,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2616
3051
|
}[];
|
|
2617
3052
|
shortId: string;
|
|
2618
3053
|
priority: number;
|
|
3054
|
+
statusLog: {
|
|
3055
|
+
id: string;
|
|
3056
|
+
date: string;
|
|
3057
|
+
title: string;
|
|
3058
|
+
description: string;
|
|
3059
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
3060
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
3061
|
+
}[];
|
|
2619
3062
|
dependsOn: string[];
|
|
2620
3063
|
slug: string;
|
|
2621
3064
|
discussedAt: string;
|
|
@@ -2630,6 +3073,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2630
3073
|
tasks: {
|
|
2631
3074
|
checklist: {
|
|
2632
3075
|
id: string;
|
|
3076
|
+
number: number;
|
|
2633
3077
|
title: string;
|
|
2634
3078
|
checked: boolean;
|
|
2635
3079
|
}[];
|
|
@@ -2676,6 +3120,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2676
3120
|
}[];
|
|
2677
3121
|
handoff: string;
|
|
2678
3122
|
handoffUpdatedAt: string;
|
|
3123
|
+
handoffReadAt: string;
|
|
3124
|
+
handoffHistory: {
|
|
3125
|
+
file: string;
|
|
3126
|
+
clearedAt: string;
|
|
3127
|
+
reason: string;
|
|
3128
|
+
}[];
|
|
2679
3129
|
featureId?: string | undefined;
|
|
2680
3130
|
}[];
|
|
2681
3131
|
}, {
|
|
@@ -2697,6 +3147,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2697
3147
|
}[] | undefined;
|
|
2698
3148
|
shortId?: string | undefined;
|
|
2699
3149
|
priority?: number | undefined;
|
|
3150
|
+
statusLog?: {
|
|
3151
|
+
id: string;
|
|
3152
|
+
date: string;
|
|
3153
|
+
title: string;
|
|
3154
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
3155
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting";
|
|
3156
|
+
description?: string | undefined;
|
|
3157
|
+
}[] | undefined;
|
|
2700
3158
|
dependsOn?: string[] | undefined;
|
|
2701
3159
|
discussedAt?: string | undefined;
|
|
2702
3160
|
contextReady?: boolean | undefined;
|
|
@@ -2760,6 +3218,9 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2760
3218
|
rationale?: string | undefined;
|
|
2761
3219
|
implementationNotes?: string | undefined;
|
|
2762
3220
|
}[] | undefined;
|
|
3221
|
+
nextFeatureNumber?: number | undefined;
|
|
3222
|
+
nextPhaseNumber?: number | undefined;
|
|
3223
|
+
nextTaskNumber?: number | undefined;
|
|
2763
3224
|
};
|
|
2764
3225
|
phases: {
|
|
2765
3226
|
number: number;
|
|
@@ -2783,6 +3244,14 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2783
3244
|
}[] | undefined;
|
|
2784
3245
|
shortId?: string | undefined;
|
|
2785
3246
|
priority?: number | undefined;
|
|
3247
|
+
statusLog?: {
|
|
3248
|
+
id: string;
|
|
3249
|
+
date: string;
|
|
3250
|
+
title: string;
|
|
3251
|
+
fromStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
3252
|
+
toStatus: "planned" | "in-progress" | "done" | "blocked" | "canceled" | "rejected" | "deferred" | "waiting" | "draft" | "discovery";
|
|
3253
|
+
description?: string | undefined;
|
|
3254
|
+
}[] | undefined;
|
|
2786
3255
|
dependsOn?: string[] | undefined;
|
|
2787
3256
|
featureId?: string | undefined;
|
|
2788
3257
|
discussedAt?: string | undefined;
|
|
@@ -2827,6 +3296,7 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2827
3296
|
checklist?: (string | {
|
|
2828
3297
|
id: string;
|
|
2829
3298
|
title: string;
|
|
3299
|
+
number?: number | undefined;
|
|
2830
3300
|
checked?: boolean | undefined;
|
|
2831
3301
|
})[] | undefined;
|
|
2832
3302
|
subtasks?: {
|
|
@@ -2843,6 +3313,12 @@ export declare const PlanWorkspaceSchema: z.ZodObject<{
|
|
|
2843
3313
|
}[] | undefined;
|
|
2844
3314
|
handoff?: string | undefined;
|
|
2845
3315
|
handoffUpdatedAt?: string | undefined;
|
|
3316
|
+
handoffReadAt?: string | undefined;
|
|
3317
|
+
handoffHistory?: {
|
|
3318
|
+
clearedAt: string;
|
|
3319
|
+
file?: string | undefined;
|
|
3320
|
+
reason?: string | undefined;
|
|
3321
|
+
}[] | undefined;
|
|
2846
3322
|
}[];
|
|
2847
3323
|
}>;
|
|
2848
3324
|
export type Timestamp = z.infer<typeof TimestampSchema>;
|
|
@@ -2870,6 +3346,7 @@ export type Project = z.infer<typeof ProjectSchema>;
|
|
|
2870
3346
|
export type Subtask = z.infer<typeof SubtaskSchema>;
|
|
2871
3347
|
export type ChecklistItem = z.infer<typeof ChecklistItemSchema>;
|
|
2872
3348
|
export type StatusLogEntry = z.infer<typeof StatusLogEntrySchema>;
|
|
3349
|
+
export type PhaseStatusLogEntry = z.infer<typeof PhaseStatusLogEntrySchema>;
|
|
2873
3350
|
export type Task = z.infer<typeof TaskSchema>;
|
|
2874
3351
|
export type Phase = z.infer<typeof PhaseSchema> & {
|
|
2875
3352
|
status: PhaseStatus;
|