steroids-cli 0.8.13 → 0.8.15

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/README.md +2 -2
  2. package/dist/cleanup/directory-size.d.ts +39 -0
  3. package/dist/cleanup/directory-size.d.ts.map +1 -0
  4. package/dist/cleanup/directory-size.js +130 -0
  5. package/dist/cleanup/directory-size.js.map +1 -0
  6. package/dist/cleanup/text-logs.d.ts +22 -0
  7. package/dist/cleanup/text-logs.d.ts.map +1 -0
  8. package/dist/cleanup/text-logs.js +118 -0
  9. package/dist/cleanup/text-logs.js.map +1 -0
  10. package/dist/commands/about.d.ts +1 -2
  11. package/dist/commands/about.d.ts.map +1 -1
  12. package/dist/commands/about.js +3 -251
  13. package/dist/commands/about.js.map +1 -1
  14. package/dist/commands/llm.d.ts.map +1 -1
  15. package/dist/commands/llm.js +104 -3
  16. package/dist/commands/llm.js.map +1 -1
  17. package/dist/commands/loop-phases.d.ts +13 -2
  18. package/dist/commands/loop-phases.d.ts.map +1 -1
  19. package/dist/commands/loop-phases.js +42 -0
  20. package/dist/commands/loop-phases.js.map +1 -1
  21. package/dist/commands/loop.d.ts.map +1 -1
  22. package/dist/commands/loop.js +29 -3
  23. package/dist/commands/loop.js.map +1 -1
  24. package/dist/database/queries.d.ts +29 -0
  25. package/dist/database/queries.d.ts.map +1 -1
  26. package/dist/database/queries.js +54 -0
  27. package/dist/database/queries.js.map +1 -1
  28. package/dist/health/stuck-task-detector.d.ts +1 -1
  29. package/dist/health/stuck-task-detector.d.ts.map +1 -1
  30. package/dist/health/stuck-task-detector.js.map +1 -1
  31. package/dist/hooks/events.d.ts +10 -1
  32. package/dist/hooks/events.d.ts.map +1 -1
  33. package/dist/hooks/events.js +17 -1
  34. package/dist/hooks/events.js.map +1 -1
  35. package/dist/hooks/integration.d.ts +15 -1
  36. package/dist/hooks/integration.d.ts.map +1 -1
  37. package/dist/hooks/integration.js +18 -0
  38. package/dist/hooks/integration.js.map +1 -1
  39. package/dist/hooks/payload.d.ts +45 -1
  40. package/dist/hooks/payload.d.ts.map +1 -1
  41. package/dist/hooks/payload.js +45 -0
  42. package/dist/hooks/payload.js.map +1 -1
  43. package/dist/hooks/templates.d.ts +7 -0
  44. package/dist/hooks/templates.d.ts.map +1 -1
  45. package/dist/hooks/templates.js +40 -0
  46. package/dist/hooks/templates.js.map +1 -1
  47. package/dist/index.js +2 -2
  48. package/dist/providers/interface.d.ts +15 -1
  49. package/dist/providers/interface.d.ts.map +1 -1
  50. package/dist/providers/interface.js +74 -0
  51. package/dist/providers/interface.js.map +1 -1
  52. package/dist/runners/credit-pause.d.ts +44 -0
  53. package/dist/runners/credit-pause.d.ts.map +1 -0
  54. package/dist/runners/credit-pause.js +137 -0
  55. package/dist/runners/credit-pause.js.map +1 -0
  56. package/dist/runners/daemon.d.ts.map +1 -1
  57. package/dist/runners/daemon.js +3 -0
  58. package/dist/runners/daemon.js.map +1 -1
  59. package/dist/runners/orchestrator-loop.d.ts +1 -0
  60. package/dist/runners/orchestrator-loop.d.ts.map +1 -1
  61. package/dist/runners/orchestrator-loop.js +63 -5
  62. package/dist/runners/orchestrator-loop.js.map +1 -1
  63. package/dist/runners/projects.d.ts +5 -0
  64. package/dist/runners/projects.d.ts.map +1 -1
  65. package/dist/runners/projects.js +15 -0
  66. package/dist/runners/projects.js.map +1 -1
  67. package/package.json +1 -1
