@llm-dev-ops/agentics-cli 2.7.36 → 2.7.37

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 (67) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/commands/agents.d.ts.map +1 -1
  4. package/dist/commands/agents.js +24 -70
  5. package/dist/commands/agents.js.map +1 -1
  6. package/dist/mcp/agent-event-parser.d.ts +1 -11
  7. package/dist/mcp/agent-event-parser.d.ts.map +1 -1
  8. package/dist/mcp/agent-event-parser.js +7 -153
  9. package/dist/mcp/agent-event-parser.js.map +1 -1
  10. package/dist/mcp/mcp-server.js +0 -58
  11. package/dist/mcp/mcp-server.js.map +1 -1
  12. package/dist/pipeline/auto-chain.d.ts.map +1 -1
  13. package/dist/pipeline/auto-chain.js +27 -169
  14. package/dist/pipeline/auto-chain.js.map +1 -1
  15. package/dist/pipeline/local-fallback/phase5a-local-fallback.d.ts +21 -18
  16. package/dist/pipeline/local-fallback/phase5a-local-fallback.d.ts.map +1 -1
  17. package/dist/pipeline/local-fallback/phase5a-local-fallback.js +92 -397
  18. package/dist/pipeline/local-fallback/phase5a-local-fallback.js.map +1 -1
  19. package/dist/pipeline/phase2/phases/adr-generator.d.ts +29 -1
  20. package/dist/pipeline/phase2/phases/adr-generator.d.ts.map +1 -1
  21. package/dist/pipeline/phase2/phases/adr-generator.js +709 -1399
  22. package/dist/pipeline/phase2/phases/adr-generator.js.map +1 -1
  23. package/dist/pipeline/phase2/phases/ddd-generator.d.ts.map +1 -1
  24. package/dist/pipeline/phase2/phases/ddd-generator.js +7 -42
  25. package/dist/pipeline/phase2/phases/ddd-generator.js.map +1 -1
  26. package/dist/pipeline/phase2/phases/research-dossier.d.ts.map +1 -1
  27. package/dist/pipeline/phase2/phases/research-dossier.js +2 -33
  28. package/dist/pipeline/phase2/phases/research-dossier.js.map +1 -1
  29. package/dist/pipeline/phase2/phases/sparc-specification.d.ts.map +1 -1
  30. package/dist/pipeline/phase2/phases/sparc-specification.js +2 -27
  31. package/dist/pipeline/phase2/phases/sparc-specification.js.map +1 -1
  32. package/dist/pipeline/phase2/types.d.ts +19 -57
  33. package/dist/pipeline/phase2/types.d.ts.map +1 -1
  34. package/dist/pipeline/phase4-adrs/adr-index-extractor.d.ts +75 -0
  35. package/dist/pipeline/phase4-adrs/adr-index-extractor.d.ts.map +1 -0
  36. package/dist/pipeline/phase4-adrs/adr-index-extractor.js +200 -0
  37. package/dist/pipeline/phase4-adrs/adr-index-extractor.js.map +1 -0
  38. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.d.ts.map +1 -1
  39. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js +70 -68
  40. package/dist/pipeline/phase4-adrs/phase4-adrs-coordinator.js.map +1 -1
  41. package/dist/pipeline/phases/adr-ddd-generator.d.ts.map +1 -1
  42. package/dist/pipeline/phases/adr-ddd-generator.js +48 -2
  43. package/dist/pipeline/phases/adr-ddd-generator.js.map +1 -1
  44. package/dist/pipeline/phases/prompt-generator.js +191 -80
  45. package/dist/pipeline/phases/prompt-generator.js.map +1 -1
  46. package/dist/pipeline/ruflo-phase-executor.d.ts.map +1 -1
  47. package/dist/pipeline/ruflo-phase-executor.js +69 -17
  48. package/dist/pipeline/ruflo-phase-executor.js.map +1 -1
  49. package/dist/pipeline/types.d.ts +14 -1
  50. package/dist/pipeline/types.d.ts.map +1 -1
  51. package/dist/synthesis/ask-artifact-writer.d.ts +1 -1
  52. package/dist/synthesis/ask-artifact-writer.d.ts.map +1 -1
  53. package/dist/synthesis/ask-artifact-writer.js +9 -9
  54. package/dist/synthesis/ask-artifact-writer.js.map +1 -1
  55. package/dist/synthesis/simulation-artifact-generator.d.ts +1 -27
  56. package/dist/synthesis/simulation-artifact-generator.d.ts.map +1 -1
  57. package/dist/synthesis/simulation-artifact-generator.js +38 -128
  58. package/dist/synthesis/simulation-artifact-generator.js.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/cli/ui/heartbeat.d.ts +0 -88
  61. package/dist/cli/ui/heartbeat.d.ts.map +0 -1
  62. package/dist/cli/ui/heartbeat.js +0 -158
  63. package/dist/cli/ui/heartbeat.js.map +0 -1
  64. package/dist/synthesis/agent-fleet-decomposer.d.ts +0 -124
  65. package/dist/synthesis/agent-fleet-decomposer.d.ts.map +0 -1
  66. package/dist/synthesis/agent-fleet-decomposer.js +0 -696
  67. package/dist/synthesis/agent-fleet-decomposer.js.map +0 -1
