@popoverai/dotrequirements 0.24.2 → 0.25.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 (35) hide show
  1. package/README.md +7 -9
  2. package/dist/codebase-to-spec/cache.d.ts +6 -0
  3. package/dist/codebase-to-spec/cache.js +1 -0
  4. package/dist/codebase-to-spec/dispatch.d.ts +115 -0
  5. package/dist/codebase-to-spec/dispatch.js +850 -0
  6. package/dist/codebase-to-spec/pack.d.ts +7 -0
  7. package/dist/codebase-to-spec/pack.js +29 -8
  8. package/dist/codebase-to-spec/prompts/editor.d.ts +1 -1
  9. package/dist/codebase-to-spec/prompts/editor.js +1 -1
  10. package/dist/codebase-to-spec/prompts/specifier.d.ts +1 -1
  11. package/dist/codebase-to-spec/prompts/specifier.js +3 -2
  12. package/dist/codebase-to-spec/schemas.d.ts +528 -0
  13. package/dist/codebase-to-spec/schemas.js +244 -0
  14. package/dist/codebase-to-spec/skill-install.d.ts +41 -14
  15. package/dist/codebase-to-spec/skill-install.js +75 -26
  16. package/dist/commands/codebase-to-spec/compose-orchestrator.d.ts +14 -0
  17. package/dist/commands/codebase-to-spec/compose-orchestrator.js +54 -0
  18. package/dist/commands/codebase-to-spec/dispatch-context.d.ts +9 -0
  19. package/dist/commands/codebase-to-spec/dispatch-context.js +19 -0
  20. package/dist/commands/codebase-to-spec/dispatch-editor.d.ts +15 -0
  21. package/dist/commands/codebase-to-spec/dispatch-editor.js +70 -0
  22. package/dist/commands/codebase-to-spec/dispatch-planner.d.ts +18 -0
  23. package/dist/commands/codebase-to-spec/dispatch-planner.js +89 -0
  24. package/dist/commands/codebase-to-spec/dispatch-spec.d.ts +13 -0
  25. package/dist/commands/codebase-to-spec/dispatch-spec.js +56 -0
  26. package/dist/commands/codebase-to-spec/index.js +58 -2
  27. package/dist/commands/codebase-to-spec/pack.d.ts +5 -0
  28. package/dist/commands/codebase-to-spec/pack.js +6 -3
  29. package/dist/commands/codebase-to-spec/present-orchestrator.d.ts +20 -0
  30. package/dist/commands/codebase-to-spec/present-orchestrator.js +81 -0
  31. package/dist/commands/codebase-to-spec/skill-install.js +5 -1
  32. package/dist/templates/agents/cts-worker.md +9 -0
  33. package/dist/templates/skills/codebase-to-spec/SKILL.md +44 -77
  34. package/dist/templates/workflows/specify-codebase.js +372 -0
  35. package/package.json +2 -2
@@ -337,5 +337,533 @@ export declare const SPEC_REVIEW_JSON_SCHEMA: {
337
337
  readonly required: readonly ["coverage_gaps", "framing_errors", "cross_area_issues", "internal_mechanics_drift", "revisions", "verdict"];
338
338
  readonly additionalProperties: false;
339
339
  };
