archondev 2.19.28 → 2.19.29

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  bugReport
3
- } from "./chunk-77S6ZEVT.js";
4
- import "./chunk-DFDEEMQU.js";
3
+ } from "./chunk-AHK2ITJX.js";
4
+ import "./chunk-WGLVDEZC.js";
5
5
  import "./chunk-3MZOEZUH.js";
6
6
  import "./chunk-F7R3QKHP.js";
7
7
  import "./chunk-7C6JELBL.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listLocalAtoms
3
- } from "./chunk-I2ORQAMH.js";
3
+ } from "./chunk-Z6RH6DFP.js";
4
4
 
5
5
  // src/cli/list.ts
6
6
  import chalk from "chalk";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createAtom
3
- } from "./chunk-DFDEEMQU.js";
3
+ } from "./chunk-WGLVDEZC.js";
4
4
  import {
5
5
  ArchitectAgent
6
6
  } from "./chunk-3MZOEZUH.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadAtom
3
- } from "./chunk-I2ORQAMH.js";
3
+ } from "./chunk-Z6RH6DFP.js";
4
4
 
5
5
  // src/cli/show.ts
6
6
  import chalk from "chalk";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  listLocalAtoms,
8
8
  loadAtom
9
- } from "./chunk-I2ORQAMH.js";
9
+ } from "./chunk-Z6RH6DFP.js";
10
10
  import {
11
11
  loadConfig
12
12
  } from "./chunk-SVU7MLG6.js";
