vibe-fabric 0.3.2 → 0.4.0

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 (77) hide show
  1. package/.claude/prompts/analyze/assess.md +208 -0
  2. package/.claude/prompts/analyze/synthesize.md +239 -0
  3. package/.claude/prompts/analyze/task-analyze-repo.md +260 -0
  4. package/.claude/prompts/gaps/assess.md +203 -0
  5. package/.claude/prompts/gaps/synthesize.md +180 -0
  6. package/.claude/prompts/gaps/task-analyze-module.md +198 -0
  7. package/.claude/prompts/prd/assess.md +156 -0
  8. package/.claude/prompts/prd/synthesize.md +191 -0
  9. package/.claude/prompts/prd/task-capture-feature.md +133 -0
  10. package/.claude/prompts/prd/task-deprecate.md +84 -0
  11. package/.claude/prompts/prd/task-document-code.md +110 -0
  12. package/.claude/prompts/prd/task-fix-format.md +102 -0
  13. package/.claude/prompts/prd/task-update-status.md +89 -0
  14. package/.claude/prompts/scope/assess.md +201 -0
  15. package/.claude/prompts/scope/synthesize.md +270 -0
  16. package/.claude/prompts/scope/task-analyze-prd.md +125 -0
  17. package/.claude/prompts/scope/task-check-deps.md +188 -0
  18. package/.claude/prompts/scope/task-create-scope.md +207 -0
  19. package/.claude/prompts/scope/task-recommend.md +146 -0
  20. package/.claude/prompts/scope/task-review-scope.md +191 -0
  21. package/.claude/prompts/scope/task-validate.md +203 -0
  22. package/dist/cli/commands/analyze.d.ts +33 -0
  23. package/dist/cli/commands/analyze.d.ts.map +1 -0
  24. package/dist/cli/commands/analyze.js +243 -0
  25. package/dist/cli/commands/analyze.js.map +1 -0
  26. package/dist/cli/commands/config/get.d.ts +9 -0
  27. package/dist/cli/commands/config/get.d.ts.map +1 -0
  28. package/dist/cli/commands/config/get.js +69 -0
  29. package/dist/cli/commands/config/get.js.map +1 -0
  30. package/dist/cli/commands/config/list.d.ts +24 -0
  31. package/dist/cli/commands/config/list.d.ts.map +1 -0
  32. package/dist/cli/commands/config/list.js +146 -0
  33. package/dist/cli/commands/config/list.js.map +1 -0
  34. package/dist/cli/commands/config/set.d.ts +14 -0
  35. package/dist/cli/commands/config/set.d.ts.map +1 -0
  36. package/dist/cli/commands/config/set.js +111 -0
  37. package/dist/cli/commands/config/set.js.map +1 -0
  38. package/dist/cli/commands/repo/list.d.ts +26 -0
  39. package/dist/cli/commands/repo/list.d.ts.map +1 -0
  40. package/dist/cli/commands/repo/list.js +197 -0
  41. package/dist/cli/commands/repo/list.js.map +1 -0
  42. package/dist/cli/commands/repo/remove.d.ts +29 -0
  43. package/dist/cli/commands/repo/remove.d.ts.map +1 -0
  44. package/dist/cli/commands/repo/remove.js +219 -0
  45. package/dist/cli/commands/repo/remove.js.map +1 -0
  46. package/dist/cli/commands/report.d.ts +16 -0
  47. package/dist/cli/commands/report.d.ts.map +1 -0
  48. package/dist/cli/commands/report.js +160 -0
  49. package/dist/cli/commands/report.js.map +1 -0
  50. package/dist/cli/index.js +14 -0
  51. package/dist/cli/index.js.map +1 -1
  52. package/dist/core/config.d.ts +25 -0
  53. package/dist/core/config.d.ts.map +1 -1
  54. package/dist/core/config.js +77 -0
  55. package/dist/core/config.js.map +1 -1
  56. package/dist/core/project.d.ts.map +1 -1
  57. package/dist/core/project.js +49 -1
  58. package/dist/core/project.js.map +1 -1
  59. package/dist/core/repo/templates/claude-agents.d.ts.map +1 -1
  60. package/dist/core/repo/templates/claude-agents.js +136 -28
  61. package/dist/core/repo/templates/claude-agents.js.map +1 -1
  62. package/dist/core/repo/templates/claude-prompts.d.ts +1 -1
  63. package/dist/core/repo/templates/claude-prompts.d.ts.map +1 -1
  64. package/dist/core/repo/templates/claude-prompts.js +412 -157
  65. package/dist/core/repo/templates/claude-prompts.js.map +1 -1
  66. package/dist/core/repo/templates/claude-scripts.d.ts.map +1 -1
  67. package/dist/core/repo/templates/claude-scripts.js +555 -94
  68. package/dist/core/repo/templates/claude-scripts.js.map +1 -1
  69. package/dist/core/report.d.ts +25 -0
  70. package/dist/core/report.d.ts.map +1 -0
  71. package/dist/core/report.js +702 -0
  72. package/dist/core/report.js.map +1 -0
  73. package/dist/types/report.d.ts +158 -0
  74. package/dist/types/report.d.ts.map +1 -0
  75. package/dist/types/report.js +7 -0
  76. package/dist/types/report.js.map +1 -0
  77. package/package.json +2 -1
