agileflow 2.76.0 → 2.78.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.
- package/README.md +3 -3
- package/package.json +6 -1
- package/scripts/agileflow-configure.js +185 -13
- package/scripts/agileflow-statusline.sh +266 -27
- package/scripts/agileflow-welcome.js +160 -52
- package/scripts/auto-self-improve.js +63 -20
- package/scripts/check-update.js +1 -4
- package/scripts/damage-control-bash.js +232 -0
- package/scripts/damage-control-edit.js +243 -0
- package/scripts/damage-control-write.js +243 -0
- package/scripts/get-env.js +15 -7
- package/scripts/lib/frontmatter-parser.js +4 -1
- package/scripts/obtain-context.js +59 -48
- package/scripts/ralph-loop.js +25 -13
- package/scripts/validate-expertise.sh +19 -15
- package/src/core/agents/accessibility.md +124 -53
- package/src/core/agents/adr-writer.md +192 -52
- package/src/core/agents/analytics.md +139 -60
- package/src/core/agents/api.md +173 -63
- package/src/core/agents/ci.md +139 -57
- package/src/core/agents/compliance.md +159 -68
- package/src/core/agents/configuration/damage-control.md +356 -0
- package/src/core/agents/database.md +162 -61
- package/src/core/agents/datamigration.md +179 -66
- package/src/core/agents/design.md +179 -57
- package/src/core/agents/devops.md +160 -3
- package/src/core/agents/documentation.md +204 -60
- package/src/core/agents/epic-planner.md +147 -55
- package/src/core/agents/integrations.md +197 -69
- package/src/core/agents/mentor.md +158 -57
- package/src/core/agents/mobile.md +159 -67
- package/src/core/agents/monitoring.md +154 -65
- package/src/core/agents/multi-expert.md +115 -43
- package/src/core/agents/orchestrator.md +77 -24
- package/src/core/agents/performance.md +130 -75
- package/src/core/agents/product.md +151 -55
- package/src/core/agents/qa.md +162 -74
- package/src/core/agents/readme-updater.md +178 -76
- package/src/core/agents/refactor.md +148 -95
- package/src/core/agents/research.md +143 -72
- package/src/core/agents/security.md +154 -65
- package/src/core/agents/testing.md +176 -97
- package/src/core/agents/ui.md +170 -79
- package/src/core/commands/adr/list.md +171 -0
- package/src/core/commands/adr/update.md +235 -0
- package/src/core/commands/adr/view.md +252 -0
- package/src/core/commands/adr.md +207 -50
- package/src/core/commands/agent.md +16 -0
- package/src/core/commands/assign.md +148 -44
- package/src/core/commands/auto.md +18 -1
- package/src/core/commands/babysit.md +361 -36
- package/src/core/commands/baseline.md +14 -0
- package/src/core/commands/blockers.md +170 -51
- package/src/core/commands/board.md +144 -66
- package/src/core/commands/changelog.md +15 -0
- package/src/core/commands/ci.md +179 -69
- package/src/core/commands/compress.md +18 -0
- package/src/core/commands/configure.md +16 -0
- package/src/core/commands/context/export.md +193 -4
- package/src/core/commands/context/full.md +191 -18
- package/src/core/commands/context/note.md +248 -4
- package/src/core/commands/debt.md +17 -0
- package/src/core/commands/deploy.md +208 -65
- package/src/core/commands/deps.md +15 -0
- package/src/core/commands/diagnose.md +16 -0
- package/src/core/commands/docs.md +196 -64
- package/src/core/commands/epic/list.md +170 -0
- package/src/core/commands/epic/view.md +242 -0
- package/src/core/commands/epic.md +192 -69
- package/src/core/commands/feedback.md +191 -71
- package/src/core/commands/handoff.md +162 -48
- package/src/core/commands/help.md +9 -0
- package/src/core/commands/ideate.md +446 -0
- package/src/core/commands/impact.md +16 -0
- package/src/core/commands/metrics.md +141 -37
- package/src/core/commands/multi-expert.md +77 -0
- package/src/core/commands/packages.md +16 -0
- package/src/core/commands/pr.md +161 -67
- package/src/core/commands/readme-sync.md +16 -0
- package/src/core/commands/research/analyze.md +568 -0
- package/src/core/commands/research/ask.md +345 -20
- package/src/core/commands/research/import.md +562 -19
- package/src/core/commands/research/list.md +173 -5
- package/src/core/commands/research/view.md +181 -8
- package/src/core/commands/retro.md +135 -48
- package/src/core/commands/review.md +219 -47
- package/src/core/commands/session/end.md +209 -0
- package/src/core/commands/session/history.md +210 -0
- package/src/core/commands/session/init.md +116 -0
- package/src/core/commands/session/new.md +296 -0
- package/src/core/commands/session/resume.md +166 -0
- package/src/core/commands/session/status.md +166 -0
- package/src/core/commands/skill/create.md +115 -17
- package/src/core/commands/skill/delete.md +117 -0
- package/src/core/commands/skill/edit.md +104 -0
- package/src/core/commands/skill/list.md +128 -0
- package/src/core/commands/skill/test.md +135 -0
- package/src/core/commands/skill/upgrade.md +542 -0
- package/src/core/commands/sprint.md +17 -1
- package/src/core/commands/status.md +133 -21
- package/src/core/commands/story/list.md +176 -0
- package/src/core/commands/story/view.md +265 -0
- package/src/core/commands/story-validate.md +101 -1
- package/src/core/commands/story.md +204 -51
- package/src/core/commands/template.md +16 -1
- package/src/core/commands/tests.md +226 -64
- package/src/core/commands/update.md +17 -1
- package/src/core/commands/validate-expertise.md +16 -0
- package/src/core/commands/velocity.md +140 -36
- package/src/core/commands/verify.md +14 -0
- package/src/core/commands/whats-new.md +30 -0
- package/src/core/skills/_learnings/README.md +91 -0
- package/src/core/skills/_learnings/_template.yaml +106 -0
- package/src/core/skills/_learnings/commit.yaml +69 -0
- package/src/core/templates/damage-control-patterns.yaml +234 -0
- package/src/core/templates/skill-template.md +53 -11
- package/tools/cli/commands/list.js +3 -1
- package/tools/cli/commands/start.js +180 -0
- package/tools/cli/commands/uninstall.js +4 -5
- package/tools/cli/commands/update.js +11 -3
- package/tools/cli/lib/content-injector.js +6 -1
- package/tools/cli/tui/Dashboard.js +66 -0
- package/tools/cli/tui/StoryList.js +69 -0
- package/tools/cli/tui/index.js +16 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AgileFlow TUI Dashboard
|
|
5
|
+
*
|
|
6
|
+
* BETA - Internal use only, not publicly documented
|
|
7
|
+
*
|
|
8
|
+
* Usage: npx agileflow start
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const path = require('path');
|
|
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
|
+
};
|
|
28
|
+
|
|
29
|
+
function showBetaWarning() {
|
|
30
|
+
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}`);
|
|
32
|
+
console.log(`${colors.dim} Expect bugs and incomplete features${colors.reset}`);
|
|
33
|
+
console.log('');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function showHeader() {
|
|
37
|
+
console.log(`${colors.orange}${colors.bold}`);
|
|
38
|
+
console.log(' ╔═══════════════════════════════════════════╗');
|
|
39
|
+
console.log(' ║ AgileFlow TUI Dashboard ║');
|
|
40
|
+
console.log(' ╚═══════════════════════════════════════════╝');
|
|
41
|
+
console.log(`${colors.reset}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function loadStatus() {
|
|
45
|
+
const statusPath = path.join(process.cwd(), 'docs', '09-agents', 'status.json');
|
|
46
|
+
|
|
47
|
+
if (!fs.existsSync(statusPath)) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
const content = fs.readFileSync(statusPath, 'utf8');
|
|
53
|
+
return JSON.parse(content);
|
|
54
|
+
} catch (err) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function getStatusColor(status) {
|
|
60
|
+
switch (status) {
|
|
61
|
+
case 'completed':
|
|
62
|
+
case 'done':
|
|
63
|
+
return colors.green;
|
|
64
|
+
case 'in_progress':
|
|
65
|
+
case 'in-progress':
|
|
66
|
+
return colors.yellow;
|
|
67
|
+
case 'blocked':
|
|
68
|
+
return colors.red;
|
|
69
|
+
case 'ready':
|
|
70
|
+
return colors.cyan;
|
|
71
|
+
default:
|
|
72
|
+
return colors.dim;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function formatStory(story) {
|
|
77
|
+
const statusColor = getStatusColor(story.status);
|
|
78
|
+
const id = story.id || story.story_id || 'Unknown';
|
|
79
|
+
const title = story.title || story.summary || 'Untitled';
|
|
80
|
+
const status = (story.status || 'unknown').toUpperCase();
|
|
81
|
+
const owner = story.owner || '-';
|
|
82
|
+
|
|
83
|
+
return ` ${colors.bold}${id}${colors.reset} ${title.substring(0, 40)}${title.length > 40 ? '...' : ''}
|
|
84
|
+
${statusColor}[${status}]${colors.reset} ${colors.dim}Owner: ${owner}${colors.reset}`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async function showDashboard() {
|
|
88
|
+
showBetaWarning();
|
|
89
|
+
showHeader();
|
|
90
|
+
|
|
91
|
+
const status = await loadStatus();
|
|
92
|
+
|
|
93
|
+
if (!status) {
|
|
94
|
+
console.log(`${colors.dim} No status.json found. Run /agileflow:story to create stories.${colors.reset}`);
|
|
95
|
+
console.log('');
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Count stories by status
|
|
100
|
+
const stories = Object.values(status).filter(s => s && typeof s === 'object' && (s.id || s.story_id));
|
|
101
|
+
const counts = {
|
|
102
|
+
in_progress: stories.filter(s => ['in_progress', 'in-progress'].includes(s.status)).length,
|
|
103
|
+
blocked: stories.filter(s => s.status === 'blocked').length,
|
|
104
|
+
ready: stories.filter(s => s.status === 'ready').length,
|
|
105
|
+
completed: stories.filter(s => ['completed', 'done'].includes(s.status)).length,
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const total = stories.length;
|
|
109
|
+
const completionPct = total > 0 ? Math.round((counts.completed / total) * 100) : 0;
|
|
110
|
+
|
|
111
|
+
// Summary
|
|
112
|
+
console.log(`${colors.bold} Summary${colors.reset}`);
|
|
113
|
+
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}`);
|
|
115
|
+
console.log(` ${colors.dim}Completion: ${completionPct}%${colors.reset}`);
|
|
116
|
+
console.log('');
|
|
117
|
+
|
|
118
|
+
// In Progress Stories
|
|
119
|
+
const inProgressStories = stories.filter(s => ['in_progress', 'in-progress'].includes(s.status));
|
|
120
|
+
if (inProgressStories.length > 0) {
|
|
121
|
+
console.log(`${colors.bold} ${colors.yellow}In Progress${colors.reset}`);
|
|
122
|
+
console.log(` ────────────────────────────────────────────`);
|
|
123
|
+
inProgressStories.forEach(story => {
|
|
124
|
+
console.log(formatStory(story));
|
|
125
|
+
});
|
|
126
|
+
console.log('');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Blocked Stories
|
|
130
|
+
const blockedStories = stories.filter(s => s.status === 'blocked');
|
|
131
|
+
if (blockedStories.length > 0) {
|
|
132
|
+
console.log(`${colors.bold} ${colors.red}Blocked${colors.reset}`);
|
|
133
|
+
console.log(` ────────────────────────────────────────────`);
|
|
134
|
+
blockedStories.forEach(story => {
|
|
135
|
+
console.log(formatStory(story));
|
|
136
|
+
});
|
|
137
|
+
console.log('');
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Ready Stories (up to 5)
|
|
141
|
+
const readyStories = stories.filter(s => s.status === 'ready').slice(0, 5);
|
|
142
|
+
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}`);
|
|
144
|
+
console.log(` ────────────────────────────────────────────`);
|
|
145
|
+
readyStories.forEach(story => {
|
|
146
|
+
console.log(formatStory(story));
|
|
147
|
+
});
|
|
148
|
+
console.log('');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
console.log(`${colors.dim} Use /agileflow:board for interactive kanban view${colors.reset}`);
|
|
152
|
+
console.log(`${colors.dim} Use /agileflow:story:list for full story list${colors.reset}`);
|
|
153
|
+
console.log('');
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
async function main() {
|
|
157
|
+
const args = process.argv.slice(2);
|
|
158
|
+
|
|
159
|
+
// Check for help flag
|
|
160
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
161
|
+
showBetaWarning();
|
|
162
|
+
console.log(`${colors.bold}AgileFlow TUI Dashboard${colors.reset}`);
|
|
163
|
+
console.log('');
|
|
164
|
+
console.log(`${colors.bold}Usage:${colors.reset}`);
|
|
165
|
+
console.log(' npx agileflow start Show dashboard');
|
|
166
|
+
console.log(' npx agileflow start --help Show this help');
|
|
167
|
+
console.log('');
|
|
168
|
+
console.log(`${colors.dim}This is a beta feature. For stable commands, use Claude Code slash commands.${colors.reset}`);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
await showDashboard();
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
main().catch(err => {
|
|
176
|
+
console.error(`${colors.red}Error:${colors.reset}`, err.message);
|
|
177
|
+
process.exit(1);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
module.exports = { main };
|
|
@@ -49,10 +49,7 @@ module.exports = {
|
|
|
49
49
|
|
|
50
50
|
// Confirm removal
|
|
51
51
|
if (!options.force) {
|
|
52
|
-
const proceed = await confirm(
|
|
53
|
-
`Remove ${formatIdeName(ideName)} configuration?`,
|
|
54
|
-
false
|
|
55
|
-
);
|
|
52
|
+
const proceed = await confirm(`Remove ${formatIdeName(ideName)} configuration?`, false);
|
|
56
53
|
if (!proceed) {
|
|
57
54
|
console.log(chalk.dim('\nCancelled\n'));
|
|
58
55
|
process.exit(0);
|
|
@@ -91,7 +88,9 @@ module.exports = {
|
|
|
91
88
|
|
|
92
89
|
console.log(chalk.green(`\n${formatIdeName(ideName)} has been removed.\n`));
|
|
93
90
|
if (status.ides.length > 1) {
|
|
94
|
-
console.log(
|
|
91
|
+
console.log(
|
|
92
|
+
chalk.dim(`Remaining IDEs: ${status.ides.filter(i => i !== ideName).join(', ')}\n`)
|
|
93
|
+
);
|
|
95
94
|
}
|
|
96
95
|
|
|
97
96
|
process.exit(0);
|
|
@@ -107,12 +107,20 @@ module.exports = {
|
|
|
107
107
|
console.log();
|
|
108
108
|
warning('Your global CLI is outdated!');
|
|
109
109
|
console.log(
|
|
110
|
-
chalk.dim(
|
|
110
|
+
chalk.dim(
|
|
111
|
+
` You have a global installation at v${localCliVersion}, but v${npmLatestVersion} is available.\n`
|
|
112
|
+
)
|
|
111
113
|
);
|
|
112
114
|
console.log(chalk.dim(` Options:`));
|
|
113
115
|
console.log(chalk.dim(` 1. Cancel and run: `) + chalk.cyan(`npx agileflow@latest update`));
|
|
114
|
-
console.log(
|
|
115
|
-
|
|
116
|
+
console.log(
|
|
117
|
+
chalk.dim(` 2. Remove global: `) +
|
|
118
|
+
chalk.cyan(`npm uninstall -g agileflow`) +
|
|
119
|
+
chalk.dim(` (recommended)`)
|
|
120
|
+
);
|
|
121
|
+
console.log(
|
|
122
|
+
chalk.dim(` 3. Update global: `) + chalk.cyan(`npm install -g agileflow@latest\n`)
|
|
123
|
+
);
|
|
116
124
|
|
|
117
125
|
const useOutdated = options.force
|
|
118
126
|
? true
|
|
@@ -26,7 +26,12 @@ const path = require('path');
|
|
|
26
26
|
|
|
27
27
|
// Use shared modules
|
|
28
28
|
const { parseFrontmatter, normalizeTools } = require('../../../scripts/lib/frontmatter-parser');
|
|
29
|
-
const {
|
|
29
|
+
const {
|
|
30
|
+
countCommands,
|
|
31
|
+
countAgents,
|
|
32
|
+
countSkills,
|
|
33
|
+
getCounts,
|
|
34
|
+
} = require('../../../scripts/lib/counter');
|
|
30
35
|
|
|
31
36
|
// =============================================================================
|
|
32
37
|
// List Generation Functions
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard Component
|
|
3
|
+
*
|
|
4
|
+
* BETA - Main TUI dashboard view
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const path = require('path');
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
|
|
10
|
+
class Dashboard {
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.statusPath = options.statusPath || path.join(process.cwd(), 'docs', '09-agents', 'status.json');
|
|
13
|
+
this.data = null;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async load() {
|
|
17
|
+
if (!fs.existsSync(this.statusPath)) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
try {
|
|
22
|
+
const content = fs.readFileSync(this.statusPath, 'utf8');
|
|
23
|
+
this.data = JSON.parse(content);
|
|
24
|
+
return true;
|
|
25
|
+
} catch (err) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getStories() {
|
|
31
|
+
if (!this.data) return [];
|
|
32
|
+
return Object.values(this.data).filter(
|
|
33
|
+
s => s && typeof s === 'object' && (s.id || s.story_id)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
getStats() {
|
|
38
|
+
const stories = this.getStories();
|
|
39
|
+
return {
|
|
40
|
+
total: stories.length,
|
|
41
|
+
in_progress: stories.filter(s => ['in_progress', 'in-progress'].includes(s.status)).length,
|
|
42
|
+
blocked: stories.filter(s => s.status === 'blocked').length,
|
|
43
|
+
ready: stories.filter(s => s.status === 'ready').length,
|
|
44
|
+
completed: stories.filter(s => ['completed', 'done'].includes(s.status)).length,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
getCompletionPercentage() {
|
|
49
|
+
const stats = this.getStats();
|
|
50
|
+
if (stats.total === 0) return 0;
|
|
51
|
+
return Math.round((stats.completed / stats.total) * 100);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
getStoriesByStatus(status) {
|
|
55
|
+
const stories = this.getStories();
|
|
56
|
+
if (status === 'in_progress') {
|
|
57
|
+
return stories.filter(s => ['in_progress', 'in-progress'].includes(s.status));
|
|
58
|
+
}
|
|
59
|
+
if (status === 'completed') {
|
|
60
|
+
return stories.filter(s => ['completed', 'done'].includes(s.status));
|
|
61
|
+
}
|
|
62
|
+
return stories.filter(s => s.status === status);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
module.exports = Dashboard;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StoryList Component
|
|
3
|
+
*
|
|
4
|
+
* BETA - Story list rendering for TUI
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
class StoryList {
|
|
8
|
+
constructor(stories = []) {
|
|
9
|
+
this.stories = stories;
|
|
10
|
+
this.selectedIndex = 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setStories(stories) {
|
|
14
|
+
this.stories = stories;
|
|
15
|
+
this.selectedIndex = 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
selectNext() {
|
|
19
|
+
if (this.selectedIndex < this.stories.length - 1) {
|
|
20
|
+
this.selectedIndex++;
|
|
21
|
+
}
|
|
22
|
+
return this.getSelected();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
selectPrev() {
|
|
26
|
+
if (this.selectedIndex > 0) {
|
|
27
|
+
this.selectedIndex--;
|
|
28
|
+
}
|
|
29
|
+
return this.getSelected();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
getSelected() {
|
|
33
|
+
return this.stories[this.selectedIndex] || null;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
filter(predicate) {
|
|
37
|
+
return new StoryList(this.stories.filter(predicate));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
sortByPriority() {
|
|
41
|
+
const priorityOrder = {
|
|
42
|
+
blocked: 0,
|
|
43
|
+
in_progress: 1,
|
|
44
|
+
'in-progress': 1,
|
|
45
|
+
ready: 2,
|
|
46
|
+
draft: 3,
|
|
47
|
+
completed: 4,
|
|
48
|
+
done: 4,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return new StoryList(
|
|
52
|
+
[...this.stories].sort((a, b) => {
|
|
53
|
+
const aPriority = priorityOrder[a.status] ?? 99;
|
|
54
|
+
const bPriority = priorityOrder[b.status] ?? 99;
|
|
55
|
+
return aPriority - bPriority;
|
|
56
|
+
})
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
toArray() {
|
|
61
|
+
return [...this.stories];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
get length() {
|
|
65
|
+
return this.stories.length;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
module.exports = StoryList;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AgileFlow TUI Components
|
|
3
|
+
*
|
|
4
|
+
* BETA - Internal use only, not publicly documented
|
|
5
|
+
*
|
|
6
|
+
* This module contains TUI components for the AgileFlow dashboard.
|
|
7
|
+
* Currently in early development.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const Dashboard = require('./Dashboard');
|
|
11
|
+
const StoryList = require('./StoryList');
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
Dashboard,
|
|
15
|
+
StoryList,
|
|
16
|
+
};
|