@@ -7,10 +7,10 @@ import {
7
7
  UsageRecorder,
8
8
  handleInsufficientCreditsRecovery,
9
9
  loadAtom
10
- } from "./chunk-I2ORQAMH.js";
10
+ } from "./chunk-Z6RH6DFP.js";
11
11
  import {
12
12
  transitionAtom
13
- } from "./chunk-DFDEEMQU.js";
13
+ } from "./chunk-WGLVDEZC.js";
14
14
  import {
15
15
  AnthropicClient,
16
16
  getDefaultModel
@@ -4783,6 +4783,17 @@ var EnvironmentValidator = class {
4783
4783
 
4784
4784
  // src/cli/execute.ts
4785
4785
  var ATOMS_DIR = ".archon/atoms";
4786
+ function isGovernanceViolation(errorMessage) {
4787
+ if (!errorMessage) return false;
4788
+ const normalized = errorMessage.toLowerCase();
4789
+ return normalized.includes("architecture violations:") || normalized.includes("outside the allowed paths") || normalized.includes("is protected");
4790
+ }
4791
+ function extractGovernanceViolations(errorMessage) {
4792
+ if (!errorMessage) return [];
4793
+ const prefix = "Architecture violations:";
4794
+ if (!errorMessage.startsWith(prefix)) return [];
4795
+ return errorMessage.slice(prefix.length).split(",").map((item) => item.trim()).filter(Boolean);
4796
+ }
4786
4797
  function createPrompt() {
4787
4798
  const rl = createInterface({
4788
4799
  input: process.stdin,
@@ -4804,7 +4815,7 @@ async function execute(atomId, options) {
4804
4815
  process.exit(1);
4805
4816
  };
4806
4817
  if (options.parallel && options.parallel.length > 0) {
4807
- const { parallelExecute } = await import("./parallel-RCMUYXE2.js");
4818
+ const { parallelExecute } = await import("./parallel-3EZP3X6S.js");
4808
4819
  const allAtomIds = [atomId, ...options.parallel];
4809
4820
  await parallelExecute(allAtomIds, { skipGates: options.skipGates === true });
4810
4821
  return;
@@ -5018,13 +5029,32 @@ ${conflictReport.blockerCount} blocking conflict(s) found.`));
5018
5029
  const executionResult = await executor.executeAtom(atom, atom.plan, parseResult.schema, cwd);
5019
5030
  const filesChanged = executionResult.diffs.map((d) => d.path);
5020
5031
  if (!executionResult.success) {
5021
- console.log(chalk2.red("\n\u274C Execution failed"));
5022
- console.log(chalk2.red(executionResult.errorMessage ?? "Unknown error"));
5032
+ if (isGovernanceViolation(executionResult.errorMessage)) {
5033
+ console.log(chalk2.yellow("\n\u26A0\uFE0F Execution paused by governance guidance"));
5034
+ console.log(chalk2.dim("No changes were committed. Update the plan/path scope, then continue."));
5035
+ const violations = extractGovernanceViolations(executionResult.errorMessage);
5036
+ if (violations.length > 0) {
5037
+ console.log(chalk2.yellow("\nGovernance guidance:"));
5038
+ for (const violation of violations) {
5039
+ console.log(chalk2.dim(` - ${violation}`));
5040
+ }
5041
+ } else {
5042
+ console.log(chalk2.yellow(executionResult.errorMessage ?? "Architecture constraints were not satisfied."));
5043
+ }
5044
+ } else {
5045
+ console.log(chalk2.red("\n\u274C Execution failed"));
5046
+ console.log(chalk2.red(executionResult.errorMessage ?? "Unknown error"));
5047
+ }
5023
5048
  if (executionResult.rollbackPerformed) {
5024
5049
  console.log(chalk2.yellow("Changes have been rolled back."));
5025
5050
  }
5026
- atom = transitionAtom(atom, "FAILED");
5027
- atom.errorMessage = executionResult.errorMessage ?? "Execution failed";
5051
+ if (isGovernanceViolation(executionResult.errorMessage)) {
5052
+ atom = transitionAtom(atom, "BLOCKED");
5053
+ atom.errorMessage = executionResult.errorMessage ?? "Governance guidance requires adjustments before execution.";
5054
+ } else {
5055
+ atom = transitionAtom(atom, "FAILED");
5056
+ atom.errorMessage = executionResult.errorMessage ?? "Execution failed";
5057
+ }
5028
5058
  await saveAtom(atom);
5029
5059
  await captureLearnings(atom, {
5030
5060
  atomId: atom.id,
@@ -5033,6 +5063,10 @@ ${conflictReport.blockerCount} blocking conflict(s) found.`));
5033
5063
  success: false,
5034
5064
  errorMessage: executionResult.errorMessage
5035
5065
  });
5066
+ if (isGovernanceViolation(executionResult.errorMessage)) {
5067
+ printExecuteNextActions(atom.externalId, false);
5068
+ return;
5069
+ }
5036
5070
  return fail();
5037
5071
  }
5038
5072
  console.log(chalk2.green("\u2713 Plan executed successfully"));
@@ -6,8 +6,8 @@ import {
6
6
  var ATOM_TRANSITIONS = {
7
7
  DRAFT: ["READY"],
8
8
  READY: ["IN_PROGRESS", "BLOCKED"],
9
- IN_PROGRESS: ["TESTING", "FAILED"],
10
- TESTING: ["DONE", "FAILED"],
9
+ IN_PROGRESS: ["TESTING", "FAILED", "BLOCKED"],
10
+ TESTING: ["DONE", "FAILED", "BLOCKED"],
11
11
  DONE: [],
12
12
  // Terminal state
13
13
  FAILED: ["IN_PROGRESS", "BLOCKED"],
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAtom,
3
3
  validateAtom
4
- } from "./chunk-DFDEEMQU.js";
4
+ } from "./chunk-WGLVDEZC.js";
5
5
  import {
6
6
  ArchitectAgent
7
7
  } from "./chunk-3MZOEZUH.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  execute
3
- } from "./chunk-VMQKFKX3.js";
3
+ } from "./chunk-UVW75BHP.js";
4
4
  import "./chunk-EBHHIUCB.js";
5
- import "./chunk-I2ORQAMH.js";
6
- import "./chunk-DFDEEMQU.js";
5
+ import "./chunk-Z6RH6DFP.js";
6
+ import "./chunk-WGLVDEZC.js";
7
7
  import "./chunk-3MZOEZUH.js";
8
8
  import "./chunk-F7R3QKHP.js";
9
9
  import "./chunk-Q3GIFHIQ.js";
