@llm-dev-ops/agentics-cli 2.7.16 → 2.7.18

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.
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Phase 7 — Consulting Deliverables Coordinator (ADR-PIPELINE-098 D1, D5–D9).
3
+ *
4
+ * Walks the 85-row deliverables registry and, for each row:
5
+ * 1. If `mirrorsExisting` is set → symlink (POSIX) or copy (Windows /
6
+ * AGENTICS_PHASE7_MIRROR=copy) the pre-existing top-level doc into the
7
+ * sectioned subdir; record `status: 'emitted'`.
8
+ * 2. Otherwise → load `inputArtifacts` from disk into a Record<path,string>,
9
+ * build a Ruflo task (templateId + inputs + consensus banner + fcv block
10
+ * from `unit-economics.json`), dispatch through the existing
11
+ * `executeRufloPhaseSwarm` path used by Phase 5/6, then render the
12
+ * response through `template-renderer.renderTemplate` and write to
13
+ * `<runDir>/deliverables/<NN-section>/<slug>.<format>`.
14
+ * 3. On failure → emit a skeleton file with frontmatter
15
+ * `degraded_mode: generation-failed` + `failure_reason` + the available /
16
+ * missing inputs + the consensus banner + the fcv block. The phase keeps
17
+ * going; status drops to `partial`.
18
+ *
19
+ * After every row is processed the coordinator writes a markdown index.md and
20
+ * a machine-readable `phase7-manifest.json` (D9.a schema), then runs the
21
+ * coherence gate. Any coherence violation drops the phase status to
22
+ * `partial`.
23
+ *
24
+ * Phase 1 input gate (D1 / ADR-094 D4):
25
+ * If `<runDir>/manifest.json` does NOT exist, the coordinator fans out
26
+ * nothing and returns `status: 'skipped-due-to-upstream'` with reason
27
+ * `phase1-inputs-missing`. The caller in `auto-chain.ts` still pushes a
28
+ * `phases[]` entry per ADR-094 D4.
29
+ *
30
+ * Hard contracts:
31
+ * - Never throws. All failures collapse into `Phase7Result.status` +
32
+ * per-row entries in the manifest.
33
+ * - Pure I/O at the boundary; no globals, no module-level state.
34
+ * - Templates dir + registry file + coherence-gate file are owned by other
35
+ * agents working in parallel; this file imports them without modifying.
36
+ */
37
+ import { type CoherenceViolation } from './coherence-gate.js';
38
+ export type DeliverableStatus = 'emitted' | 'skeleton' | 'failed';
39
+ export type Phase7Status = 'completed' | 'partial' | 'failed' | 'skipped-due-to-upstream';
40
+ export interface DeliverableManifestEntry {
41
+ readonly section: number;
42
+ readonly slug: string;
43
+ readonly status: DeliverableStatus;
44
+ readonly input_artifacts_used: ReadonlyArray<string>;
45
+ readonly input_artifacts_missing: ReadonlyArray<string>;
46
+ readonly source_agents_called: ReadonlyArray<string>;
47
+ readonly fcv_kinds_emitted: ReadonlyArray<string>;
48
+ readonly timing_ms: number;
49
+ readonly output_path: string;
50
+ readonly failure_reason?: string;
51
+ }
52
+ export interface Phase7Manifest {
53
+ readonly phase: 7;
54
+ readonly trace_id: string;
55
+ readonly started_at: string;
56
+ readonly completed_at: string;
57
+ readonly total_timing_ms: number;
58
+ readonly deliverables_total: number;
59
+ readonly deliverables_emitted: number;
60
+ readonly deliverables_skeleton: number;
61
+ readonly deliverables_failed: number;
62
+ readonly coherence_violations: ReadonlyArray<CoherenceViolation>;
63
+ readonly deliverables: ReadonlyArray<DeliverableManifestEntry>;
64
+ }
65
+ export interface Phase7Options {
66
+ readonly verbose?: boolean;
67
+ readonly outputDir?: string;
68
+ }
69
+ export interface Phase7Result {
70
+ readonly status: Phase7Status;
71
+ readonly deliverables_emitted: number;
72
+ readonly deliverables_skeleton: number;
73
+ readonly deliverables_failed: number;
74
+ readonly deliverables_total: number;
75
+ readonly coherence_violations: ReadonlyArray<CoherenceViolation>;
76
+ readonly timing_ms: number;
77
+ /** Absolute paths of the files written during this phase. */
78
+ readonly output_paths: ReadonlyArray<string>;
79
+ /** Reason string when `status === 'skipped-due-to-upstream'` or `'failed'`. */
80
+ readonly reason?: string;
81
+ }
82
+ export interface Phase7Args {
83
+ readonly runDir: string;
84
+ readonly traceId: string;
85
+ readonly scenarioQuery: string;
86
+ readonly options?: Phase7Options;
87
+ }
88
+ /**
89
+ * Phase 7 entry point. Returns a `Phase7Result` describing what happened.
90
+ * Never throws — disk-full and similar conditions are reported as
91
+ * `status: 'failed'` with `reason` set.
92
+ */
93
+ export declare function executePhase7(args: Phase7Args): Promise<Phase7Result>;
94
+ //# sourceMappingURL=coordinator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../src/pipeline/phase7/coordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAkBH,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,qBAAqB,CAAC;AAoB7B,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAElE,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,SAAS,GACT,QAAQ,GACR,yBAAyB,CAAC;AAE9B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,uBAAuB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxD,QAAQ,CAAC,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACrD,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAClB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MA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