archondev 2.19.18 → 2.19.22
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/chunk-3XEHZYXJ.js +169 -0
- package/dist/index.js +750 -1130
- package/dist/show-CXJPLCXD.js +19 -0
- package/package.json +2 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
loadAtom
|
|
3
|
+
} from "./chunk-PSUBO3TR.js";
|
|
4
|
+
|
|
5
|
+
// src/cli/show.ts
|
|
6
|
+
import chalk from "chalk";
|
|
7
|
+
var STATUS_COLORS = {
|
|
8
|
+
DRAFT: chalk.gray,
|
|
9
|
+
READY: chalk.blue,
|
|
10
|
+
IN_PROGRESS: chalk.yellow,
|
|
11
|
+
TESTING: chalk.cyan,
|
|
12
|
+
DONE: chalk.green,
|
|
13
|
+
FAILED: chalk.red,
|
|
14
|
+
BLOCKED: chalk.magenta
|
|
15
|
+
};
|
|
16
|
+
async function show(atomId) {
|
|
17
|
+
const atom = await loadAtom(atomId);
|
|
18
|
+
if (!atom) {
|
|
19
|
+
console.error(chalk.red(`Atom ${atomId} not found.`));
|
|
20
|
+
console.log(chalk.dim('Use "archon list" to see available atoms.'));
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
const colorFn = STATUS_COLORS[atom.status] ?? chalk.white;
|
|
24
|
+
console.log("");
|
|
25
|
+
console.log(chalk.bold(`Atom: ${atom.externalId}`));
|
|
26
|
+
console.log(chalk.dim("\u2550".repeat(60)));
|
|
27
|
+
console.log("");
|
|
28
|
+
console.log(chalk.bold("Title:"), atom.title);
|
|
29
|
+
if (atom.description) {
|
|
30
|
+
console.log(chalk.bold("Description:"), atom.description);
|
|
31
|
+
}
|
|
32
|
+
console.log(chalk.bold("Status:"), colorFn(atom.status));
|
|
33
|
+
console.log(chalk.bold("Priority:"), atom.priority);
|
|
34
|
+
console.log(chalk.bold("Created:"), formatDateTime(atom.createdAt));
|
|
35
|
+
console.log(chalk.bold("Updated:"), formatDateTime(atom.updatedAt));
|
|
36
|
+
if (atom.goals && atom.goals.length > 0) {
|
|
37
|
+
console.log("");
|
|
38
|
+
console.log(chalk.bold("Goals:"));
|
|
39
|
+
for (const goal of atom.goals) {
|
|
40
|
+
console.log(` \u2022 ${goal}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (atom.acceptanceCriteria && atom.acceptanceCriteria.length > 0) {
|
|
44
|
+
console.log("");
|
|
45
|
+
console.log(chalk.bold("Acceptance Criteria:"));
|
|
46
|
+
for (let i = 0; i < atom.acceptanceCriteria.length; i++) {
|
|
47
|
+
console.log(` ${i + 1}. ${atom.acceptanceCriteria[i]}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (atom.tags && atom.tags.length > 0) {
|
|
51
|
+
console.log("");
|
|
52
|
+
console.log(chalk.bold("Tags:"), atom.tags.join(", "));
|
|
53
|
+
}
|
|
54
|
+
if (atom.plan) {
|
|
55
|
+
console.log("");
|
|
56
|
+
console.log(chalk.bold("Implementation Plan:"));
|
|
57
|
+
console.log(chalk.dim("\u2500".repeat(40)));
|
|
58
|
+
console.log(chalk.bold("Steps:"));
|
|
59
|
+
for (let i = 0; i < atom.plan.steps.length; i++) {
|
|
60
|
+
console.log(` ${i + 1}. ${atom.plan.steps[i]}`);
|
|
61
|
+
}
|
|
62
|
+
if (atom.plan.files_to_modify.length > 0) {
|
|
63
|
+
console.log("");
|
|
64
|
+
console.log(chalk.bold("Files to modify:"));
|
|
65
|
+
for (const file of atom.plan.files_to_modify) {
|
|
66
|
+
console.log(` \u2022 ${file}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (atom.plan.dependencies.length > 0) {
|
|
70
|
+
console.log("");
|
|
71
|
+
console.log(chalk.bold("Dependencies:"));
|
|
72
|
+
for (const dep of atom.plan.dependencies) {
|
|
73
|
+
console.log(` \u2022 ${dep}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (atom.plan.risks.length > 0) {
|
|
77
|
+
console.log("");
|
|
78
|
+
console.log(chalk.bold("Risks:"));
|
|
79
|
+
for (const risk of atom.plan.risks) {
|
|
80
|
+
console.log(chalk.yellow(` [!] ${risk}`));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
console.log("");
|
|
84
|
+
console.log(chalk.bold("Estimated Complexity:"), atom.plan.estimated_complexity);
|
|
85
|
+
}
|
|
86
|
+
if (atom.status === "FAILED" && atom.errorMessage) {
|
|
87
|
+
console.log("");
|
|
88
|
+
console.log(chalk.bold("Error:"));
|
|
89
|
+
console.log(chalk.red(` ${atom.errorMessage}`));
|
|
90
|
+
}
|
|
91
|
+
if (atom.retryCount > 0) {
|
|
92
|
+
console.log("");
|
|
93
|
+
console.log(chalk.bold("Retry Count:"), chalk.yellow(String(atom.retryCount)));
|
|
94
|
+
}
|
|
95
|
+
if (atom.ownershipPaths && atom.ownershipPaths.length > 0) {
|
|
96
|
+
console.log("");
|
|
97
|
+
console.log(chalk.bold("Ownership Paths:"));
|
|
98
|
+
for (const path of atom.ownershipPaths) {
|
|
99
|
+
console.log(` \u2022 ${path}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (atom.diffContract) {
|
|
103
|
+
console.log("");
|
|
104
|
+
console.log(chalk.bold("Diff Contract:"));
|
|
105
|
+
if (atom.diffContract.allowed_paths.length > 0) {
|
|
106
|
+
console.log(chalk.dim(" Allowed paths:"));
|
|
107
|
+
for (const path of atom.diffContract.allowed_paths) {
|
|
108
|
+
console.log(` \u2713 ${path}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (atom.diffContract.forbidden_paths.length > 0) {
|
|
112
|
+
console.log(chalk.dim(" Forbidden paths:"));
|
|
113
|
+
for (const path of atom.diffContract.forbidden_paths) {
|
|
114
|
+
console.log(chalk.red(` \u2717 ${path}`));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (atom.context && Object.keys(atom.context).length > 0) {
|
|
119
|
+
console.log("");
|
|
120
|
+
console.log(chalk.bold("Context:"));
|
|
121
|
+
if (atom.context.relevantFiles && atom.context.relevantFiles.length > 0) {
|
|
122
|
+
console.log(chalk.dim(" Relevant files:"));
|
|
123
|
+
for (const file of atom.context.relevantFiles) {
|
|
124
|
+
console.log(` \u2022 ${file}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (atom.context.recentLearnings && atom.context.recentLearnings.length > 0) {
|
|
128
|
+
console.log(chalk.dim(" Recent learnings:"));
|
|
129
|
+
for (const learning of atom.context.recentLearnings) {
|
|
130
|
+
console.log(` \u2022 ${learning}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
console.log("");
|
|
135
|
+
console.log(chalk.dim("\u2500".repeat(60)));
|
|
136
|
+
console.log(chalk.bold("Next Steps:"));
|
|
137
|
+
switch (atom.status) {
|
|
138
|
+
case "DRAFT":
|
|
139
|
+
console.log(chalk.dim(` Run "archon plan ${atom.externalId} --continue" to finalize the plan`));
|
|
140
|
+
break;
|
|
141
|
+
case "READY":
|
|
142
|
+
console.log(chalk.dim(` Run "archon execute ${atom.externalId}" to implement`));
|
|
143
|
+
break;
|
|
144
|
+
case "IN_PROGRESS":
|
|
145
|
+
console.log(chalk.dim(" Execution is in progress..."));
|
|
146
|
+
break;
|
|
147
|
+
case "TESTING":
|
|
148
|
+
console.log(chalk.dim(" Waiting for quality gates to complete..."));
|
|
149
|
+
break;
|
|
150
|
+
case "DONE":
|
|
151
|
+
console.log(chalk.green(" \u2713 Atom completed successfully!"));
|
|
152
|
+
break;
|
|
153
|
+
case "FAILED":
|
|
154
|
+
console.log(chalk.dim(` Review the error and run "archon execute ${atom.externalId}" to retry`));
|
|
155
|
+
break;
|
|
156
|
+
case "BLOCKED":
|
|
157
|
+
console.log(chalk.dim(" This atom is blocked. Manual intervention required."));
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
console.log("");
|
|
161
|
+
}
|
|
162
|
+
function formatDateTime(date) {
|
|
163
|
+
const d = typeof date === "string" ? new Date(date) : date;
|
|
164
|
+
return d.toLocaleString();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export {
|
|
168
|
+
show
|
|
169
|
+
};
|