package/dist/index.js CHANGED
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-6URKZ7NB.js";
14
14
  import {
15
15
  show
16
- } from "./chunk-RS3FR4UB.js";
16
+ } from "./chunk-LRNXR7DL.js";
17
17
  import {
18
18
  bugReport
19
- } from "./chunk-77S6ZEVT.js";
19
+ } from "./chunk-AHK2ITJX.js";
20
20
  import {
21
21
  reviewAnalyze,
22
22
  reviewExport,
@@ -50,13 +50,13 @@ import {
50
50
  parallelRunWaves,
51
51
  parallelSchedule,
52
52
  parallelStatus
53
- } from "./chunk-QIGRZP5P.js";
53
+ } from "./chunk-MRCIJKWD.js";
54
54
  import {
55
55
  DependencyParser,
56
56
  EnvironmentConfigLoader,
57
57
  EnvironmentValidator,
58
58
  execute
59
- } from "./chunk-VMQKFKX3.js";
59
+ } from "./chunk-UVW75BHP.js";
60
60
  import {
61
61
  cloudCancel,
62
62
  cloudLogs,
@@ -64,13 +64,13 @@ import {
64
64
  } from "./chunk-EBHHIUCB.js";
65
65
  import {
66
66
  list
67
- } from "./chunk-WQIXCLK4.js";
67
+ } from "./chunk-6ADNSWJ3.js";
68
68
  import {
69
69
  listLocalAtoms,
70
70
  loadAtom,
71
71
  plan
72
- } from "./chunk-I2ORQAMH.js";
73
- import "./chunk-DFDEEMQU.js";
72
+ } from "./chunk-Z6RH6DFP.js";
73
+ import "./chunk-WGLVDEZC.js";
74
74
  import "./chunk-3MZOEZUH.js";