package/README.md CHANGED
@@ -246,9 +246,9 @@ That's it. Open your browser at:
246
246
  | Command | Description |
247
247
  |---------|-------------|
248
248
  | `steroids init` | Initialize Steroids in current directory |
249
- | `steroids about` | Explain what Steroids is (for LLMs discovering the tool) |
250
- | `steroids llm` | Compact instructions for LLM agents (call when context lost) |
249
+ | `steroids llm` | Quick reference for LLM agents (project setup, commands, task flow) |
251
250
  | `steroids llm --context` | Include current project context (active tasks, runners) |
251
+ | `steroids about` | Alias for `steroids llm` |
252
252
  | `steroids loop` | Run the coder/reviewer loop interactively |
253
253
  | `steroids loop --once` | Run one iteration only |
254
254
 
@@ -0,0 +1,39 @@
1
+ export interface StorageBreakdown {
2
+ total_bytes: number;
3
+ total_human: string;
4
+ breakdown: {
5
+ database: {
6
+ bytes: number;
7
+ human: string;
8
+ };
9
+ invocations: {
10
+ bytes: number;
11
+ human: string;
12
+ file_count: number;
13
+ };
14
+ logs: {
15
+ bytes: number;
16
+ human: string;
17
+ file_count: number;
18
+ };
19
+ backups: {
20
+ bytes: number;
21
+ human: string;
22
+ backup_count: number;
23
+ };
24
+ other: {
25
+ bytes: number;
26
+ human: string;
27
+ };
28
+ };
29
+ clearable_bytes: number;
30
+ clearable_human: string;
31
+ threshold_warning: 'orange' | 'red' | null;
32
+ }
33
+ export declare function formatBytes(bytes: number): string;
34
+ export declare function sumDirectorySize(dirPath: string, recursive?: boolean): Promise<{
35
+ bytes: number;
36
+ fileCount: number;
37
+ }>;
38
+ export declare function getStorageBreakdown(steroidsDir: string): Promise<StorageBreakdown>;
39
+ //# sourceMappingURL=directory-size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-size.d.ts","sourceRoot":"","sources":["../../src/cleanup/directory-size.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE;QACT,QAAQ,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C,WAAW,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;QAClE,IAAI,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3D,OAAO,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAC;QAChE,KAAK,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACzC,CAAC;IACF,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,QAAQ,GAAG,KAAK,GAAG,IAAI,CAAC;CAC5C;AAQD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD;AAMD,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,MAAM,EACf,SAAS,UAAQ,GAChB,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAgB/C;AAgBD,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA+CxF"}
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatBytes = formatBytes;
4
+ exports.sumDirectorySize = sumDirectorySize;
5
+ exports.getStorageBreakdown = getStorageBreakdown;
6
+ /**
7
+ * Compute storage breakdown of a project's .steroids/ directory.
8
+ * Scans known subpaths only (not full recursive traversal) for speed.
9
+ * All fs operations are async — safe for use in API handlers.
10
+ */
11
+ const node_fs_1 = require("node:fs");
12
+ const node_path_1 = require("node:path");
13
+ const MB = 1024 * 1024;
14
+ const THRESHOLD_ORANGE = 50 * MB;
15
+ const THRESHOLD_RED = 100 * MB;
16
+ const DB_FILES = ['steroids.db', 'steroids.db-wal', 'steroids.db-shm'];
17
+ const KNOWN_PATHS = new Set([...DB_FILES, 'invocations', 'logs', 'backup']);
18
+ function formatBytes(bytes) {
19
+ if (bytes < 1024)
20
+ return `${bytes} B`;
21
+ if (bytes < MB)
22
+ return `${(bytes / 1024).toFixed(1)} KB`;
23
+ if (bytes < 1024 * MB)
24
+ return `${(bytes / MB).toFixed(1)} MB`;
25
+ return `${(bytes / (1024 * MB)).toFixed(1)} GB`;
26
+ }
27
+ async function safeStatSize(filePath) {
28
+ try {
29
+ return (await node_fs_1.promises.stat(filePath)).size;
30
+ }
31
+ catch {
32
+ return 0;
33
+ }
34
+ }
35
+ async function sumDirectorySize(dirPath, recursive = false) {
36
+ let bytes = 0;
37
+ let fileCount = 0;
38
+ let entries;
39
+ try {
40
+ entries = await node_fs_1.promises.readdir(dirPath, { withFileTypes: true });
41
+ }
42
+ catch {
43
+ return { bytes: 0, fileCount: 0 };
44
+ }
45
+ for (const entry of entries) {
46
+ const fullPath = (0, node_path_1.join)(dirPath, entry.name);
47
+ if (entry.isFile()) {
48
+ try {
49
+ const st = await node_fs_1.promises.stat(fullPath);
50
+ bytes += st.size;
51
+ fileCount++;
52
+ }
53
+ catch { /* tolerate */ }
54
+ }
55
+ else if (entry.isDirectory() && recursive) {
56
+ const sub = await sumDirectorySize(fullPath, true);
57
+ bytes += sub.bytes;
58
+ fileCount += sub.fileCount;
59
+ }
60
+ }
61
+ return { bytes, fileCount };
62
+ }
63
+ function emptyBreakdown() {
64
+ return {
65
+ total_bytes: 0, total_human: '0 B',
66
+ breakdown: {
67
+ database: { bytes: 0, human: '0 B' },
68
+ invocations: { bytes: 0, human: '0 B', file_count: 0 },
69
+ logs: { bytes: 0, human: '0 B', file_count: 0 },
70
+ backups: { bytes: 0, human: '0 B', backup_count: 0 },
71
+ other: { bytes: 0, human: '0 B' },
72
+ },
73
+ clearable_bytes: 0, clearable_human: '0 B', threshold_warning: null,
74
+ };
75
+ }
76
+ async function getStorageBreakdown(steroidsDir) {
77
+ try {
78
+ await node_fs_1.promises.access(steroidsDir);
79
+ }
80
+ catch {
81
+ return emptyBreakdown();
82
+ }
83
+ const dbSizes = await Promise.all(DB_FILES.map(f => safeStatSize((0, node_path_1.join)(steroidsDir, f))));
84
+ const dbBytes = dbSizes.reduce((a, b) => a + b, 0);
85
+ const [invocations, logs, backups] = await Promise.all([
86
+ sumDirectorySize((0, node_path_1.join)(steroidsDir, 'invocations'), false),
87
+ sumDirectorySize((0, node_path_1.join)(steroidsDir, 'logs'), true),
88
+ sumDirectorySize((0, node_path_1.join)(steroidsDir, 'backup'), true),
89
+ ]);
90
+ let backupCount = 0;
91
+ try {
92
+ const be = await node_fs_1.promises.readdir((0, node_path_1.join)(steroidsDir, 'backup'), { withFileTypes: true });
93
+ backupCount = be.filter(e => e.isDirectory()).length;
94
+ }
95
+ catch { /* no backup dir */ }
96
+ let otherBytes = 0;
97
+ try {
98
+ const allEntries = await node_fs_1.promises.readdir(steroidsDir, { withFileTypes: true });
99
+ for (const entry of allEntries) {
100
+ if (KNOWN_PATHS.has(entry.name))
101
+ continue;
102
+ const fullPath = (0, node_path_1.join)(steroidsDir, entry.name);
103
+ if (entry.isFile())
104
+ otherBytes += await safeStatSize(fullPath);
105
+ else if (entry.isDirectory())
106
+ otherBytes += (await sumDirectorySize(fullPath, true)).bytes;
107
+ }
108
+ }
109
+ catch { /* tolerate */ }
110
+ const totalBytes = dbBytes + invocations.bytes + logs.bytes + backups.bytes + otherBytes;
111
+ const clearableBytes = invocations.bytes + logs.bytes;
112
+ let warning = null;
113
+ if (clearableBytes >= THRESHOLD_RED)
114
+ warning = 'red';
115
+ else if (clearableBytes >= THRESHOLD_ORANGE)
116
+ warning = 'orange';
117
+ return {
118
+ total_bytes: totalBytes, total_human: formatBytes(totalBytes),
119
+ breakdown: {
120
+ database: { bytes: dbBytes, human: formatBytes(dbBytes) },
121
+ invocations: { bytes: invocations.bytes, human: formatBytes(invocations.bytes), file_count: invocations.fileCount },
122
+ logs: { bytes: logs.bytes, human: formatBytes(logs.bytes), file_count: logs.fileCount },
123
+ backups: { bytes: backups.bytes, human: formatBytes(backups.bytes), backup_count: backupCount },
124
+ other: { bytes: otherBytes, human: formatBytes(otherBytes) },
125
+ },
126
+ clearable_bytes: clearableBytes, clearable_human: formatBytes(clearableBytes),
127
+ threshold_warning: warning,
128
+ };
129
+ }
130
+ //# sourceMappingURL=directory-size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-size.js","sourceRoot":"","sources":["../../src/cleanup/directory-size.ts"],"names":[],"mappings":";;AA6BA,kCAKC;AAMD,4CAmBC;AAgBD,kDA+CC;AA1HD;;;;GAIG;AACH,qCAAyC;AACzC,yCAAiC;AAiBjC,MAAM,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AACvB,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,CAAC;AACjC,MAAM,aAAa,GAAG,GAAG,GAAG,EAAE,CAAC;AAC/B,MAAM,QAAQ,GAAG,CAAC,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;AACvE,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAE5E,SAAgB,WAAW,CAAC,KAAa;IACvC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IACzD,IAAI,KAAK,GAAG,IAAI,GAAG,EAAE;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC9D,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAClD,CAAC;AAED,KAAK,UAAU,YAAY,CAAC,QAAgB;IAC1C,IAAI,CAAC;QAAC,OAAO,CAAC,MAAM,kBAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC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Retention cleanup for date-based text logs.
3
+ *
4
+ * These are stored in directories at:
5
+ * .steroids/logs/YYYY-MM-DD/
6
+ */
7
+ import type { CleanupInvocationLogsResult } from './invocation-logs.js';
8
+ export type CleanupTextLogsResult = CleanupInvocationLogsResult;
9
+ export interface CleanupTextLogsOptions {
10
+ retentionDays?: number;
11
+ dryRun?: boolean;
12
+ nowMs?: number;
13
+ }
14
+ /**
15
+ * Delete old `.steroids/logs/YYYY-MM-DD/` directories based on date in name.
16
+ *
17
+ * Deletes entire date directories whose date is older than the retention window.
18
+ * Skips files modified in the last 60 seconds (runner may be writing).
19
+ * Tolerates ENOENT errors (files may disappear during cleanup).
20
+ */
21
+ export declare function cleanupTextLogs(projectPath: string, options?: CleanupTextLogsOptions): CleanupTextLogsResult;
22
+ //# sourceMappingURL=text-logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-logs.d.ts","sourceRoot":"","sources":["../../src/cleanup/text-logs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAKxE,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAEhE,MAAM,WAAW,sBAAsB;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAkBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,sBAA2B,GACnC,qBAAqB,CAgFvB"}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ /**
3
+ * Retention cleanup for date-based text logs.
4
+ *
5
+ * These are stored in directories at:
6
+ * .steroids/logs/YYYY-MM-DD/
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.cleanupTextLogs = cleanupTextLogs;
10
+ const node_fs_1 = require("node:fs");
11
+ const node_path_1 = require("node:path");
12
+ const DAY_MS = 24 * 60 * 60 * 1000;
13
+ const RECENTLY_MODIFIED_MS = 60_000; // 60 seconds
14
+ /**
15
+ * Parse a YYYY-MM-DD directory name to a Date.
16
+ * Returns null if the name doesn't match the expected format.
17
+ */
18
+ function parseDateDir(name) {
19
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(name);
20
+ if (!match)
21
+ return null;
22
+ const year = Number(match[1]);
23
+ const month = Number(match[2]) - 1;
24
+ const day = Number(match[3]);
25
+ const d = new Date(year, month, day);
26
+ // Round-trip check: reject non-calendar dates like 2024-13-40
27
+ if (d.getFullYear() !== year || d.getMonth() !== month || d.getDate() !== day)
28
+ return null;
29
+ return d;
30
+ }
31
+ /**
32
+ * Delete old `.steroids/logs/YYYY-MM-DD/` directories based on date in name.
33
+ *
34
+ * Deletes entire date directories whose date is older than the retention window.
35
+ * Skips files modified in the last 60 seconds (runner may be writing).
36
+ * Tolerates ENOENT errors (files may disappear during cleanup).
37
+ */
38
+ function cleanupTextLogs(projectPath, options = {}) {
39
+ const retentionDays = options.retentionDays ?? 7;
40
+ const nowMs = options.nowMs ?? Date.now();
41
+ const cutoffMs = nowMs - retentionDays * DAY_MS;
42
+ if (retentionDays <= 0) {
43
+ return { scannedFiles: 0, deletedFiles: 0, freedBytes: 0, cutoffMs };
44
+ }
45
+ const logsDir = (0, node_path_1.join)(projectPath, '.steroids', 'logs');
46
+ if (!(0, node_fs_1.existsSync)(logsDir)) {
47
+ return { scannedFiles: 0, deletedFiles: 0, freedBytes: 0, cutoffMs };
48
+ }
49
+ let scannedFiles = 0;
50
+ let deletedFiles = 0;
51
+ let freedBytes = 0;
52
+ try {
53
+ const dateDirs = (0, node_fs_1.readdirSync)(logsDir, { withFileTypes: true });
54
+ for (const dirEntry of dateDirs) {
55
+ if (!dirEntry.isDirectory())
56
+ continue;
57
+ const dirDate = parseDateDir(dirEntry.name);
58
+ if (!dirDate)
59
+ continue;
60
+ // Check if entire directory is older than retention
61
+ if (dirDate.getTime() >= cutoffMs)
62
+ continue;
63
+ const dirPath = (0, node_path_1.join)(logsDir, dirEntry.name);
64
+ let files;
65
+ try {
66
+ files = (0, node_fs_1.readdirSync)(dirPath, { withFileTypes: true });
67
+ }
68
+ catch {
69
+ continue; // ENOENT — directory may have been removed
70
+ }
71
+ let allDeleted = true;
72
+ for (const file of files) {
73
+ if (!file.isFile()) {
74
+ allDeleted = false;
75
+ continue;
76
+ }
77
+ scannedFiles++;
78
+ const filePath = (0, node_path_1.join)(dirPath, file.name);
79
+ let st;
80
+ try {
81
+ st = (0, node_fs_1.statSync)(filePath);
82
+ }
83
+ catch {
84
+ continue; // ENOENT
85
+ }
86
+ // Skip recently modified files (runner may be writing)
87
+ if (nowMs - st.mtimeMs < RECENTLY_MODIFIED_MS) {
88
+ allDeleted = false;
89
+ continue;
90
+ }
91
+ deletedFiles++;
92
+ freedBytes += st.size;
93
+ if (!options.dryRun) {
94
+ try {
95
+ (0, node_fs_1.unlinkSync)(filePath);
96
+ }
97
+ catch {
98
+ allDeleted = false; // deletion failed, don't remove parent
99
+ }
100
+ }
101
+ }
102
+ // Try to remove the empty date directory (best-effort)
103
+ if (allDeleted && !options.dryRun) {
104
+ try {
105
+ (0, node_fs_1.rmdirSync)(dirPath);
106
+ }
107
+ catch {
108
+ // Directory not empty or already gone — tolerate
109
+ }
110
+ }
111
+ }
112
+ }
113
+ catch {
114
+ return { scannedFiles: 0, deletedFiles: 0, freedBytes: 0, cutoffMs };
115
+ }
116
+ return { scannedFiles, deletedFiles, freedBytes, cutoffMs };
117
+ }
118
+ //# sourceMappingURL=text-logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-logs.js","sourceRoot":"","sources":["../../src/cleanup/text-logs.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAwCH,0CAmFC;AAzHD,qCAAmF;AACnF,yCAAiC;AAGjC,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACnC,M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command
4
3
  */