340
+ export declare const ConversationalCustomerSchema: z.ZodObject<{
341
+ description: z.ZodString;
342
+ }, "strip", z.ZodTypeAny, {
343
+ description: string;
344
+ }, {
345
+ description: string;
346
+ }>;
347
+ export type ConversationalCustomer = z.infer<typeof ConversationalCustomerSchema>;
348
+ /**
349
+ * One entry in the review thread (project-level or per-area). Discriminated
350
+ * on `result`:
351
+ *
352
+ * - `approved`: no revisions required.
353
+ * - `needs-revision`: must include a non-empty `revisions` list — each
354
+ * entry is a clear, actionable instruction for the next planner pass.
355
+ */
356
+ export declare const ConversationalReviewEntrySchema: z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
357
+ result: z.ZodLiteral<"approved">;
358
+ }, "strip", z.ZodTypeAny, {
359
+ result: "approved";
360
+ }, {
361
+ result: "approved";
362
+ }>, z.ZodObject<{
363
+ result: z.ZodLiteral<"needs-revision">;
364
+ revisions: z.ZodArray<z.ZodString, "many">;
365
+ }, "strip", z.ZodTypeAny, {
366
+ revisions: string[];
367
+ result: "needs-revision";
368
+ }, {
369
+ revisions: string[];
370
+ result: "needs-revision";
371
+ }>]>;
372
+ export type ConversationalReviewEntry = z.infer<typeof ConversationalReviewEntrySchema>;
373
+ /**
374
+ * Review state. Used both at the project level (outline.review) and per
375
+ * area (area.review). `result` mirrors the latest thread entry's result
376
+ * so callers can query state without walking the thread.
377
+ */
378
+ export declare const ConversationalReviewSchema: z.ZodObject<{
379
+ result: z.ZodEnum<["approved", "needs-revision"]>;
380
+ thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
381
+ result: z.ZodLiteral<"approved">;
382
+ }, "strip", z.ZodTypeAny, {
383
+ result: "approved";
384
+ }, {
385
+ result: "approved";
386
+ }>, z.ZodObject<{
387
+ result: z.ZodLiteral<"needs-revision">;
388
+ revisions: z.ZodArray<z.ZodString, "many">;
389
+ }, "strip", z.ZodTypeAny, {
390
+ revisions: string[];
391
+ result: "needs-revision";
392
+ }, {
393
+ revisions: string[];
394
+ result: "needs-revision";
395
+ }>]>, "many">;
396
+ }, "strip", z.ZodTypeAny, {
397
+ result: "approved" | "needs-revision";
398
+ thread: ({
399
+ result: "approved";
400
+ } | {
401
+ revisions: string[];
402
+ result: "needs-revision";
403
+ })[];
404
+ }, {
405
+ result: "approved" | "needs-revision";
406
+ thread: ({
407
+ result: "approved";
408
+ } | {
409
+ revisions: string[];
410
+ result: "needs-revision";
411
+ })[];
412
+ }>;
413
+ export type ConversationalReview = z.infer<typeof ConversationalReviewSchema>;
414
+ export declare const ConversationalAreaSchema: z.ZodObject<{
415
+ name: z.ZodString;
416
+ prefix: z.ZodString;
417
+ description: z.ZodString;
418
+ source_files: z.ZodArray<z.ZodString, "many">;
419
+ customers: z.ZodArray<z.ZodObject<{
420
+ description: z.ZodString;
421
+ }, "strip", z.ZodTypeAny, {
422
+ description: string;
423
+ }, {
424
+ description: string;
425
+ }>, "many">;
426
+ /**
427
+ * Per-area review state — same shape as the project-level review.
428
+ * Optional: planner output doesn't include it; CA adds it after reviewing
429
+ * a partial. Tracks the per-area iteration loop (specify → review →
430
+ * editor → re-review → approved) the same way `outline.review` tracks
431
+ * the outline iteration loop.
432
+ */
433
+ review: z.ZodOptional<z.ZodObject<{
434
+ result: z.ZodEnum<["approved", "needs-revision"]>;
435
+ thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
436
+ result: z.ZodLiteral<"approved">;
437
+ }, "strip", z.ZodTypeAny, {
438
+ result: "approved";
439
+ }, {
440
+ result: "approved";
441
+ }>, z.ZodObject<{
442
+ result: z.ZodLiteral<"needs-revision">;
443
+ revisions: z.ZodArray<z.ZodString, "many">;
444
+ }, "strip", z.ZodTypeAny, {
445
+ revisions: string[];
446
+ result: "needs-revision";
447
+ }, {
448
+ revisions: string[];
449
+ result: "needs-revision";
450
+ }>]>, "many">;
451
+ }, "strip", z.ZodTypeAny, {
452
+ result: "approved" | "needs-revision";
453
+ thread: ({
454
+ result: "approved";
455
+ } | {
456
+ revisions: string[];
457
+ result: "needs-revision";
458
+ })[];
459
+ }, {
460
+ result: "approved" | "needs-revision";
461
+ thread: ({
462
+ result: "approved";
463
+ } | {
464
+ revisions: string[];
465
+ result: "needs-revision";
466
+ })[];
467
+ }>>;
468
+ }, "strip", z.ZodTypeAny, {
469
+ prefix: string;
470
+ name: string;
471
+ description: string;
472
+ customers: {
473
+ description: string;
474
+ }[];
475
+ source_files: string[];
476
+ review?: {
477
+ result: "approved" | "needs-revision";
478
+ thread: ({
479
+ result: "approved";
480
+ } | {
481
+ revisions: string[];
482
+ result: "needs-revision";
483
+ })[];
484
+ } | undefined;
485
+ }, {
486
+ prefix: string;
487
+ name: string;
488
+ description: string;
489
+ customers: {
490
+ description: string;
491
+ }[];
492
+ source_files: string[];
493
+ review?: {
494
+ result: "approved" | "needs-revision";
495
+ thread: ({
496
+ result: "approved";
497
+ } | {
498
+ revisions: string[];
499
+ result: "needs-revision";
500
+ })[];
501
+ } | undefined;
502
+ }>;
503
+ export type ConversationalArea = z.infer<typeof ConversationalAreaSchema>;
504
+ export declare const ConversationalOutlineSchema: z.ZodObject<{
505
+ title: z.ZodString;
506
+ defaultPrefix: z.ZodString;
507
+ summary: z.ZodString;
508
+ /**
509
+ * Outline-approval review (the outline iteration loop). `compose-orchestrator`
510
+ * gates composition on `review.result === "approved"`, so this field is
511
+ * distinct from and must never be conflated with `crossAreaReview` below.
512
+ */
513
+ review: z.ZodOptional<z.ZodObject<{
514
+ result: z.ZodEnum<["approved", "needs-revision"]>;
515
+ thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
516
+ result: z.ZodLiteral<"approved">;
517
+ }, "strip", z.ZodTypeAny, {
518
+ result: "approved";
519
+ }, {
520
+ result: "approved";
521
+ }>, z.ZodObject<{
522
+ result: z.ZodLiteral<"needs-revision">;
523
+ revisions: z.ZodArray<z.ZodString, "many">;
524
+ }, "strip", z.ZodTypeAny, {
525
+ revisions: string[];
526
+ result: "needs-revision";
527
+ }, {
528
+ revisions: string[];
529
+ result: "needs-revision";
530
+ }>]>, "many">;
531
+ }, "strip", z.ZodTypeAny, {
532
+ result: "approved" | "needs-revision";
533
+ thread: ({
534
+ result: "approved";
535
+ } | {
536
+ revisions: string[];
537
+ result: "needs-revision";
538
+ })[];
539
+ }, {
540
+ result: "approved" | "needs-revision";
541
+ thread: ({
542
+ result: "approved";
543
+ } | {
544
+ revisions: string[];
545
+ result: "needs-revision";
546
+ })[];
547
+ }>>;
548
+ /**
549
+ * Document-level cross-area review state (CTSO-CONV-5). Recorded after the
550
+ * per-area partials are composed: the cross-area reviewer appends verdicts
551
+ * here and the compose-editor reads the latest entry's revisions — the same
552
+ * auditable thread pattern as `area.review`, kept at the top level because the
553
+ * review spans the whole composed spec rather than one area. Separate from
554
+ * `review` so cross-area iteration never disturbs outline approval.
555
+ */
556
+ crossAreaReview: z.ZodOptional<z.ZodObject<{
557
+ result: z.ZodEnum<["approved", "needs-revision"]>;
558
+ thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
559
+ result: z.ZodLiteral<"approved">;
560
+ }, "strip", z.ZodTypeAny, {
561
+ result: "approved";
562
+ }, {
563
+ result: "approved";
564
+ }>, z.ZodObject<{
565
+ result: z.ZodLiteral<"needs-revision">;
566
+ revisions: z.ZodArray<z.ZodString, "many">;
567
+ }, "strip", z.ZodTypeAny, {
568
+ revisions: string[];
569
+ result: "needs-revision";
570
+ }, {
571
+ revisions: string[];
572
+ result: "needs-revision";
573
+ }>]>, "many">;
574
+ }, "strip", z.ZodTypeAny, {
575
+ result: "approved" | "needs-revision";
576
+ thread: ({
577
+ result: "approved";
578
+ } | {
579
+ revisions: string[];
580
+ result: "needs-revision";
581
+ })[];
582
+ }, {
583
+ result: "approved" | "needs-revision";
584
+ thread: ({
585
+ result: "approved";
586
+ } | {
587
+ revisions: string[];
588
+ result: "needs-revision";
589
+ })[];
590
+ }>>;
591
+ areas: z.ZodArray<z.ZodObject<{
592
+ name: z.ZodString;
593
+ prefix: z.ZodString;
594
+ description: z.ZodString;
595
+ source_files: z.ZodArray<z.ZodString, "many">;
596
+ customers: z.ZodArray<z.ZodObject<{
597
+ description: z.ZodString;
598
+ }, "strip", z.ZodTypeAny, {
599
+ description: string;
600
+ }, {
601
+ description: string;
602
+ }>, "many">;
603
+ /**
604
+ * Per-area review state — same shape as the project-level review.
605
+ * Optional: planner output doesn't include it; CA adds it after reviewing
606
+ * a partial. Tracks the per-area iteration loop (specify → review →
607
+ * editor → re-review → approved) the same way `outline.review` tracks
608
+ * the outline iteration loop.
609
+ */
610
+ review: z.ZodOptional<z.ZodObject<{
611
+ result: z.ZodEnum<["approved", "needs-revision"]>;
612
+ thread: z.ZodArray<z.ZodDiscriminatedUnion<"result", [z.ZodObject<{
613
+ result: z.ZodLiteral<"approved">;
614
+ }, "strip", z.ZodTypeAny, {
615
+ result: "approved";
616
+ }, {
617
+ result: "approved";
618
+ }>, z.ZodObject<{
619
+ result: z.ZodLiteral<"needs-revision">;
620
+ revisions: z.ZodArray<z.ZodString, "many">;
621
+ }, "strip", z.ZodTypeAny, {
622
+ revisions: string[];
623
+ result: "needs-revision";
624
+ }, {
625
+ revisions: string[];
626
+ result: "needs-revision";
627
+ }>]>, "many">;
628
+ }, "strip", z.ZodTypeAny, {
629
+ result: "approved" | "needs-revision";
630
+ thread: ({
631
+ result: "approved";
632
+ } | {
633
+ revisions: string[];
634
+ result: "needs-revision";
635
+ })[];
636
+ }, {
637
+ result: "approved" | "needs-revision";
638
+ thread: ({
639
+ result: "approved";
640
+ } | {
641
+ revisions: string[];
642
+ result: "needs-revision";
643
+ })[];
644
+ }>>;
645
+ }, "strip", z.ZodTypeAny, {
646
+ prefix: string;
647
+ name: string;
648
+ description: string;
649
+ customers: {
650
+ description: string;
651
+ }[];
652
+ source_files: string[];
653
+ review?: {
654
+ result: "approved" | "needs-revision";
655
+ thread: ({
656
+ result: "approved";
657
+ } | {
658
+ revisions: string[];
659
+ result: "needs-revision";
660
+ })[];
661
+ } | undefined;
662
+ }, {
663
+ prefix: string;
664
+ name: string;
665
+ description: string;
666
+ customers: {
667
+ description: string;
668
+ }[];
669
+ source_files: string[];
670
+ review?: {
671
+ result: "approved" | "needs-revision";
672
+ thread: ({
673
+ result: "approved";
674
+ } | {
675
+ revisions: string[];
676
+ result: "needs-revision";
677
+ })[];
678
+ } | undefined;
679
+ }>, "many">;
680
+ }, "strip", z.ZodTypeAny, {
681
+ title: string;
682
+ defaultPrefix: string;
683
+ summary: string;
684
+ areas: {
685
+ prefix: string;
686
+ name: string;
687
+ description: string;
688
+ customers: {
689
+ description: string;
690
+ }[];
691
+ source_files: string[];
692
+ review?: {
693
+ result: "approved" | "needs-revision";
694
+ thread: ({
695
+ result: "approved";
696
+ } | {
697
+ revisions: string[];
698
+ result: "needs-revision";
699
+ })[];
700
+ } | undefined;
701
+ }[];
702
+ review?: {
703
+ result: "approved" | "needs-revision";
704
+ thread: ({
705
+ result: "approved";
706
+ } | {
707
+ revisions: string[];
708
+ result: "needs-revision";
709
+ })[];
710
+ } | undefined;
711
+ crossAreaReview?: {
712
+ result: "approved" | "needs-revision";
713
+ thread: ({
714
+ result: "approved";
715
+ } | {
716
+ revisions: string[];
717
+ result: "needs-revision";
718
+ })[];
719
+ } | undefined;
720
+ }, {
721
+ title: string;
722
+ defaultPrefix: string;
723
+ summary: string;
724
+ areas: {
725
+ prefix: string;
726
+ name: string;
727
+ description: string;
728
+ customers: {
729
+ description: string;
730
+ }[];
731
+ source_files: string[];
732
+ review?: {
733
+ result: "approved" | "needs-revision";
734
+ thread: ({
735
+ result: "approved";
736
+ } | {
737
+ revisions: string[];
738
+ result: "needs-revision";
739
+ })[];
740
+ } | undefined;
741
+ }[];
742
+ review?: {
743
+ result: "approved" | "needs-revision";
744
+ thread: ({
745
+ result: "approved";
746
+ } | {
747
+ revisions: string[];
748
+ result: "needs-revision";
749
+ })[];
750
+ } | undefined;
751
+ crossAreaReview?: {
752
+ result: "approved" | "needs-revision";
753
+ thread: ({
754
+ result: "approved";
755
+ } | {
756
+ revisions: string[];
757
+ result: "needs-revision";
758
+ })[];
759
+ } | undefined;
760
+ }>;
761
+ export type ConversationalOutline = z.infer<typeof ConversationalOutlineSchema>;
762
+ /**
763
+ * Parse YAML text against the conversational outline schema. Throws with
764
+ * a descriptive message on parse or validation failure.
765
+ */
766
+ export declare function parseConversationalOutline(text: string): ConversationalOutline;
767
+ /**
768
+ * Adapt a conversational orchestrator outline to the legacy Outline shape
769
+ * for use with stages that still take the legacy schema (compose, present).
770
+ *
771
+ * Discards orchestrator-only fields (review); maps `source_files` → `files`;
772
+ * bridges the customer-shape difference by synthesizing a `name` from each
773
+ * conversational customer's description.
774
+ */
775
+ export declare function conversationalOutlineToLegacy(outline: ConversationalOutline): Outline;
776
+ /**
777
+ * Serialize a conversational outline back to YAML text. Uses literal-block
778
+ * multi-line strings (`|`) where possible for readability.
779
+ */
780
+ export declare function stringifyConversationalOutline(outline: ConversationalOutline): string;
781
+ /**
782
+ * Result a specifier or editor worker returns to the workflow after writing
783
+ * (or skipping) an area's partial.
784
+ *
785
+ * - `drafted`: the worker composed and wrote the partial this run.
786
+ * - `skipped-resume`: a non-empty partial already existed, so the worker left
787
+ * it in place (idempotent re-entry — see CTSO-INTEG-2).
788
+ */
789
+ export declare const PartialResultStatusValues: readonly ["drafted", "skipped-resume"];
790
+ export type PartialResultStatus = (typeof PartialResultStatusValues)[number];
791
+ export declare const PartialResultSchema: z.ZodObject<{
792
+ area_prefix: z.ZodString;
793
+ partial_path: z.ZodString;
794
+ status: z.ZodEnum<["drafted", "skipped-resume"]>;
795
+ requirement_count: z.ZodOptional<z.ZodNumber>;
796
+ }, "strip", z.ZodTypeAny, {
797
+ status: "drafted" | "skipped-resume";
798
+ area_prefix: string;
799
+ partial_path: string;
800
+ requirement_count?: number | undefined;
801
+ }, {
802
+ status: "drafted" | "skipped-resume";
803
+ area_prefix: string;
804
+ partial_path: string;
805
+ requirement_count?: number | undefined;
806
+ }>;
807
+ export type PartialResult = z.infer<typeof PartialResultSchema>;
808
+ export declare const PARTIAL_RESULT_JSON_SCHEMA: {
809
+ readonly type: "object";
810
+ readonly properties: {
811
+ readonly area_prefix: {
812
+ readonly type: "string";
813
+ };
814
+ readonly partial_path: {
815
+ readonly type: "string";
816
+ };
817
+ readonly status: {
818
+ readonly type: "string";
819
+ readonly enum: readonly string[];
820
+ };
821
+ readonly requirement_count: {
822
+ readonly type: "integer";
823
+ readonly minimum: 0;
824
+ };
825
+ };
826
+ readonly required: readonly ["area_prefix", "partial_path", "status"];
827
+ readonly additionalProperties: false;
828
+ };
829
+ /**
830
+ * Verdict a reviewer worker returns to the workflow. Same shape as one
831
+ * `ConversationalReviewEntry` (discriminated on `result`): `approved` carries
832
+ * no revisions; `needs-revision` must carry a non-empty `revisions` list. This
833
+ * verdict drives the per-area convergence loop (CTSO-CONV-4).
834
+ *
835
+ * The JSON Schema form is flat (result + optional revisions) — JSON Schema
836
+ * can't express the discriminated-union constraint as cleanly as Zod. The
837
+ * runtime retries on mismatch, the prompt instructs the reviewer to include
838
+ * revisions exactly when the result is needs-revision, and `parseReviewVerdict`
839
+ * enforces the stricter Zod constraint on the CLI side.
840
+ */
841
+ export declare const REVIEW_VERDICT_JSON_SCHEMA: {
842
+ readonly type: "object";
843
+ readonly properties: {
844
+ readonly result: {
845
+ readonly type: "string";
846
+ readonly enum: readonly ["approved", "needs-revision"];
847
+ };
848
+ readonly revisions: {
849
+ readonly type: "array";
850
+ readonly items: {
851
+ readonly type: "string";
852
+ };
853
+ };
854
+ };
855
+ readonly required: readonly ["result"];
856
+ readonly additionalProperties: false;
857
+ };
858
+ /**
859
+ * Parse + validate a specifier/editor worker's JSON result.
860
+ */
861
+ export declare function parsePartialResult(text: string): PartialResult;
862
+ /**
863
+ * Parse + validate a reviewer worker's JSON verdict. Reuses
864
+ * `ConversationalReviewEntrySchema`, so a `needs-revision` verdict requires a
865
+ * non-empty `revisions` list.
866
+ */
867
+ export declare function parseReviewVerdict(text: string): ConversationalReviewEntry;
340
868
  export declare function parseSpecReview(text: string): SpecReview;
341
869
  //# sourceMappingURL=schemas.d.ts.map