agileflow 2.79.0 → 2.80.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.
@@ -10,25 +10,13 @@
10
10
 
11
11
  const path = require('path');
12
12
  const fs = require('fs');
13
-
14
- // ANSI color codes
15
- const colors = {
16
- reset: '\x1b[0m',
17
- bold: '\x1b[1m',
18
- dim: '\x1b[2m',
19
- yellow: '\x1b[33m',
20
- red: '\x1b[31m',
21
- green: '\x1b[32m',
22
- cyan: '\x1b[36m',
23
- magenta: '\x1b[35m',
24
- orange: '\x1b[38;2;232;104;58m',
25
- bgYellow: '\x1b[43m',
26
- bgRed: '\x1b[41m',
27
- };
13
+ const { c: colors } = require('../../../lib/colors');
28
14
 
29
15
  function showBetaWarning() {
30
16
  console.log('');
31
- console.log(`${colors.bgYellow}${colors.bold} BETA ${colors.reset} ${colors.yellow}This feature is in beta and not yet stable${colors.reset}`);
17
+ console.log(
18
+ `${colors.bgYellow}${colors.bold} BETA ${colors.reset} ${colors.yellow}This feature is in beta and not yet stable${colors.reset}`
19
+ );
32
20
  console.log(`${colors.dim} Expect bugs and incomplete features${colors.reset}`);
33
21
  console.log('');
34
22
  }