5
4
  import type { GlobalFlags } from '../cli/flags.js';
6
5
  export declare function aboutCommand(args: string[], flags: GlobalFlags): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../src/commands/about.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA4MnD,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA2EpF"}
1
+ {"version":3,"file":"about.d.ts","sourceRoot":"","sources":["../../src/commands/about.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF"}
@@ -1,259 +1,11 @@
1
1
  "use strict";
2
2
  /**
3
- * About Command
4
- * Explains what Steroids is for LLMs discovering the tool
3
+ * About Command - Alias for llm command
5
4
  */
6
5
  Object.defineProperty(exports, "__esModule", { value: true });
7
6
  exports.aboutCommand = aboutCommand;
8
- const output_js_1 = require("../cli/output.js");
9
- const help_js_1 = require("../cli/help.js");
10
- const ABOUT_TEXT = `
11
- STEROIDS - Automated Task Execution System
12
- ===========================================
13
-
14
- Steroids is an AI-powered task orchestration system that manages software
15
- development tasks through a coder/reviewer loop. It enables LLMs to work
16
- autonomously on codebases while maintaining quality through automated review.
17
-
18
- CORE CONCEPT
19
- ------------
20
- Tasks are organized into sections and processed by two AI roles:
21
-
22
- 1. CODER: Implements tasks by writing code, running builds, and tests
23
- 2. REVIEWER: Reviews completed work, approves or rejects with feedback
24
-
25
- When rejected, tasks return to the coder with notes. This loop continues
26
- until approval or a dispute is raised (after 15 rejections).
27
-
28
- HOW IT WORKS
29
- ------------
30
- 1. Human creates tasks with specifications in markdown files
31
- 2. Runner daemon picks up pending tasks in priority order
32
- 3. Coder AI implements the task following the specification
33
- 4. Reviewer AI evaluates the implementation
34
- 5. On approval: task marked complete, next task starts
35
- 6. On rejection: task returns to coder with feedback
36
- 7. After 15 rejections: dispute raised for human resolution
37
-
38
- KEY COMMANDS FOR LLMs
39
- ---------------------
40
- steroids tasks list List pending tasks
41
- steroids tasks list --status all Show all tasks with status
42
- steroids sections list Show task sections
43
- steroids tasks update <id> --status review Submit work for review
44
- steroids tasks approve <id> Approve as reviewer
45
- steroids tasks reject <id> --notes "..." Reject with feedback
46
- steroids dispute create Raise a dispute
47
-
48
- TASK LIFECYCLE
49
- --------------
50
- pending -> in_progress -> review -> completed
51
- ^ |
52
- | v (rejected)
53
- +----------+
54
-
55
- SPECIFICATIONS
56
- --------------
57
- Each task has a sourceFile pointing to a markdown specification.
58
- The coder MUST follow this specification exactly.
59
- The reviewer MUST verify the implementation matches the spec.
60
-
61
- PROJECT SETUP - HOW TO STRUCTURE WORK
62
- -------------------------------------
63
- Steroids works best when projects are structured correctly. Think of it like
64
- building a house: sections are rooms, tasks are individual construction steps.
65
-
66
- SECTIONS = Features or Functional Areas
67
- - Each section represents ONE cohesive piece of functionality
68
- - Sections should be independent enough to be worked on in isolation
69
- - Name sections clearly: "Phase 1: User Authentication", "Phase 2: Dashboard"
70
- - Sections have priorities and can depend on other sections
71
-
72
- TASKS = Small, Atomic Implementation Steps
73
- - Each task should be completable in ONE focused session (15-60 min of AI work)
74
- - Tasks should do ONE thing well - if you say "and" you might need two tasks
75
- - Tasks must have a clear specification file explaining exactly what to build
76
- - Tasks are ordered within sections - earlier tasks may set up later ones
77
-
78
- EXAMPLE FROM THIS PROJECT (steroids-cli):
79
- Section: "Phase 0.7: Section Focus"
80
- Tasks:
81
- 1. Add --section flag to loop command
82
- 2. Add sectionId parameter to TaskSelectionOptions
83
- 3. Update task selection queries to filter by section
84
- 4. Update loop display to show focused section
85
- 5. Add section validation
86
-
87
- Each task is small and specific. Together they implement "section focus."
88
-
89
- WRITING GOOD SPECIFICATIONS:
90
- - Create a specs/ directory with markdown files
91
- - Each spec should include: purpose, requirements, examples, edge cases
92
- - Reference existing code patterns the implementation should follow
93
- - Include acceptance criteria - how do we know it's done?
94
-
95
- EXAMPLE SPEC STRUCTURE (specs/feature-name.md):
96
- # Feature Name
97
-
98
- ## Overview
99
- What this feature does and why.
100
-
101
- ## Requirements
102
- - Specific requirement 1
103
- - Specific requirement 2
104
-
105
- ## Implementation Notes
106
- - Follow pattern in src/existing/similar.ts
107
- - Use existing utility from src/utils/helper.ts
108
-
109
- ## Examples
110
- \`\`\`bash
111
- steroids command --flag value
112
- # Expected output...
113
- \`\`\`
114
-
115
- ## Acceptance Criteria
116
- - [ ] Command works as shown in examples
117
- - [ ] Tests pass
118
- - [ ] Documentation updated
119
-
120
- ADDING TASKS
121
- -----------
122
- steroids tasks add <title> --section <id> --source <spec-file> [options]
123
-
124
- Required:
125
- --section <id> Section the task belongs to
126
- --source <file> Specification markdown file for the coder/reviewer
127
-
128
- Optional:
129
- --file <path> Anchor task to a specific file (must be committed in git)
130
- --line <number> Line number in the anchored file (requires --file)
131
- --feedback Add to "Needs User Input" section (skips --section/--source)
132
-
133
- When --file is used, Steroids validates the file is tracked and clean in git,
134
- then auto-captures the commit SHA and content hash. The coder/reviewer prompts
135
- will reference this exact file location.
136
-
137
- When --feedback is used, the task goes to a special skipped section called
138
- "Needs User Input" that the runner ignores. Use for advisory items, disputes,
139
- or anything needing human review.
140
-
141
- Examples:
142
- steroids tasks add "Implement login" --section abc123 --source specs/login.md
143
- steroids tasks add "Fix null check" --section abc123 --source spec.md --file src/utils.ts --line 42
144
- steroids tasks add "Review execSync usage" --feedback
145
-
146
- INITIALIZING A PROJECT:
147
- 1. steroids init # Creates .steroids/ directory
148
- 2. Create specs/ with your specifications
149
- 3. steroids sections add "Phase 1: Feature Name"
150
- 4. steroids tasks add "Task title" --section <id> --source specs/spec.md
151
- 5. steroids loop # Start processing
152
-
153
- IMPORTANT RULES
154
- ---------------
155
- - Always run build AND tests before submitting for review
156
- - Read the task specification thoroughly before implementing
157
- - Make small, focused commits
158
- - Never modify code outside the task scope
159
- - If stuck, create a dispute rather than guessing
160
-
161
- For full documentation:
162
- - CLI: steroids --help
163
- - Tasks: steroids tasks --help
164
- - Config: steroids config show
165
- `;
166
- const HELP = (0, help_js_1.generateHelp)({
167
- command: 'about',
168
- description: 'Explains what Steroids is and how it works',
169
- details: `Designed for LLMs discovering this tool for the first time.
170
- Provides comprehensive overview of architecture, workflow, and best practices.
171
- Use --json for structured output optimized for LLM parsing.`,
172
- usage: ['steroids about [options]'],
173
- examples: [
174
- { command: 'steroids about', description: 'Human-readable explanation' },
175
- { command: 'steroids about --json', description: 'Structured JSON for LLM parsing' },
176
- ],
177
- related: [
178
- { command: 'steroids llm', description: 'Compact quick reference when context is lost' },
179
- { command: 'steroids --help', description: 'CLI help with all commands' },
180
- ],
181
- showGlobalOptions: true,
182
- showExitCodes: false,
183
- showEnvVars: false,
184
- });
7
+ const llm_js_1 = require("./llm.js");
185
8
  async function aboutCommand(args, flags) {
186
- const out = (0, output_js_1.createOutput)({ command: 'about', flags });
187
- if (flags.help) {
188
- out.log(HELP);
189
- return;
190
- }
191
- const data = {
192
- name: 'Steroids',
193
- description: 'AI-powered task orchestration with coder/reviewer loop',
194
- version: process.env.npm_package_version ?? '0.0.0',
195
- concept: {
196
- roles: [
197
- { name: 'coder', purpose: 'Implements tasks by writing code, running builds and tests' },
198
- { name: 'reviewer', purpose: 'Reviews completed work, approves or rejects with feedback' },
199
- ],
200
- workflow: [
201
- 'Human creates tasks with specifications',
202
- 'Runner picks up pending tasks',
203
- 'Coder implements following specification',
204
- 'Reviewer evaluates implementation',
205
- 'Approved: task complete, next starts',
206
- 'Rejected: returns to coder with notes',
207
- 'After 15 rejections: dispute raised',
208
- ],
209
- lifecycle: ['pending', 'in_progress', 'review', 'completed'],
210
- },
211
- projectSetup: {
212
- sections: 'Features or functional areas - each represents ONE cohesive piece of functionality',
213
- tasks: 'Small, atomic implementation steps - completable in 15-60 min, does ONE thing well',
214
- specifications: 'Markdown files in specs/ with purpose, requirements, examples, acceptance criteria',
215
- example: {
216
- section: 'Phase 0.7: Section Focus',
217
- tasks: [
218
- 'Add --section flag to loop command',
219
- 'Add sectionId parameter to TaskSelectionOptions',
220
- 'Update task selection queries to filter by section',
221
- 'Update loop display to show focused section',
222
- 'Add section validation',
223
- ],
224
- },
225
- steps: [
226
- 'steroids init - creates .steroids/ directory',
227
- 'Create specs/ with your specifications',
228
- 'steroids sections add "Phase 1: Feature Name"',
229
- 'steroids tasks add "Task title" --section <id> --source specs/spec.md',
230
- 'steroids tasks add "Task title" --section <id> --source spec.md --file src/foo.ts --line 42 (anchor to file)',
231
- 'steroids tasks add "Advisory note" --feedback (skipped section for human review)',
232
- 'steroids loop - start processing',
233
- ],
234
- },
235
- commands: [
236
- { command: 'steroids tasks list', description: 'List pending tasks' },
237
- { command: 'steroids tasks list --status all', description: 'Show all tasks' },
238
- { command: 'steroids sections list', description: 'Show task sections' },
239
- { command: 'steroids tasks update <id> --status review', description: 'Submit for review' },
240
- { command: 'steroids tasks approve <id>', description: 'Approve as reviewer' },
241
- { command: 'steroids tasks reject <id> --notes "..."', description: 'Reject with feedback' },
242
- { command: 'steroids dispute create', description: 'Raise a dispute' },
243
- ],
244
- rules: [
245
- 'Always run build AND tests before submitting for review',
246
- 'Read the task specification thoroughly before implementing',
247
- 'Make small, focused commits',
248
- 'Never modify code outside the task scope',
249
- 'If stuck, create a dispute rather than guessing',
250
- ],
251
- };
252
- if (flags.json) {
253
- out.success(data);
254
- }
255
- else {
256
- out.log(ABOUT_TEXT);
257
- }
9
+ await (0, llm_js_1.llmCommand)(args, flags);
258
10
  }
259
11
  //# sourceMappingURL=about.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"about.js","sourceRoot":"","sources":["../../src/commands/about.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AA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AiB,EAAE;SACvE;QACD,KAAK,EAAE;YACL,yDAAyD;YACzD,4DAA4D;YAC5D,6BAA6B;YAC7B,0CAA0C;YAC1C,iDAAiD;SAClD;KACF,CAAC;IAEF,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACf,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;SAAM,CAAC;QACN,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"about.js","sourceRoot":"","sources":["../../src/commands/about.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,oCAEC;AAJD,qCAAsC;AAE/B,KAAK,UAAU,YAAY,CAAC,IAAc,EAAE,KAAkB;IACnE,MAAM,IAAA,mBAAU,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/commands/llm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAsOnD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA4HlF"}
1
+ {"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/commands/llm.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA6RnD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA4KlF"}