75
75
  import {
76
76
  err,
@@ -3251,7 +3251,7 @@ async function runExploreFlow(cwd, followUpInput, options = {}) {
3251
3251
  case "1": {
3252
3252
  const description = await promptWithCommands("Describe what you want to do", { allowMultiline: true });
3253
3253
  if (description.trim()) {
3254
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3254
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3255
3255
  await plan2(description, { conversational: true });
3256
3256
  }
3257
3257
  await showMainMenu();
@@ -3496,7 +3496,7 @@ ${state.forbiddenPatterns?.length ? `- **Forbidden patterns:** ${state.forbidden
3496
3496
  const hintedTask = initialTaskHint?.trim() ?? "";
3497
3497
  if (hintedTask) {
3498
3498
  console.log(chalk5.dim("Using your request above as the first task.\n"));
3499
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3499
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3500
3500
  await plan2(hintedTask, { conversational: true });
3501
3501
  return;
3502
3502
  }
@@ -3521,7 +3521,7 @@ ${state.forbiddenPatterns?.length ? `- **Forbidden patterns:** ${state.forbidden
3521
3521
  description = continueAnswer.trim();
3522
3522
  }
3523
3523
  if (description.trim()) {
3524
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3524
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3525
3525
  await plan2(description, { conversational: true });
3526
3526
  }
3527
3527
  }
@@ -3699,7 +3699,7 @@ async function handleAgentConversationInput(cwd, input) {
3699
3699
  return true;
3700
3700
  }
3701
3701
  console.log(chalk5.dim("\n> Got it! Creating a task for this...\n"));
3702
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3702
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3703
3703
  await plan2(input, { conversational: true });
3704
3704
  if (shouldAutoExecuteAfterPlanning(input)) {
3705
3705
  await continueWithCurrentTask(cwd);
@@ -3745,7 +3745,7 @@ async function showProposalForApproval(input) {
3745
3745
  }
3746
3746
  }
3747
3747
  async function showLatestPlannedAtom(cwd) {
3748
- const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-PJI6MCS3.js");
3748
+ const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-RHDFDSZE.js");
3749
3749
  const atoms = await listLocalAtoms2();
3750
3750
  if (atoms.length === 0) {
3751
3751
  console.log(chalk5.yellow("No atoms found yet. Tell me what to plan."));
@@ -3763,7 +3763,7 @@ async function showLatestPlannedAtom(cwd) {
3763
3763
  console.log(chalk5.dim(`
3764
3764
  Showing latest planned atom (${latest.externalId})...
3765
3765
  `));
3766
- const { show: show2 } = await import("./show-N7E3I6EF.js");
3766
+ const { show: show2 } = await import("./show-7A3FACN6.js");
3767
3767
  await show2(latest.externalId);
3768
3768
  }
3769
3769
  function isContinuationDirective(input) {
@@ -3779,7 +3779,7 @@ async function applyApprovedProposal(cwd) {
3779
3779
  if (!approvedRequest) return;
3780
3780
  pendingProposalRequest = null;
3781
3781
  console.log(chalk5.dim("\n> Great. I will create the task from your approved request.\n"));
3782
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3782
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3783
3783
  await plan2(approvedRequest, { conversational: true });
3784
3784
  if (shouldAutoExecuteAfterPlanning(approvedRequest)) {
3785
3785
  await continueWithCurrentTask(cwd);
@@ -3789,7 +3789,7 @@ async function applyApprovedProposal(cwd) {
3789
3789
  console.log(chalk5.dim('\nReply "continue" when you approve this plan, or tell me what to change.'));
3790
3790
  }
3791
3791
  async function continueWithCurrentTask(cwd) {
3792
- const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-PJI6MCS3.js");
3792
+ const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-RHDFDSZE.js");
3793
3793
  const atoms = await listLocalAtoms2();
3794
3794
  const pending = atoms.filter((a) => a.status === "READY" || a.status === "IN_PROGRESS").sort((a, b) => a.externalId.localeCompare(b.externalId));
3795
3795
  if (pending.length === 0) {
@@ -3804,7 +3804,7 @@ async function continueWithCurrentTask(cwd) {
3804
3804
  console.log(chalk5.dim(`
3805
3805
  Continuing with ${nextAtom.externalId}...
3806
3806
  `));
3807
- const { execute: execute2 } = await import("./execute-WIOXRN5H.js");
3807
+ const { execute: execute2 } = await import("./execute-VOZIDAAG.js");
3808
3808
  await execute2(nextAtom.externalId, { nonTerminating: true });
3809
3809
  }
3810
3810
  async function showMainMenu() {
@@ -3872,7 +3872,7 @@ async function handleFreeformJourneyInput(cwd, input) {
3872
3872
  const state = detectProjectState(cwd);
3873
3873
  if (state.hasArchitecture) {
3874
3874
  console.log(chalk5.dim("\n> Got it! Creating a task for this...\n"));
3875
- const { plan: plan3 } = await import("./plan-PJI6MCS3.js");
3875
+ const { plan: plan3 } = await import("./plan-RHDFDSZE.js");
3876
3876
  await plan3(freeform, { conversational: true });
3877
3877
  return true;
3878
3878
  }
@@ -3881,7 +3881,7 @@ async function handleFreeformJourneyInput(cwd, input) {
3881
3881
  return true;
3882
3882
  }
3883
3883
  console.log(chalk5.dim("\n> Got it! Creating a task for this...\n"));
3884
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3884
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3885
3885
  await plan2(freeform, { conversational: true });
3886
3886
  return true;
3887
3887
  }
@@ -3936,7 +3936,7 @@ async function handlePostExploreAction(cwd, request, options = {}) {
3936
3936
  } else {
3937
3937
  console.log(chalk5.dim("> Got it! Creating a task for this...\n"));
3938
3938
  }
3939
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3939
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3940
3940
  await plan2(request, { conversational: true });
3941
3941
  if (options.agentMode) {
3942
3942
  if (shouldAutoExecuteAfterPlanning(sourceInput)) {
@@ -3948,18 +3948,18 @@ async function handlePostExploreAction(cwd, request, options = {}) {
3948
3948
  }
3949
3949
  }
3950
3950
  async function planTask() {
3951
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
3951
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
3952
3952
  const description = await promptWithCommands("Describe what you want to build", { allowMultiline: true });
3953
3953
  if (description.trim()) {
3954
3954
  await plan2(description, { conversational: true });
3955
3955
  }
3956
3956
  }
3957
3957
  async function listAtoms() {
3958
- const { list: list2 } = await import("./list-2PHO34IY.js");
3958
+ const { list: list2 } = await import("./list-JC7IMC5M.js");
3959
3959
  await list2({});
3960
3960
  }
3961
3961
  async function executeNext() {
3962
- const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-PJI6MCS3.js");
3962
+ const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-RHDFDSZE.js");
3963
3963
  const { analyzeProject, getComplexityDescription, getModeDescription } = await import("./orchestration-HIF3KP25.js");
3964
3964
  const { loadExecutionPreferences } = await import("./preferences-AGIZD5E5.js");
3965
3965
  const cwd = process.cwd();
@@ -4030,11 +4030,11 @@ async function executeNext() {
4030
4030
  }
4031
4031
  }
4032
4032
  if (selectedMode === "parallel-cloud") {
4033
- const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-RCMUYXE2.js");
4033
+ const { parallelExecuteCloud: parallelExecuteCloud2 } = await import("./parallel-3EZP3X6S.js");
4034
4034
  await parallelExecuteCloud2(runIds);
4035
4035
  return;
4036
4036
  }
4037
- const { parallelExecute } = await import("./parallel-RCMUYXE2.js");
4037
+ const { parallelExecute } = await import("./parallel-3EZP3X6S.js");
4038
4038
  await parallelExecute(runIds);
4039
4039
  return;
4040
4040
  }
@@ -4042,14 +4042,14 @@ async function executeNext() {
4042
4042
  const atomId = await prompt("Enter atom ID to execute (or press Enter for first pending)");
4043
4043
  const targetId = atomId.trim() || pendingAtoms[0]?.id;
4044
4044
  if (targetId) {
4045
- const { execute: execute2 } = await import("./execute-WIOXRN5H.js");
4045
+ const { execute: execute2 } = await import("./execute-VOZIDAAG.js");
4046
4046
  await execute2(targetId, {});
4047
4047
  } else {
4048
4048
  console.log(chalk5.yellow("No atom to execute."));
4049
4049
  }
4050
4050
  }
4051
4051
  async function reportBug() {
4052
- const { bugReport: bugReport2 } = await import("./bug-QYKFP77X.js");
4052
+ const { bugReport: bugReport2 } = await import("./bug-CQKGCVCM.js");
4053
4053
  const title = await prompt("Bug title");
4054
4054
  if (title.trim()) {
4055
4055
  await bugReport2(title, {});
@@ -4191,7 +4191,7 @@ async function handleSlashCommand(input) {
4191
4191
  const arg = parts.slice(1).join(" ").trim();
4192
4192
  switch (command) {
4193
4193
  case "/plan": {
4194
- const { plan: plan2 } = await import("./plan-PJI6MCS3.js");
4194
+ const { plan: plan2 } = await import("./plan-RHDFDSZE.js");
4195
4195
  if (arg) {
4196
4196
  await plan2(arg, { conversational: true });
4197
4197
  } else {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  list
3
- } from "./chunk-WQIXCLK4.js";
4
- import "./chunk-I2ORQAMH.js";
5
- import "./chunk-DFDEEMQU.js";
3
+ } from "./chunk-6ADNSWJ3.js";
4
+ import "./chunk-Z6RH6DFP.js";
5
+ import "./chunk-WGLVDEZC.js";
6
6
  import "./chunk-3MZOEZUH.js";
7
7
  import "./chunk-F7R3QKHP.js";
8
8
  import "./chunk-Q3GIFHIQ.js";
@@ -6,10 +6,10 @@ import {
6
6
  parallelRunWaves,
7
7
  parallelSchedule,
8
8
  parallelStatus
9
- } from "./chunk-QIGRZP5P.js";
9
+ } from "./chunk-MRCIJKWD.js";
10
10
  import "./chunk-EBHHIUCB.js";
11
- import "./chunk-I2ORQAMH.js";
12
- import "./chunk-DFDEEMQU.js";
11
+ import "./chunk-Z6RH6DFP.js";
12
+ import "./chunk-WGLVDEZC.js";
13
13
  import "./chunk-3MZOEZUH.js";
14
14
  import "./chunk-F7R3QKHP.js";
15
15
  import "./chunk-Q3GIFHIQ.js";
@@ -3,8 +3,8 @@ import {
3
3
  loadAtom,
4
4
  parseAtomDescription,
5
5
  plan
6
- } from "./chunk-I2ORQAMH.js";
7
- import "./chunk-DFDEEMQU.js";
6
+ } from "./chunk-Z6RH6DFP.js";
7
+ import "./chunk-WGLVDEZC.js";
8
8
  import "./chunk-3MZOEZUH.js";
9
9
  import "./chunk-F7R3QKHP.js";
10
10
  import "./chunk-Q3GIFHIQ.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  show
3
- } from "./chunk-RS3FR4UB.js";
4
- import "./chunk-I2ORQAMH.js";
5
- import "./chunk-DFDEEMQU.js";
3
+ } from "./chunk-LRNXR7DL.js";
4
+ import "./chunk-Z6RH6DFP.js";
5
+ import "./chunk-WGLVDEZC.js";
6
6
  import "./chunk-3MZOEZUH.js";
7
7
  import "./chunk-F7R3QKHP.js";
8
8
  import "./chunk-Q3GIFHIQ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archondev",
3
- "version": "2.19.28",
3
+ "version": "2.19.29",
4
4
  "description": "Local-first AI-powered development governance system",
5
5
  "main": "dist/index.js",
6
6
  "bin": {