@@ -91,13 +79,17 @@ async function showDashboard() {
91
79
  const status = await loadStatus();
92
80
 
93
81
  if (!status) {
94
- console.log(`${colors.dim} No status.json found. Run /agileflow:story to create stories.${colors.reset}`);
82
+ console.log(
83
+ `${colors.dim} No status.json found. Run /agileflow:story to create stories.${colors.reset}`
84
+ );
95
85
  console.log('');
96
86
  return;
97
87
  }
98
88
 
99
89
  // Count stories by status
100
- const stories = Object.values(status).filter(s => s && typeof s === 'object' && (s.id || s.story_id));
90
+ const stories = Object.values(status).filter(
91
+ s => s && typeof s === 'object' && (s.id || s.story_id)
92
+ );
101
93
  const counts = {
102
94
  in_progress: stories.filter(s => ['in_progress', 'in-progress'].includes(s.status)).length,
103
95
  blocked: stories.filter(s => s.status === 'blocked').length,
@@ -111,7 +103,9 @@ async function showDashboard() {
111
103
  // Summary
112
104
  console.log(`${colors.bold} Summary${colors.reset}`);
113
105
  console.log(` ────────────────────────────────────────────`);
114
- console.log(` ${colors.yellow}In Progress:${colors.reset} ${counts.in_progress} ${colors.red}Blocked:${colors.reset} ${counts.blocked} ${colors.cyan}Ready:${colors.reset} ${counts.ready} ${colors.green}Done:${colors.reset} ${counts.completed}`);
106
+ console.log(
107
+ ` ${colors.yellow}In Progress:${colors.reset} ${counts.in_progress} ${colors.red}Blocked:${colors.reset} ${counts.blocked} ${colors.cyan}Ready:${colors.reset} ${counts.ready} ${colors.green}Done:${colors.reset} ${counts.completed}`
108
+ );
115
109
  console.log(` ${colors.dim}Completion: ${completionPct}%${colors.reset}`);
116
110
  console.log('');
117
111
 
@@ -140,7 +134,9 @@ async function showDashboard() {
140
134
  // Ready Stories (up to 5)
141
135
  const readyStories = stories.filter(s => s.status === 'ready').slice(0, 5);
142
136
  if (readyStories.length > 0) {
143
- console.log(`${colors.bold} ${colors.cyan}Ready for Work${colors.reset} ${colors.dim}(showing ${readyStories.length} of ${counts.ready})${colors.reset}`);
137
+ console.log(
138
+ `${colors.bold} ${colors.cyan}Ready for Work${colors.reset} ${colors.dim}(showing ${readyStories.length} of ${counts.ready})${colors.reset}`
139
+ );
144
140
  console.log(` ────────────────────────────────────────────`);
145
141
  readyStories.forEach(story => {
146
142
  console.log(formatStory(story));
@@ -165,7 +161,9 @@ async function main() {
165
161
  console.log(' npx agileflow start Show dashboard');
166
162
  console.log(' npx agileflow start --help Show this help');
167
163
  console.log('');
168
- console.log(`${colors.dim}This is a beta feature. For stable commands, use Claude Code slash commands.${colors.reset}`);
164
+ console.log(
165
+ `${colors.dim}This is a beta feature. For stable commands, use Claude Code slash commands.${colors.reset}`
166
+ );
169
167
  return;
170
168
  }
171
169
 
@@ -111,7 +111,11 @@ class ClaudeCodeSetup extends BaseIdeSetup {
111
111
  await this.ensureDir(damageControlTarget);
112
112
 
113
113
  // Copy hook scripts
114
- const scripts = ['bash-tool-damage-control.js', 'edit-tool-damage-control.js', 'write-tool-damage-control.js'];
114
+ const scripts = [
115
+ 'bash-tool-damage-control.js',
116
+ 'edit-tool-damage-control.js',
117
+ 'write-tool-damage-control.js',
118
+ ];
115
119
  for (const script of scripts) {
116
120
  const src = path.join(damageControlSource, script);
117
121
  const dest = path.join(damageControlTarget, script);
@@ -162,28 +166,37 @@ class ClaudeCodeSetup extends BaseIdeSetup {
162
166
  const damageControlHooks = [
163
167
  {
164
168
  matcher: 'Bash',
165
- hooks: [{
166
- type: 'command',
167
- command: 'node $CLAUDE_PROJECT_DIR/.claude/hooks/damage-control/bash-tool-damage-control.js',
168
- timeout: 5000
169
- }]
169
+ hooks: [
170
+ {
171
+ type: 'command',
172
+ command:
173
+ 'node $CLAUDE_PROJECT_DIR/.claude/hooks/damage-control/bash-tool-damage-control.js',
174
+ timeout: 5000,
175
+ },
176
+ ],
170
177
  },
171
178
  {
172
179
  matcher: 'Edit',
173
- hooks: [{
174
- type: 'command',
175
- command: 'node $CLAUDE_PROJECT_DIR/.claude/hooks/damage-control/edit-tool-damage-control.js',
176
- timeout: 5000
177
- }]
180
+ hooks: [
181
+ {
182
+ type: 'command',
183
+ command:
184
+ 'node $CLAUDE_PROJECT_DIR/.claude/hooks/damage-control/edit-tool-damage-control.js',
185
+ timeout: 5000,
186
+ },
187
+ ],
178
188
  },
179
189
  {
180
190
  matcher: 'Write',
181
- hooks: [{
182
- type: 'command',
183
- command: 'node $CLAUDE_PROJECT_DIR/.claude/hooks/damage-control/write-tool-damage-control.js',
184
- timeout: 5000
185
- }]
186
- }
191
+ hooks: [
192
+ {
193
+ type: 'command',
194
+ command:
195
+ 'node $CLAUDE_PROJECT_DIR/.claude/hooks/damage-control/write-tool-damage-control.js',
196
+ timeout: 5000,
197
+ },
198
+ ],
199
+ },
187
200
  ];
188
201
 
189
202
  // Merge with existing hooks (don't duplicate)
@@ -199,8 +212,8 @@ class ClaudeCodeSetup extends BaseIdeSetup {
199
212
 
200
213
  // Check if damage control hook already exists
201
214
  const dcHook = newHook.hooks[0];
202
- const hasDcHook = existing.hooks.some(h =>
203
- h.type === 'command' && h.command && h.command.includes('damage-control')
215
+ const hasDcHook = existing.hooks.some(
216
+ h => h.type === 'command' && h.command && h.command.includes('damage-control')
204
217
  );
205
218
 
206
219
  if (!hasDcHook) {
@@ -9,7 +9,8 @@ const fs = require('fs');
9
9
 
10
10
  class Dashboard {
11
11
  constructor(options = {}) {
12
- this.statusPath = options.statusPath || path.join(process.cwd(), 'docs', '09-agents', 'status.json');
12
+ this.statusPath =
13
+ options.statusPath || path.join(process.cwd(), 'docs', '09-agents', 'status.json');
13
14
  this.data = null;
14
15
  }
15
16
 
@@ -29,9 +30,7 @@ class Dashboard {
29
30
 
30
31
  getStories() {
31
32
  if (!this.data) return [];
32
- return Object.values(this.data).filter(
33
- s => s && typeof s === 'object' && (s.id || s.story_id)
34
- );
33
+ return Object.values(this.data).filter(s => s && typeof s === 'object' && (s.id || s.story_id));
35
34
  }
36
35
 
37
36
  getStats() {
@@ -10,15 +10,7 @@
10
10
  const { execSync } = require('node:child_process');
11
11
  const path = require('node:path');
12
12
  const fs = require('node:fs');
13
-
14
- // ANSI color codes for terminal output
15
- const colors = {
16
- green: '\x1b[32m',
17
- yellow: '\x1b[33m',
18
- blue: '\x1b[36m',
19
- dim: '\x1b[2m',
20
- reset: '\x1b[0m',
21
- };
13
+ const { c: colors } = require('../lib/colors');
22
14
 
23
15
  function log(message, color = 'reset') {
24
16
  console.log(`${colors[color]}${message}${colors.reset}`);