@@ -26,7 +26,6 @@ import { detectExecutionMode, commitScenarioFiles, } from './execution-context.j
26
26
  import { initSwarm, dispatchPhaseAgents, storePhaseArtifacts, reviewPhaseOutput, recordPhaseFailure, shutdownSwarm, invokeRufloCodingSwarm, PHASE_AGENTS, } from './swarm-orchestrator.js';
27
27
  import { executeRufloPhaseSwarm, buildPhase2Tasks, buildPhase3Tasks, buildPhase4Tasks, buildPhase5Tasks, buildPhase6Tasks, collectPhase2Artifacts, collectPhase3Artifacts, collectPhase4Artifacts, collectPhase5Artifacts, collectPhase6Artifacts, extractPhase1AgentCode, runPrimaryPhaseExecution, } from './ruflo-phase-executor.js';
28
28
  import { gatePhaseInputs, determineBlockedPhases, } from './gate/phase-dependency-gate.js';
29
- import { pipelineHeartbeat } from '../cli/ui/heartbeat.js';
30
29
  /** Extract path strings from any manifest artifact array (objects with .path or plain strings). */
31
30
  function extractArtifactPaths(artifacts) {
32
31
  return artifacts.map(a => typeof a === 'string' ? a : a.path);
@@ -2358,7 +2357,7 @@ async function ensureAdrsExist(runDir, traceId, scenarioQuery) {
2358
2357
  console.error('');
2359
2358
  console.error(' [ADR-028] No ADRs found — generating guaranteed set');
2360
2359
  try {
2361
- const { buildPhase2ADRs } = await import('./phase2/phases/adr-generator.js');
2360
+ const { buildLoudFailureADR } = await import('./phase2/phases/adr-generator.js');
2362
2361
  const { buildPhase2DDD } = await import('./phase2/phases/ddd-generator.js');
2363
2362
  // Load SPARC/dossier from any available location, or use empty defaults
2364
2363
  let sparc = { architecture: { services: [] }, specification: { requirements: [], constraints: [] } };
@@ -2383,9 +2382,17 @@ async function ensureAdrsExist(runDir, traceId, scenarioQuery) {
2383
2382
  catch { /* skip */ }
2384
2383
  }
2385
2384
  }
2386
- const adrs = buildPhase2ADRs(sparc, dossier, scenarioQuery, true /* skipLLM */);
2387
- if (adrs.length === 0)
2388
- return;
2385
+ // ADR-PIPELINE-100 §D5: ADR-028 guarantee path emits a loud-failure ADR
2386
+ // directly rather than calling the LLM. By the time we reach this branch
2387
+ // Phase 4 has already run (or been skipped); the LLM pass would either
2388
+ // duplicate Phase 4's work or block the guarantee path on a 30-min cap.
2389
+ const adrs = [buildLoudFailureADR({
2390
+ reason: 'ADR-028 guarantee path: no usable ADRs found anywhere in the run after Phase 4 completed/skipped. This failure ADR is written to satisfy the "always emit something" contract without re-running the LLM.',
2391
+ claudeFailureReason: 'guarantee path skipped LLM call — see Phase 4 logs for the original failure',
2392
+ dossierItemCount: dossier.items?.length ?? 0,
2393
+ sparcStatus: 'unknown',
2394
+ query: scenarioQuery,
2395
+ })];
2389
2396
  // Write to BOTH phase4 and phase2 so downstream consumers find them regardless of which path they check
2390
2397
  for (const targetDir of [path.join(runDir, 'phase4'), path.join(runDir, 'phase2')]) {
2391
2398
  const adrDir = path.join(targetDir, 'adrs');
@@ -2497,16 +2504,11 @@ export async function executeAutoChain(traceId, options = {}) {
2497
2504
  catch {
2498
2505
  // Best-effort
2499
2506
  }
2500
- // ADR-PIPELINE-099 D3 — process-wide heartbeat. Lives until executeAutoChain
2501
- // returns (try/finally below). Replaces the per-call heartbeat in
2502
- // executeNaturalLanguageRoute that died when auto-chain took over.
2503
- pipelineHeartbeat.start('agentics ask');
2504
- pipelineHeartbeat.setPhase('Phase 2 — booting');
2505
2507
  console.error('');
2506
2508
  console.error('='.repeat(72));
2507
2509
  console.error(' ENTERPRISE PROTOTYPE PIPELINE');
2508
2510
  console.error(` Mode: ${mode === 'development' ? 'DEVELOPMENT (sandbox — no repo mutation)' : 'PROJECT (current branch)'}`);
2509
- console.error(' Auto-chaining Phases 2-7 from simulation artifacts');
2511
+ console.error(' Auto-chaining Phases 2-6 from simulation artifacts');
2510
2512
  console.error('='.repeat(72));
2511
2513
  console.error('');
2512
2514
  // ── Check ruflo availability (optional — pipeline works without it) ──
@@ -2547,7 +2549,6 @@ export async function executeAutoChain(traceId, options = {}) {
2547
2549
  console.error('-'.repeat(72));
2548
2550
  console.error(' >> Phase 2: Deep Research');
2549
2551
  console.error('-'.repeat(72));
2550
- pipelineHeartbeat.setPhase('Phase 2 — Deep Research');
2551
2552
  const phase2HasContent = fs.existsSync(phaseDir)
2552
2553
  && fs.existsSync(path.join(phaseDir, 'research-dossier.json'))
2553
2554
  && fs.existsSync(path.join(phaseDir, 'sparc', 'sparc-combined.json'));
@@ -2625,7 +2626,6 @@ export async function executeAutoChain(traceId, options = {}) {
2625
2626
  console.error('');
2626
2627
  console.error('-'.repeat(72));
2627
2628
  console.error(' >> Phase 3: SPARC + London School TDD');
2628
- pipelineHeartbeat.setPhase('Phase 3 — SPARC + London TDD');
2629
2629
  console.error('-'.repeat(72));
2630
2630
  const phase3HasContent = fs.existsSync(phaseDir)
2631
2631
  && fs.existsSync(path.join(phaseDir, 'sparc', 'sparc-combined.json'));
@@ -2719,48 +2719,6 @@ export async function executeAutoChain(traceId, options = {}) {
2719
2719
  }
2720
2720
  }
2721
2721
  }
2722
- // ADR-PIPELINE-105 — write phase3-manifest.json on recovery so
2723
- // downstream phases that read it (Phase 4 + Phase 5) don't bail.
2724
- try {
2725
- const phase3SparcDir = path.join(phaseDir, 'sparc');
2726
- const phase3TddDir = path.join(phaseDir, 'tdd');
2727
- const sparcFiles = fs.existsSync(phase3SparcDir)
2728
- ? fs.readdirSync(phase3SparcDir).filter(f => f.endsWith('.md') || f.endsWith('.json'))
2729
- : [];
2730
- const tddFiles = fs.existsSync(phase3TddDir)
2731
- ? fs.readdirSync(phase3TddDir).filter(f => f.endsWith('.md') || f.endsWith('.json'))
2732
- : [];
2733
- // Detect implementation language from the carried-forward SPARC.
2734
- let implLang = 'typescript';
2735
- try {
2736
- const sc = path.join(phase3SparcDir, 'sparc-combined.json');
2737
- if (fs.existsSync(sc)) {
2738
- const parsed = JSON.parse(fs.readFileSync(sc, 'utf-8'));
2739
- if (parsed?.architecture?.language)
2740
- implLang = parsed.architecture.language;
2741
- }
2742
- }
2743
- catch { /* keep typescript */ }
2744
- const manifestObj = {
2745
- phase: 3,
2746
- status: 'recovered',
2747
- recovered_from: 'phase2',
2748
- recovery_reason: errMsg,
2749
- trace_id: traceId,
2750
- created_at: new Date().toISOString(),
2751
- implementation_language: implLang,
2752
- artifacts: [
2753
- ...sparcFiles.map(f => `phase3/sparc/${f}`),
2754
- ...tddFiles.map(f => `phase3/tdd/${f}`),
2755
- ],
2756
- counts: { sparc_files: sparcFiles.length, tdd_files: tddFiles.length },
2757
- };
2758
- fs.writeFileSync(path.join(phaseDir, 'phase3-manifest.json'), JSON.stringify(manifestObj, null, 2), { mode: 0o600, encoding: 'utf-8' });
2759
- console.error(` [RECOVER] Wrote phase3-manifest.json (${sparcFiles.length} SPARC, ${tddFiles.length} TDD files, lang=${implLang}) — Phase 4+5 can now finalize`);
2760
- }
2761
- catch (manifestErr) {
2762
- console.error(` [WARN] Failed to write phase3-manifest.json on recovery path: ${manifestErr instanceof Error ? manifestErr.message : String(manifestErr)}`);
2763
- }
2764
2722
  console.error(' [RECOVER] Phase 2 artifacts carried forward — continuing to Phase 4');
2765
2723
  phases.push({ phase: 3, label: 'SPARC + London TDD', status: 'completed', timing: Date.now() - phaseStart, artifacts: [], outputDir: phaseDir, error: `Recovered from Phase 2: ${errMsg}` });
2766
2724
  copyPlanningArtifacts(runDir, projectRoot);
@@ -2785,7 +2743,6 @@ export async function executeAutoChain(traceId, options = {}) {
2785
2743
  console.error('');
2786
2744
  console.error('-'.repeat(72));
2787
2745
  console.error(' >> Phase 4: Architecture Decision Records + Domain-Driven Design');
2788
- pipelineHeartbeat.setPhase('Phase 4 — ADRs + DDDs');
2789
2746
  console.error('-'.repeat(72));
2790
2747
  // Only skip if phase4 has actual ADR + DDD content (not just an empty dir from a failed prior run)
2791
2748
  const phase4HasContent = fs.existsSync(phaseDir)
@@ -2876,7 +2833,7 @@ export async function executeAutoChain(traceId, options = {}) {
2876
2833
  if (!recovered) {
2877
2834
  console.error(' [RECOVER] No Phase 2 ADRs — generating ADRs from SPARC + dossier (no LLM required)');
2878
2835
  try {
2879
- const { buildPhase2ADRs } = await import('../pipeline/phase2/phases/adr-generator.js');
2836
+ const { buildLoudFailureADR } = await import('../pipeline/phase2/phases/adr-generator.js');
2880
2837
  const { buildPhase2DDD } = await import('../pipeline/phase2/phases/ddd-generator.js');
2881
2838
  // Load SPARC and dossier from wherever they exist
2882
2839
  let sparc = null;
@@ -2902,8 +2859,18 @@ export async function executeAutoChain(traceId, options = {}) {
2902
2859
  }
2903
2860
  }
2904
2861
  if (sparc && dossier) {
2905
- // Generate ADRs
2906
- const adrs = buildPhase2ADRs(sparc, dossier, scenarioQuery, true /* skipLLM */);
2862
+ // ADR-PIPELINE-100 §D5: recovery path emits a loud-failure ADR
2863
+ // directly rather than re-running the LLM. The Phase 4 path
2864
+ // has already completed/skipped; we just need a present-but-honest
2865
+ // marker in `phase4/adrs/` so downstream consumers can see that
2866
+ // ADR generation didn't yield real content.
2867
+ const adrs = [buildLoudFailureADR({
2868
+ reason: 'Recovery path: no Phase 2 ADRs found; Phase 4 also did not produce content. This failure ADR is written so downstream phases can see the regression without rerunning the LLM.',
2869
+ claudeFailureReason: 'recovery path skipped LLM call — see Phase 4 logs for the original failure',
2870
+ dossierItemCount: dossier.items?.length ?? 0,
2871
+ sparcStatus: 'present',
2872
+ query: scenarioQuery,
2873
+ })];
2907
2874
  if (adrs.length > 0) {
2908
2875
  const adrDir = path.join(phaseDir, 'adrs');
2909
2876
  fs.mkdirSync(adrDir, { recursive: true });
@@ -2956,40 +2923,6 @@ export async function executeAutoChain(traceId, options = {}) {
2956
2923
  }
2957
2924
  }
2958
2925
  if (recovered) {
2959
- // ADR-PIPELINE-105 — write a phase4-manifest.json on the recovery
2960
- // path so Phase 5 (which reads this manifest to know ADRs/DDD
2961
- // exist) can run instead of failing with "Phase 4 manifest
2962
- // missing." Pre-105 the recovery copied files but never created
2963
- // the manifest, so Phase 5's final-write step bombed and the
2964
- // user got "9 code files generated but not finalized."
2965
- try {
2966
- const adrDir = path.join(phaseDir, 'adrs');
2967
- const dddDir = path.join(phaseDir, 'ddd');
2968
- const adrFiles = fs.existsSync(adrDir)
2969
- ? fs.readdirSync(adrDir).filter(f => f.endsWith('.md'))
2970
- : [];
2971
- const dddFiles = fs.existsSync(dddDir)
2972
- ? fs.readdirSync(dddDir).filter(f => f.endsWith('.json') || f.endsWith('.md'))
2973
- : [];
2974
- const manifestObj = {
2975
- phase: 4,
2976
- status: 'recovered',
2977
- recovered_from: 'phase2',
2978
- recovery_reason: errMsg,
2979
- trace_id: traceId,
2980
- created_at: new Date().toISOString(),
2981
- artifacts: [
2982
- ...adrFiles.map(f => `phase4/adrs/${f}`),
2983
- ...dddFiles.map(f => `phase4/ddd/${f}`),
2984
- ],
2985
- counts: { adrs: adrFiles.length, ddd_files: dddFiles.length },
2986
- };
2987
- fs.writeFileSync(path.join(phaseDir, 'phase4-manifest.json'), JSON.stringify(manifestObj, null, 2), { mode: 0o600, encoding: 'utf-8' });
2988
- console.error(` [RECOVER] Wrote phase4-manifest.json (${adrFiles.length} ADRs, ${dddFiles.length} DDD files) — Phase 5 can now finalize`);
2989
- }
2990
- catch (manifestErr) {
2991
- console.error(` [WARN] Failed to write phase4-manifest.json on recovery path: ${manifestErr instanceof Error ? manifestErr.message : String(manifestErr)}`);
2992
- }
2993
2926
  phases.push({ phase: 4, label: 'ADRs + DDDs', status: 'completed', timing: Date.now() - phaseStart, artifacts: [], outputDir: phaseDir, error: `Recovered: ${errMsg}` });
2994
2927
  }
2995
2928
  else {
@@ -3001,11 +2934,10 @@ export async function executeAutoChain(traceId, options = {}) {
3001
2934
  } // close ADR-PIPELINE-093 phase4-adrs-ddd gate-else
3002
2935
  }
3003
2936
  }
3004
- // ── Phase 4.5 (Phase 5a): Generate implementation prompts by reading ADR + DDD files ──
2937
+ // ── Phase 4.5: Generate implementation prompts by reading ADR + DDD files ──
3005
2938
  // Simple approach: gather all ADR/DDD/SPARC files, hand them to ruflo swarm,
3006
2939
  // let the LLM read them and produce coherent implementation prompts.
3007
2940
  {
3008
- pipelineHeartbeat.setPhase('Phase 5a — Implementation Prompts');
3009
2941
  const promptsDir = path.join(runDir, 'prompts');
3010
2942
  // Check if prompts already exist from a prior run
3011
2943
  const promptsExist = fs.existsSync(promptsDir)
@@ -3952,7 +3884,6 @@ services when the pilot validates the approach.
3952
3884
  console.error('');
3953
3885
  console.error('-'.repeat(72));
3954
3886
  console.error(` >> Phase 5: Build (Code Generation + Deployable Service) [${detectedLanguage}]`);
3955
- pipelineHeartbeat.setPhase(`Phase 5 — Build [${detectedLanguage}]`);
3956
3887
  console.error('-'.repeat(72));
3957
3888
  const phase5HasContent = fs.existsSync(phaseDir)
3958
3889
  && fs.existsSync(path.join(phaseDir, 'phase5-manifest.json'));
@@ -3967,38 +3898,6 @@ services when the pilot validates the approach.
3967
3898
  fs.rmSync(phaseDir, { recursive: true, force: true });
3968
3899
  }
3969
3900
  const agentResults = await dispatchPhaseAgents(PHASE_AGENTS[5], traceId, runDir, scenarioQuery);
3970
- // ADR-PIPELINE-099 D3 — surface every implementation prompt so the user
3971
- // sees the work plan instead of staring at a silent terminal. The build
3972
- // itself remains a single Ruflo swarm invocation, but each prompt that
3973
- // feeds it is now visible up front and announced in the heartbeat.
3974
- try {
3975
- const promptsDir = path.join(runDir, 'prompts');
3976
- if (fs.existsSync(promptsDir)) {
3977
- const implFiles = fs.readdirSync(promptsDir)
3978
- .filter(f => /^impl-\d+-.+\.md$/.test(f))
3979
- .sort();
3980
- if (implFiles.length > 0) {
3981
- console.error(` [PROMPTS] Build plan: ${implFiles.length} implementation prompts queued`);
3982
- for (let i = 0; i < implFiles.length; i++) {
3983
- const f = implFiles[i];
3984
- // Read just the title line from frontmatter so the visible
3985
- // line is human-readable, not a slug.
3986
- let title = f;
3987
- try {
3988
- const head = fs.readFileSync(path.join(promptsDir, f), 'utf-8').split('\n').slice(0, 12);
3989
- const titleLine = head.find(l => l.startsWith('title:'));
3990
- if (titleLine)
3991
- title = titleLine.replace(/^title:\s*"?/, '').replace(/"?\s*$/, '');
3992
- }
3993
- catch { /* keep filename */ }
3994
- const titleTrim = title.length > 70 ? title.slice(0, 67) + '…' : title;
3995
- console.error(` ${String(i + 1).padStart(2, ' ')}/${implFiles.length} ${f} ${titleTrim}`);
3996
- }
3997
- pipelineHeartbeat.setActivity(`build: handing ${implFiles.length} prompts to ruflo swarm`);
3998
- }
3999
- }
4000
- }
4001
- catch { /* visibility is best-effort */ }
4002
3901
  // Ruflo swarm: build production-ready application in cooperation with agentics agents
4003
3902
  const rufloP5Dir = path.join(runDir, '.ruflo-cache', 'phase5');
4004
3903
  const rufloResult = executeRufloPhaseSwarm({
@@ -4077,7 +3976,6 @@ services when the pilot validates the approach.
4077
3976
  console.error('');
4078
3977
  console.error('-'.repeat(72));
4079
3978
  console.error(' >> Phase 6: ERP Surface Push + Project Materialization');
4080
- pipelineHeartbeat.setPhase('Phase 6 — ERP Push + Materialization');
4081
3979
  console.error('-'.repeat(72));
4082
3980
  // Only skip if phase6 has actual registration content (not just an empty dir from a failed prior run)
4083
3981
  const phase6HasContent = fs.existsSync(phaseDir)
@@ -4135,7 +4033,6 @@ services when the pilot validates the approach.
4135
4033
  console.error('');
4136
4034
  console.error('-'.repeat(72));
4137
4035
  console.error(' >> Phase 7: Consulting Deliverables (85-document enterprise decision pack)');
4138
- pipelineHeartbeat.setPhase('Phase 7 — Consulting Deliverables');
4139
4036
  console.error('-'.repeat(72));
4140
4037
  try {
4141
4038
  const { executePhase7 } = await import('./phase7/coordinator.js');
@@ -4179,40 +4076,6 @@ services when the pilot validates the approach.
4179
4076
  outputDir: phaseDir,
4180
4077
  ...(errorDetail ? { error: errorDetail } : {}),
4181
4078
  });
4182
- // ADR-PIPELINE-099 D5 (project-co-located deliverables) — the
4183
- // executive deliverables MUST land in the project directory itself,
4184
- // not behind the runDir artifact wall (~/.agentics/runs/...). Copy
4185
- // <runDir>/deliverables/ into:
4186
- // 1. <runDir>/phase6/project/deliverables/ — so the materialized
4187
- // project tree always carries them
4188
- // 2. <options.outputDir>/deliverables/ — when the user asked for
4189
- // a specific output directory
4190
- // 3. <repoRoot>/deliverables/ — when running in 'project' mode,
4191
- // so the deliverables land alongside the just-built code
4192
- const deliverablesSrc = phaseDir; // == <runDir>/deliverables
4193
- if (fs.existsSync(deliverablesSrc)) {
4194
- const targets = [];
4195
- const phase6ProjectDir = path.join(runDir, 'phase6', 'project');
4196
- if (fs.existsSync(phase6ProjectDir)) {
4197
- targets.push(path.join(phase6ProjectDir, 'deliverables'));
4198
- }
4199
- if (options.outputDir) {
4200
- targets.push(path.join(path.resolve(options.outputDir), 'deliverables'));
4201
- }
4202
- if (mode === 'project' && execCtx.repoRoot) {
4203
- targets.push(path.join(execCtx.repoRoot, 'deliverables'));
4204
- }
4205
- for (const target of targets) {
4206
- try {
4207
- const counts = copyDirRecursive(deliverablesSrc, target);
4208
- console.error(` [P7] Co-located deliverables → ${target} (${counts.copied} new, ${counts.skipped} unchanged)`);
4209
- }
4210
- catch (copyErr) {
4211
- const m = copyErr instanceof Error ? copyErr.message : String(copyErr);
4212
- console.error(` [P7] [WARN] failed to copy deliverables to ${target}: ${m}`);
4213
- }
4214
- }
4215
- }
4216
4079
  }
4217
4080
  }
4218
4081
  catch (err) {
@@ -4345,7 +4208,6 @@ services when the pilot validates the approach.
4345
4208
  shutdownSwarm(traceId, false, totalTiming);
4346
4209
  }
4347
4210
  catch { /* best-effort */ }
4348
- pipelineHeartbeat.stop();
4349
4211
  process.exit(1);
4350
4212
  }
4351
4213
  }
@@ -4359,10 +4221,6 @@ services when the pilot validates the approach.
4359
4221
  // ADR-PIPELINE-093 §Rule 3 (c): blocked phases threaded into the
4360
4222
  // result so the final `agentics ask` banner can warn the user.
4361
4223
  gateAcc.blocked.map(b => ({ phase: b.phase, missing: [...b.missing] })));
4362
- // ADR-PIPELINE-099 D3 — clear the heartbeat status line before printing
4363
- // the final summary so the bottom-of-screen frame doesn't overlap the
4364
- // summary banner.
4365
- pipelineHeartbeat.stop();
4366
4224
  printFinalSummary(result);
4367
4225
  return result;
4368
4226
  }