@@ -0,0 +1,9 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class ConfigGetCommand extends Command {
3
+ static paths: string[][];
4
+ static usage: import("clipanion").Usage;
5
+ key: string;
6
+ json: boolean;
7
+ execute(): Promise<number>;
8
+ }
9
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAK5C,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C,OAAgB,KAAK,aAAuB;IAE5C,OAAgB,KAAK,4BAclB;IAEH,GAAG,SAAkD;IAErD,IAAI,UAED;IAEG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;CAwDjC"}
@@ -0,0 +1,69 @@
1
+ import { Command, Option } from 'clipanion';
2
+ import chalk from 'chalk';
3
+ import { loadConfig, getConfigValue } from '../../../core/config.js';
4
+ import { findProjectRoot } from '../../../core/project.js';
5
+ export class ConfigGetCommand extends Command {
6
+ static paths = [['config', 'get']];
7
+ static usage = Command.Usage({
8
+ description: 'Get a configuration value',
9
+ details: `
10
+ Retrieves a value from the project configuration (vibe-fabric.toml).
11
+
12
+ Use dot notation to access nested values (e.g., project.name).
13
+ Arrays and objects are automatically output as JSON.
14
+ `,
15
+ examples: [
16
+ ['Get project name', 'vibe config get project.name'],
17
+ ['Get project created date', 'vibe config get project.created'],
18
+ ['Get all repos', 'vibe config get repos'],
19
+ ['Get as JSON', 'vibe config get project --json'],
20
+ ],
21
+ });
22
+ key = Option.String({ required: true, name: 'key' });
23
+ json = Option.Boolean('--json,-j', false, {
24
+ description: 'Output as JSON (default for arrays/objects)',
25
+ });
26
+ async execute() {
27
+ try {
28
+ // Find project root
29
+ const projectRoot = findProjectRoot(process.cwd());
30
+ if (!projectRoot) {
31
+ this.context.stderr.write(chalk.red('Error: Not inside a vibe-fabric project.\n'));
32
+ this.context.stderr.write(chalk.gray('Run `vibe init` to create a planning hub first.\n'));
33
+ return 1;
34
+ }
35
+ // Load configuration
36
+ const config = await loadConfig(projectRoot);
37
+ if (!config) {
38
+ this.context.stderr.write(chalk.red('Error: Failed to load configuration.\n'));
39
+ this.context.stderr.write(chalk.gray('Run `vibe doctor` to diagnose configuration issues.\n'));
40
+ return 1;
41
+ }
42
+ // Get the value
43
+ const value = getConfigValue(config, this.key);
44
+ if (value === undefined) {
45
+ this.context.stderr.write(chalk.red(`Error: Key not found: ${this.key}\n`));
46
+ this.context.stderr.write(chalk.gray('Available top-level keys: project, repos\n'));
47
+ return 1;
48
+ }
49
+ // Output the value
50
+ if (this.json || typeof value === 'object') {
51
+ this.context.stdout.write(JSON.stringify(value, null, 2) + '\n');
52
+ }
53
+ else {
54
+ this.context.stdout.write(String(value) + '\n');
55
+ }
56
+ return 0;
57
+ }
58
+ catch (error) {
59
+ if (error instanceof Error) {
60
+ this.context.stderr.write(chalk.red(`Error: ${error.message}\n`));
61
+ }
62
+ else {
63
+ this.context.stderr.write(chalk.red('An unexpected error occurred.\n'));
64
+ }
65
+ return 1;
66
+ }
67
+ }
68
+ }
69
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/cli/commands/config/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,OAAO,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,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC1E,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class ConfigListCommand extends Command {
3
+ static paths: string[][];
4
+ static usage: import("clipanion").Usage;
5
+ json: boolean;
6
+ execute(): Promise<number>;
7
+ /**
8
+ * Print a formatted tree view of the configuration
9
+ */
10
+ private printFormattedConfig;
11
+ /**
12
+ * Recursively print an object with indentation
13
+ */
14
+ private printObject;
15
+ /**
16
+ * Format a value for display
17
+ */
18
+ private formatValue;
19
+ /**
20
+ * Get a brief summary of an object for array display
21
+ */
22
+ private getObjectSummary;
23
+ }
24
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAK5C,qBAAa,iBAAkB,SAAQ,OAAO;IAC5C,OAAgB,KAAK,aAAwB;IAE7C,OAAgB,KAAK,4BAYlB;IAEH,IAAI,UAED;IAEG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IA4ChC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;OAEG;IACH,OAAO,CAAC,WAAW;IAgDnB;;OAEG;IACH,OAAO,CAAC,WAAW;IAoBnB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAYzB"}
@@ -0,0 +1,146 @@
1
+ import { Command, Option } from 'clipanion';
2
+ import chalk from 'chalk';
3
+ import { loadConfig } from '../../../core/config.js';
4
+ import { findProjectRoot } from '../../../core/project.js';
5
+ export class ConfigListCommand extends Command {
6
+ static paths = [['config', 'list']];
7
+ static usage = Command.Usage({
8
+ description: 'List all configuration values',
9
+ details: `
10
+ Displays all configuration values from vibe-fabric.toml.
11
+
12
+ By default, shows a formatted tree view.
13
+ Use --json for machine-readable output.
14
+ `,
15
+ examples: [
16
+ ['List all config', 'vibe config list'],
17
+ ['List as JSON', 'vibe config list --json'],
18
+ ],
19
+ });
20
+ json = Option.Boolean('--json,-j', false, {
21
+ description: 'Output as JSON',
22
+ });
23
+ async execute() {
24
+ try {
25
+ // Find project root
26
+ const projectRoot = findProjectRoot(process.cwd());
27
+ if (!projectRoot) {
28
+ this.context.stderr.write(chalk.red('Error: Not inside a vibe-fabric project.\n'));
29
+ this.context.stderr.write(chalk.gray('Run `vibe init` to create a planning hub first.\n'));
30
+ return 1;
31
+ }
32
+ // Load configuration
33
+ const config = await loadConfig(projectRoot);
34
+ if (!config) {
35
+ this.context.stderr.write(chalk.red('Error: Failed to load configuration.\n'));
36
+ this.context.stderr.write(chalk.gray('Run `vibe doctor` to diagnose configuration issues.\n'));
37
+ return 1;
38
+ }
39
+ // Output based on format
40
+ if (this.json) {
41
+ this.context.stdout.write(JSON.stringify(config, null, 2) + '\n');
42
+ }
43
+ else {
44
+ this.printFormattedConfig(config);
45
+ }
46
+ return 0;
47
+ }
48
+ catch (error) {
49
+ if (error instanceof Error) {
50
+ this.context.stderr.write(chalk.red(`Error: ${error.message}\n`));
51
+ }
52
+ else {
53
+ this.context.stderr.write(chalk.red('An unexpected error occurred.\n'));
54
+ }
55
+ return 1;
56
+ }
57
+ }
58
+ /**
59
+ * Print a formatted tree view of the configuration
60
+ */
61
+ printFormattedConfig(config) {
62
+ this.context.stdout.write('\n');
63
+ this.context.stdout.write(chalk.bold.blue(' CONFIGURATION\n'));
64
+ this.context.stdout.write(chalk.gray(' ─'.repeat(25)) + '\n\n');
65
+ this.printObject(config, ' ');
66
+ this.context.stdout.write('\n');
67
+ }
68
+ /**
69
+ * Recursively print an object with indentation
70
+ */
71
+ printObject(obj, indent) {
72
+ const entries = Object.entries(obj);
73
+ for (let i = 0; i < entries.length; i++) {
74
+ const entry = entries[i];
75
+ if (!entry)
76
+ continue;
77
+ const [key, value] = entry;
78
+ const isLast = i === entries.length - 1;
79
+ const prefix = isLast ? '└─' : '├─';
80
+ const childIndent = isLast ? ' ' : '│ ';
81
+ if (Array.isArray(value)) {
82
+ this.context.stdout.write(`${indent}${prefix} ${chalk.cyan(key)}: ${chalk.gray(`[${value.length} items]`)}\n`);
83
+ // Show array items briefly
84
+ for (let j = 0; j < Math.min(value.length, 3); j++) {
85
+ const itemPrefix = j === Math.min(value.length, 3) - 1 && value.length <= 3 ? '└─' : '├─';
86
+ const item = value[j];
87
+ if (typeof item === 'object' && item !== null) {
88
+ const summary = this.getObjectSummary(item);
89
+ this.context.stdout.write(`${indent}${childIndent}${itemPrefix} ${chalk.gray(summary)}\n`);
90
+ }
91
+ else {
92
+ this.context.stdout.write(`${indent}${childIndent}${itemPrefix} ${this.formatValue(item)}\n`);
93
+ }
94
+ }
95
+ if (value.length > 3) {
96
+ this.context.stdout.write(`${indent}${childIndent}└─ ${chalk.gray(`... and ${value.length - 3} more`)}\n`);
97
+ }
98
+ }
99
+ else if (typeof value === 'object' && value !== null) {
100
+ this.context.stdout.write(`${indent}${prefix} ${chalk.cyan(key)}:\n`);
101
+ this.printObject(value, indent + childIndent);
102
+ }
103
+ else {
104
+ this.context.stdout.write(`${indent}${prefix} ${chalk.cyan(key)}: ${this.formatValue(value)}\n`);
105
+ }
106
+ }
107
+ }
108
+ /**
109
+ * Format a value for display
110
+ */
111
+ formatValue(value) {
112
+ if (value === undefined || value === null) {
113
+ return chalk.gray('(not set)');
114
+ }
115
+ if (typeof value === 'boolean') {
116
+ return value ? chalk.green('true') : chalk.yellow('false');
117
+ }
118
+ if (typeof value === 'number') {
119
+ return chalk.magenta(String(value));
120
+ }
121
+ if (typeof value === 'string') {
122
+ // Truncate long strings
123
+ if (value.length > 50) {
124
+ return chalk.white(`"${value.substring(0, 47)}..."`);
125
+ }
126
+ return chalk.white(`"${value}"`);
127
+ }
128
+ return chalk.white(String(value));
129
+ }
130
+ /**
131
+ * Get a brief summary of an object for array display
132
+ */
133
+ getObjectSummary(obj) {
134
+ // Try to find meaningful identifying fields
135
+ const identifiers = ['alias', 'name', 'id', 'title'];
136
+ for (const key of identifiers) {
137
+ if (key in obj && typeof obj[key] === 'string') {
138
+ return `${key}: "${obj[key]}"`;
139
+ }
140
+ }
141
+ // Fall back to showing number of keys
142
+ const keys = Object.keys(obj);
143
+ return `{${keys.length} fields}`;
144
+ }
145
+ }
146
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../src/cli/commands/config/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,OAAO,iBAAkB,SAAQ,OAAO;IAC5C,MAAM,CAAU,KAAK,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAE7C,MAAM,CAAU,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACpC,WAAW,EAAE,+BAA+B;QAC5C,OAAO,EAAE;;;;;KAKR;QACD,QAAQ,EAAE;YACR,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;YACvC,CAAC,cAAc,EAAE,yBAAyB,CAAC;SAC5C;KACF,CAAC,CAAC;IAEH,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE;QACxC,WAAW,EAAE,gBAAgB;KAC9B,CAAC,CAAC;IAEH,KAAK,CAAC,OAAO;QACX,IAAI,CAAC;YACH,oBAAoB;YACpB,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,IAAI,CAAC,OAAO,CAAC,MA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B,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;gBACtB,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;YACvD,CAAC;YACD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;QACnC,CAAC;QACD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACpC,CAAC;IAED;;OAEG;IACK,gBAAgB,CAAC,GAA4B;QACnD,4CAA4C;QAC5C,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACrD,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;YAC9B,IAAI,GAAG,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAC/C,OAAO,GAAG,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;YACjC,CAAC;QACH,CAAC;QACD,sCAAsC;QACtC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,OAAO,IAAI,IAAI,CAAC,MAAM,UAAU,CAAC;IACnC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class ConfigSetCommand extends Command {
3
+ static paths: string[][];
4
+ static usage: import("clipanion").Usage;
5
+ key: string;
6
+ value: string;
7
+ json: boolean;
8
+ execute(): Promise<number>;
9
+ /**
10
+ * Format a value for display
11
+ */
12
+ private formatValue;
13
+ }
14
+ //# sourceMappingURL=set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAY5C,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C,OAAgB,KAAK,aAAuB;IAE5C,OAAgB,KAAK,4BAmBlB;IAEH,GAAG,SAAkD;IACrD,KAAK,SAAoD;IAEzD,IAAI,UAED;IAEG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAyFhC;;OAEG;IACH,OAAO,CAAC,WAAW;CAOpB"}
@@ -0,0 +1,111 @@
1
+ import { Command, Option } from 'clipanion';
2
+ import chalk from 'chalk';
3
+ import { loadConfig, saveConfig, setConfigValue, parseValue, getConfigValue, } from '../../../core/config.js';
4
+ import { findProjectRoot } from '../../../core/project.js';
5
+ import { ConfigSchema } from '../../../types/config.js';
6
+ export class ConfigSetCommand extends Command {
7
+ static paths = [['config', 'set']];
8
+ static usage = Command.Usage({
9
+ description: 'Set a configuration value',
10
+ details: `
11
+ Sets a value in the project configuration (vibe-fabric.toml).
12
+
13
+ Use dot notation for nested keys (e.g., project.name).
14
+ Values are automatically parsed:
15
+ - "true"/"false" become booleans
16
+ - Numbers become numeric values
17
+ - Everything else remains a string
18
+
19
+ Use --json to set complex values (arrays, objects).
20
+ `,
21
+ examples: [
22
+ ['Set project name', 'vibe config set project.name "my-project"'],
23
+ ['Set version', 'vibe config set project.version "1.0.0"'],
24
+ ['Set boolean', 'vibe config set project.active true'],
25
+ ['Set JSON array', 'vibe config set project.description.goals --json \'["Goal 1", "Goal 2"]\''],
26
+ ],
27
+ });
28
+ key = Option.String({ required: true, name: 'key' });
29
+ value = Option.String({ required: true, name: 'value' });
30
+ json = Option.Boolean('--json,-j', false, {
31
+ description: 'Parse value as JSON',
32
+ });
33
+ async execute() {
34
+ try {
35
+ // Find project root
36
+ const projectRoot = findProjectRoot(process.cwd());
37
+ if (!projectRoot) {
38
+ this.context.stderr.write(chalk.red('Error: Not inside a vibe-fabric project.\n'));
39
+ this.context.stderr.write(chalk.gray('Run `vibe init` to create a planning hub first.\n'));
40
+ return 1;
41
+ }
42
+ // Load configuration
43
+ const config = await loadConfig(projectRoot);
44
+ if (!config) {
45
+ this.context.stderr.write(chalk.red('Error: Failed to load configuration.\n'));
46
+ this.context.stderr.write(chalk.gray('Run `vibe doctor` to diagnose configuration issues.\n'));
47
+ return 1;
48
+ }
49
+ // Parse the value
50
+ let parsedValue;
51
+ if (this.json) {
52
+ try {
53
+ parsedValue = JSON.parse(this.value);
54
+ }
55
+ catch {
56
+ this.context.stderr.write(chalk.red('Error: Invalid JSON value.\n'));
57
+ this.context.stderr.write(chalk.gray('Make sure your JSON is properly formatted.\n'));
58
+ return 1;
59
+ }
60
+ }
61
+ else {
62
+ parsedValue = parseValue(this.value);
63
+ }
64
+ // Get the old value for comparison
65
+ const oldValue = getConfigValue(config, this.key);
66
+ // Set the new value
67
+ setConfigValue(config, this.key, parsedValue);
68
+ // Validate the updated config against the schema
69
+ const validation = ConfigSchema.safeParse(config);
70
+ if (!validation.success) {
71
+ this.context.stderr.write(chalk.red('Error: Invalid configuration value.\n'));
72
+ const errors = validation.error.errors;
73
+ for (const err of errors) {
74
+ this.context.stderr.write(chalk.gray(` - ${err.path.join('.')}: ${err.message}\n`));
75
+ }
76
+ return 1;
77
+ }
78
+ // Save the configuration
79
+ await saveConfig(projectRoot, validation.data);
80
+ // Show success message
81
+ this.context.stdout.write(chalk.green('Configuration updated.\n'));
82
+ this.context.stdout.write(chalk.gray(` ${this.key}: `) +
83
+ chalk.dim(this.formatValue(oldValue)) +
84
+ chalk.gray(' → ') +
85
+ chalk.cyan(this.formatValue(parsedValue)) +
86
+ '\n');
87
+ return 0;
88
+ }
89
+ catch (error) {
90
+ if (error instanceof Error) {
91
+ this.context.stderr.write(chalk.red(`Error: ${error.message}\n`));
92
+ }
93
+ else {
94
+ this.context.stderr.write(chalk.red('An unexpected error occurred.\n'));
95
+ }
96
+ return 1;
97
+ }
98
+ }
99
+ /**
100
+ * Format a value for display
101
+ */
102
+ formatValue(value) {
103
+ if (value === undefined)
104
+ return '(not set)';
105
+ if (typeof value === 'object') {
106
+ return JSON.stringify(value);
107
+ }
108
+ return String(value);
109
+ }
110
+ }
111
+ //# sourceMappingURL=set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.js","sourceRoot":"","sources":["../../../../src/cli/commands/config/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,OAAO,gBAAiB,SAAQ,OAAO;IAC3C,MAAM,CAAU,KAAK,GAAG,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;IAE5C,MAAM,CAAU,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACpC,WAAW,EAAE,2BAA2B;QACxC,OAAO,EAAE;;;;;;;;;;KAUR;QACD,QAAQ,EAAE;YACR,CAAC,kBAAkB,EAAE,2CAA2C,CAAC;YACjE,CAAC,aAAa,EAAE,yCAAyC,CAAC;YAC1D,CAAC,aAAa,EAAE,qCAAqC,CAAC;YACtD,CAAC,gBAAgB,EAAE,2EAA2E,CAAC;SAChG;KACF,CAAC,CAAC;IAEH,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAEzD,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,EAAE;QACxC,WAAW,EAAE,qBAAqB;KACnC,CAAC,CAAC;IAEH,KA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AC,IAAI,CAAC,KAAK,CAAC;gBACjB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBACzC,IAAI,CACL,CAAC;YAEF,OAAO,CAAC,CAAC;QACX,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;YACpE,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC1E,CAAC;YACD,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED;;OAEG;IACK,WAAW,CAAC,KAAc;QAChC,IAAI,KAAK,KAAK,SAAS;YAAE,OAAO,WAAW,CAAC;QAC5C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Command } from 'clipanion';
2
+ export declare class RepoListCommand extends Command {
3
+ static paths: string[][];
4
+ static usage: import("clipanion").Usage;
5
+ status: string | undefined;
6
+ json: boolean;
7
+ quiet: boolean;
8
+ execute(): Promise<number>;
9
+ /**
10
+ * Output repos as formatted table
11
+ */
12
+ private outputTable;
13
+ /**
14
+ * Format status with color
15
+ */
16
+ private formatStatus;
17
+ /**
18
+ * Output repos as JSON
19
+ */
20
+ private outputJson;
21
+ /**
22
+ * Output only aliases (for scripting)
23
+ */
24
+ private outputQuiet;
25
+ }
26
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/repo/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,OAAgB,KAAK,aAAsB;IAE3C,OAAgB,KAAK,4BAkBlB;IAEH,MAAM,qBAEH;IAEH,IAAI,UAED;IAEH,KAAK,UAEF;IAEG,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IAuFhC;;OAEG;IACH,OAAO,CAAC,WAAW;IA0EnB;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB;;OAEG;IACH,OAAO,CAAC,UAAU;IAKlB;;OAEG;IACH,OAAO,CAAC,WAAW;CAMpB"}
@@ -0,0 +1,197 @@
1
+ import { Command, Option } from 'clipanion';
2
+ import chalk from 'chalk';
3
+ import Table from 'cli-table3';
4
+ import { loadConfig } from '../../../core/config.js';
5
+ import { findProjectRoot } from '../../../core/project.js';
6
+ export class RepoListCommand extends Command {
7
+ static paths = [['repo', 'list']];
8
+ static usage = Command.Usage({
9
+ description: 'List all repositories in the planning hub',
10
+ details: `
11
+ Displays all repositories registered in the planning hub configuration.
12
+
13
+ Shows:
14
+ - Alias (used to reference the repo)
15
+ - Name (GitHub repository name)
16
+ - Status (active, planned, archived)
17
+ - Branch (default branch)
18
+ - Added date
19
+ `,
20
+ examples: [
21
+ ['List all repos', 'vibe repo list'],
22
+ ['Filter by status', 'vibe repo list --status active'],
23
+ ['Output as JSON', 'vibe repo list --json'],
24
+ ['Quiet mode (aliases only)', 'vibe repo list -q'],
25
+ ],
26
+ });
27
+ status = Option.String('--status,-s', {
28
+ description: 'Filter by status (active, planned, archived)',
29
+ });
30
+ json = Option.Boolean('--json', false, {
31
+ description: 'Output as JSON',
32
+ });
33
+ quiet = Option.Boolean('--quiet,-q', false, {
34
+ description: 'Output aliases only',
35
+ });
36
+ async execute() {
37
+ try {
38
+ // Find project root
39
+ const projectRoot = findProjectRoot(process.cwd());
40
+ if (!projectRoot) {
41
+ this.context.stderr.write(chalk.red('Error: Not inside a vibe-fabric project.\n'));
42
+ this.context.stderr.write(chalk.gray('Run `vibe init` to create a planning hub first.\n'));
43
+ return 1;
44
+ }
45
+ // Load configuration
46
+ const config = await loadConfig(projectRoot);
47
+ if (!config) {
48
+ this.context.stderr.write(chalk.red('Error: Failed to load configuration.\n'));
49
+ this.context.stderr.write(chalk.gray('Run `vibe doctor` to diagnose configuration issues.\n'));
50
+ return 1;
51
+ }
52
+ // Filter repos by status if specified
53
+ let repos = config.repos;
54
+ if (this.status) {
55
+ const validStatuses = ['active', 'planned', 'archived'];
56
+ if (!validStatuses.includes(this.status)) {
57
+ this.context.stderr.write(chalk.red(`Error: Invalid status "${this.status}".\n`));
58
+ this.context.stderr.write(chalk.gray(`Valid options: ${validStatuses.join(', ')}\n`));
59
+ return 1;
60
+ }
61
+ repos = repos.filter((r) => r.status === this.status);
62
+ }
63
+ // Handle empty repos
64
+ if (repos.length === 0) {
65
+ if (this.json) {
66
+ this.context.stdout.write('[]\n');
67
+ return 0;
68
+ }
69
+ if (this.quiet) {
70
+ return 0;
71
+ }
72
+ if (this.status) {
73
+ this.context.stdout.write(chalk.yellow(`\nNo ${this.status} repositories found.\n\n`));
74
+ }
75
+ else {
76
+ this.context.stdout.write(chalk.yellow('\nNo repositories configured.\n'));
77
+ this.context.stdout.write(chalk.gray('Run `vibe repo add` to add a repository.\n\n'));
78
+ }
79
+ return 0;
80
+ }
81
+ // Output based on mode
82
+ if (this.json) {
83
+ return this.outputJson(repos);
84
+ }
85
+ if (this.quiet) {
86
+ return this.outputQuiet(repos);
87
+ }
88
+ return this.outputTable(repos);
89
+ }
90
+ catch (error) {
91
+ if (error instanceof Error) {
92
+ this.context.stderr.write(chalk.red(`Error: ${error.message}\n`));
93
+ }
94
+ else {
95
+ this.context.stderr.write(chalk.red('An unexpected error occurred.\n'));
96
+ }
97
+ return 1;
98
+ }
99
+ }
100
+ /**
101
+ * Output repos as formatted table
102
+ */
103
+ outputTable(repos) {
104
+ this.context.stdout.write('\n');
105
+ this.context.stdout.write(chalk.bold.blue(' REPOSITORIES\n'));
106
+ this.context.stdout.write(chalk.gray(' ─'.repeat(25)) + '\n\n');
107
+ const table = new Table({
108
+ head: ['Alias', 'Name', 'Status', 'Branch', 'Added'].map((h) => chalk.bold(h)),
109
+ chars: {
110
+ top: '─',
111
+ 'top-mid': '┬',
112
+ 'top-left': '┌',
113
+ 'top-right': '┐',
114
+ bottom: '─',
115
+ 'bottom-mid': '┴',
116
+ 'bottom-left': '└',
117
+ 'bottom-right': '┘',
118
+ left: '│',
119
+ 'left-mid': '├',
120
+ mid: '─',
121
+ 'mid-mid': '┼',
122
+ right: '│',
123
+ 'right-mid': '┤',
124
+ middle: '│',
125
+ },
126
+ style: {
127
+ head: [],
128
+ border: ['gray'],
129
+ compact: false,
130
+ },
131
+ });
132
+ for (const repo of repos) {
133
+ const statusDisplay = this.formatStatus(repo.status);
134
+ const addedDate = repo.addedAt
135
+ ? new Date(repo.addedAt).toISOString().split('T')[0]
136
+ : '-';
137
+ const branch = repo.status === 'planned' ? '-' : repo.branch;
138
+ table.push([
139
+ chalk.cyan(repo.alias),
140
+ repo.name,
141
+ statusDisplay,
142
+ branch,
143
+ addedDate,
144
+ ]);
145
+ }
146
+ this.context.stdout.write(table.toString() + '\n\n');
147
+ // Summary
148
+ const activeCount = repos.filter((r) => r.status === 'active').length;
149
+ const plannedCount = repos.filter((r) => r.status === 'planned').length;
150
+ const archivedCount = repos.filter((r) => r.status === 'archived').length;
151
+ const parts = [];
152
+ if (activeCount > 0)
153
+ parts.push(`${activeCount} active`);
154
+ if (plannedCount > 0)
155
+ parts.push(`${plannedCount} planned`);
156
+ if (archivedCount > 0)
157
+ parts.push(`${archivedCount} archived`);
158
+ this.context.stdout.write(chalk.gray(` Total: ${repos.length} repositor${repos.length === 1 ? 'y' : 'ies'}`));
159
+ if (parts.length > 0) {
160
+ this.context.stdout.write(chalk.gray(` (${parts.join(', ')})`));
161
+ }
162
+ this.context.stdout.write('\n\n');
163
+ return 0;
164
+ }
165
+ /**
166
+ * Format status with color
167
+ */
168
+ formatStatus(status) {
169
+ switch (status) {
170
+ case 'active':
171
+ return chalk.green('active');
172
+ case 'planned':
173
+ return chalk.yellow('planned');
174
+ case 'archived':
175
+ return chalk.gray('archived');
176
+ default:
177
+ return status;
178
+ }
179
+ }
180
+ /**
181
+ * Output repos as JSON
182
+ */
183
+ outputJson(repos) {
184
+ this.context.stdout.write(JSON.stringify(repos, null, 2) + '\n');
185
+ return 0;
186
+ }
187
+ /**
188
+ * Output only aliases (for scripting)
189
+ */
190
+ outputQuiet(repos) {
191
+ for (const repo of repos) {
192
+ this.context.stdout.write(repo.alias + '\n');
193
+ }
194
+ return 0;
195
+ }
196
+ }
197
+ //# sourceMappingURL=list.js.map