@autocode-cli/autocode 0.0.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/README.md +172 -0
- package/bin/autocode +2 -0
- package/dist/cli/commands/comment.d.ts +9 -0
- package/dist/cli/commands/comment.d.ts.map +1 -0
- package/dist/cli/commands/comment.js +37 -0
- package/dist/cli/commands/comment.js.map +1 -0
- package/dist/cli/commands/init.d.ts +9 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +41 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/list.d.ts +9 -0
- package/dist/cli/commands/list.d.ts.map +1 -0
- package/dist/cli/commands/list.js +78 -0
- package/dist/cli/commands/list.js.map +1 -0
- package/dist/cli/commands/move.d.ts +9 -0
- package/dist/cli/commands/move.d.ts.map +1 -0
- package/dist/cli/commands/move.js +59 -0
- package/dist/cli/commands/move.js.map +1 -0
- package/dist/cli/commands/new.d.ts +9 -0
- package/dist/cli/commands/new.d.ts.map +1 -0
- package/dist/cli/commands/new.js +74 -0
- package/dist/cli/commands/new.js.map +1 -0
- package/dist/cli/commands/next.d.ts +9 -0
- package/dist/cli/commands/next.d.ts.map +1 -0
- package/dist/cli/commands/next.js +46 -0
- package/dist/cli/commands/next.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +9 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +55 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/show.d.ts +9 -0
- package/dist/cli/commands/show.d.ts.map +1 -0
- package/dist/cli/commands/show.js +91 -0
- package/dist/cli/commands/show.js.map +1 -0
- package/dist/cli/parser.d.ts +13 -0
- package/dist/cli/parser.d.ts.map +1 -0
- package/dist/cli/parser.js +54 -0
- package/dist/cli/parser.js.map +1 -0
- package/dist/core/column.d.ts +53 -0
- package/dist/core/column.d.ts.map +1 -0
- package/dist/core/column.js +128 -0
- package/dist/core/column.js.map +1 -0
- package/dist/core/ticket.d.ts +50 -0
- package/dist/core/ticket.d.ts.map +1 -0
- package/dist/core/ticket.js +228 -0
- package/dist/core/ticket.js.map +1 -0
- package/dist/core/workflow.d.ts +66 -0
- package/dist/core/workflow.d.ts.map +1 -0
- package/dist/core/workflow.js +176 -0
- package/dist/core/workflow.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/server/api.d.ts +9 -0
- package/dist/server/api.d.ts.map +1 -0
- package/dist/server/api.js +313 -0
- package/dist/server/api.js.map +1 -0
- package/dist/server/dashboard.d.ts +8 -0
- package/dist/server/dashboard.d.ts.map +1 -0
- package/dist/server/dashboard.js +1865 -0
- package/dist/server/dashboard.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +94 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/watcher.d.ts +13 -0
- package/dist/server/watcher.d.ts.map +1 -0
- package/dist/server/watcher.js +62 -0
- package/dist/server/watcher.js.map +1 -0
- package/dist/server/websocket.d.ts +26 -0
- package/dist/server/websocket.d.ts.map +1 -0
- package/dist/server/websocket.js +165 -0
- package/dist/server/websocket.js.map +1 -0
- package/dist/services/claude.d.ts +52 -0
- package/dist/services/claude.d.ts.map +1 -0
- package/dist/services/claude.js +304 -0
- package/dist/services/claude.js.map +1 -0
- package/dist/services/ticket-io.d.ts +76 -0
- package/dist/services/ticket-io.d.ts.map +1 -0
- package/dist/services/ticket-io.js +248 -0
- package/dist/services/ticket-io.js.map +1 -0
- package/dist/types/index.d.ts +79 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/config.d.ts +93 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +96 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/fs.d.ts +60 -0
- package/dist/utils/fs.d.ts.map +1 -0
- package/dist/utils/fs.js +129 -0
- package/dist/utils/fs.js.map +1 -0
- package/dist/utils/logger.d.ts +23 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +57 -0
- package/templates/columns/00_backlog.en.md +31 -0
- package/templates/columns/00_backlog.fr.md +31 -0
- package/templates/columns/01_ready.en.md +30 -0
- package/templates/columns/01_ready.fr.md +30 -0
- package/templates/columns/02_in-progress.en.md +30 -0
- package/templates/columns/02_in-progress.fr.md +30 -0
- package/templates/columns/03_review-best-practices.en.md +31 -0
- package/templates/columns/03_review-best-practices.fr.md +31 -0
- package/templates/columns/04_review-no-duplication.en.md +30 -0
- package/templates/columns/04_review-no-duplication.fr.md +30 -0
- package/templates/columns/05_review-consistency.en.md +31 -0
- package/templates/columns/05_review-consistency.fr.md +31 -0
- package/templates/columns/06_review-security.en.md +32 -0
- package/templates/columns/06_review-security.fr.md +32 -0
- package/templates/columns/07_testing-playwright.en.md +30 -0
- package/templates/columns/07_testing-playwright.fr.md +30 -0
- package/templates/columns/08_testing-cypress.en.md +31 -0
- package/templates/columns/08_testing-cypress.fr.md +31 -0
- package/templates/columns/09_update-docs.en.md +29 -0
- package/templates/columns/09_update-docs.fr.md +29 -0
- package/templates/columns/10_deploy-staging.en.md +29 -0
- package/templates/columns/10_deploy-staging.fr.md +29 -0
- package/templates/columns/11_validate-staging.en.md +32 -0
- package/templates/columns/11_validate-staging.fr.md +32 -0
- package/templates/columns/12_done.en.md +23 -0
- package/templates/columns/12_done.fr.md +23 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* serve command - Start web dashboard server
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { getConfig, DEFAULT_PORT } from '../../utils/config.js';
|
|
6
|
+
import { ensureColumnStructure, copyActionTemplates } from '../../core/column.js';
|
|
7
|
+
import { ensureDir, pathExists, writeFileSafe } from '../../utils/fs.js';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
import { logger } from '../../utils/logger.js';
|
|
10
|
+
/**
|
|
11
|
+
* Create the serve command
|
|
12
|
+
*/
|
|
13
|
+
export function serveCommand() {
|
|
14
|
+
const cmd = new Command('serve');
|
|
15
|
+
cmd
|
|
16
|
+
.description('Start the web dashboard server')
|
|
17
|
+
.option('-p, --port <port>', 'Server port', String(DEFAULT_PORT))
|
|
18
|
+
.action(async (options) => {
|
|
19
|
+
const port = parseInt(options.port, 10) || DEFAULT_PORT;
|
|
20
|
+
const config = getConfig();
|
|
21
|
+
// Auto-initialize if directory doesn't exist
|
|
22
|
+
if (!pathExists(config.root)) {
|
|
23
|
+
logger.info(`Initializing autocode in ${config.root}...`);
|
|
24
|
+
logger.info(' → Creating root directory...');
|
|
25
|
+
ensureDir(config.root);
|
|
26
|
+
logger.info(' → Creating 13 column directories with tickets folders...');
|
|
27
|
+
ensureColumnStructure(config.root);
|
|
28
|
+
logger.info(' → Copying ACTION.md templates (EN + FR) for each column...');
|
|
29
|
+
copyActionTemplates(config.root, config.lang);
|
|
30
|
+
// Create .seq file
|
|
31
|
+
const seqFile = join(config.root, '.seq');
|
|
32
|
+
if (!pathExists(seqFile)) {
|
|
33
|
+
logger.info(' → Creating sequence counter (.seq)...');
|
|
34
|
+
writeFileSafe(seqFile, '0');
|
|
35
|
+
}
|
|
36
|
+
logger.success(`Autocode initialized in ${config.root}`);
|
|
37
|
+
logger.info('');
|
|
38
|
+
}
|
|
39
|
+
logger.info(`Starting dashboard server...`);
|
|
40
|
+
logger.info(` → Port: ${port}`);
|
|
41
|
+
logger.info(` → Root: ${config.root}`);
|
|
42
|
+
logger.info(` → Language: ${config.lang}`);
|
|
43
|
+
// Dynamically import server to avoid circular dependencies
|
|
44
|
+
try {
|
|
45
|
+
const { startServer } = await import('../../server/index.js');
|
|
46
|
+
await startServer(port);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
logger.error(`Failed to start server: ${error}`);
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
return cmd;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=serve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/cli/commands/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjC,GAAG;SACA,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,mBAAmB,EAAE,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;SAChE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC;QACxD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAE3B,6CAA6C;QAC7C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,4BAA4B,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC;YAE1D,MAAM,CAAC,IAAI,CAAC,gCA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CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/show.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC;;GAEG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAyBrC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* show command - Show ticket details
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { getTicket } from '../../core/ticket.js';
|
|
6
|
+
import { getProgress } from '../../core/workflow.js';
|
|
7
|
+
import { getConfig } from '../../utils/config.js';
|
|
8
|
+
import { logger } from '../../utils/logger.js';
|
|
9
|
+
/**
|
|
10
|
+
* Create the show command
|
|
11
|
+
*/
|
|
12
|
+
export function showCommand() {
|
|
13
|
+
const cmd = new Command('show');
|
|
14
|
+
cmd
|
|
15
|
+
.description('Show ticket details')
|
|
16
|
+
.argument('<key>', 'Ticket key (e.g., AC-000001)')
|
|
17
|
+
.option('--json', 'Output as JSON')
|
|
18
|
+
.action((key, options) => {
|
|
19
|
+
const config = getConfig();
|
|
20
|
+
const ticket = getTicket(config.root, key);
|
|
21
|
+
if (!ticket) {
|
|
22
|
+
logger.error(`Ticket '${key}' not found`);
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
if (options.json) {
|
|
26
|
+
console.log(JSON.stringify(ticket, null, 2));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
printTicketDetails(ticket);
|
|
30
|
+
});
|
|
31
|
+
return cmd;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Print full ticket details
|
|
35
|
+
*/
|
|
36
|
+
function printTicketDetails(ticket) {
|
|
37
|
+
const progress = getProgress(ticket);
|
|
38
|
+
logger.blank();
|
|
39
|
+
console.log(logger.bold(`${ticket.key}: ${ticket.title}`));
|
|
40
|
+
logger.separator();
|
|
41
|
+
logger.row('Status', ticket.status);
|
|
42
|
+
logger.row('Priority', logger.priority(ticket.priority));
|
|
43
|
+
logger.row('Progress', `${progress}%`);
|
|
44
|
+
logger.row('Semver', ticket.semver);
|
|
45
|
+
if (ticket.labels.length > 0) {
|
|
46
|
+
logger.row('Labels', ticket.labels.join(', '));
|
|
47
|
+
}
|
|
48
|
+
if (ticket.assignee) {
|
|
49
|
+
logger.row('Assignee', ticket.assignee);
|
|
50
|
+
}
|
|
51
|
+
logger.blank();
|
|
52
|
+
logger.row('Created', ticket.created_at);
|
|
53
|
+
logger.row('Updated', ticket.updated_at);
|
|
54
|
+
// Description
|
|
55
|
+
if (ticket.description && ticket.description !== '[Description]') {
|
|
56
|
+
logger.blank();
|
|
57
|
+
console.log(logger.bold('Description:'));
|
|
58
|
+
console.log(ticket.description);
|
|
59
|
+
}
|
|
60
|
+
// Acceptance Criteria
|
|
61
|
+
if (ticket.acceptance_criteria.length > 0) {
|
|
62
|
+
logger.blank();
|
|
63
|
+
console.log(logger.bold('Acceptance Criteria:'));
|
|
64
|
+
for (const criterion of ticket.acceptance_criteria) {
|
|
65
|
+
console.log(` - ${criterion}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Comments
|
|
69
|
+
if (ticket.comments.length > 0) {
|
|
70
|
+
logger.blank();
|
|
71
|
+
console.log(logger.bold(`Comments (${ticket.comments.length}):`));
|
|
72
|
+
for (const comment of ticket.comments) {
|
|
73
|
+
logger.blank();
|
|
74
|
+
console.log(logger.dim(`[${comment.column}] ${comment.created_at}`));
|
|
75
|
+
console.log(comment.text);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// History
|
|
79
|
+
if (ticket.history.length > 0) {
|
|
80
|
+
logger.blank();
|
|
81
|
+
console.log(logger.bold('History:'));
|
|
82
|
+
for (const entry of ticket.history) {
|
|
83
|
+
const action = entry.action;
|
|
84
|
+
const from = entry.from || '-';
|
|
85
|
+
const to = entry.to;
|
|
86
|
+
console.log(logger.dim(` ${entry.at}: ${action} ${from} → ${to}`));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
logger.blank();
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../../src/cli/commands/show.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG/C;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEhC,GAAG;SACA,WAAW,CAAC,qBAAqB,CAAC;SAClC,QAAQ,CAAC,OAAO,EAAE,8BAA8B,CAAC;SACjD,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;SAClC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAE3C,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,OAAO,CAAC,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IACH,CAAC;IAED,UAAU;IACV,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;QACrC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,GAAG,CAAC;YAC/B,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,EAAE,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI argument parser using Commander.js
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
/**
|
|
6
|
+
* Create and configure the CLI program
|
|
7
|
+
*/
|
|
8
|
+
export declare function createProgram(): Command;
|
|
9
|
+
/**
|
|
10
|
+
* Parse and execute CLI
|
|
11
|
+
*/
|
|
12
|
+
export declare function runCLI(args?: string[]): void;
|
|
13
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAgCvC;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,IAAI,GAAE,MAAM,EAAiB,GAAG,IAAI,CAG1D"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI argument parser using Commander.js
|
|
3
|
+
*/
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { initCommand } from './commands/init.js';
|
|
6
|
+
import { newCommand } from './commands/new.js';
|
|
7
|
+
import { listCommand } from './commands/list.js';
|
|
8
|
+
import { showCommand } from './commands/show.js';
|
|
9
|
+
import { moveCommand } from './commands/move.js';
|
|
10
|
+
import { nextCommand } from './commands/next.js';
|
|
11
|
+
import { commentCommand } from './commands/comment.js';
|
|
12
|
+
import { serveCommand } from './commands/serve.js';
|
|
13
|
+
const VERSION = '2.0.0';
|
|
14
|
+
/**
|
|
15
|
+
* Create and configure the CLI program
|
|
16
|
+
*/
|
|
17
|
+
export function createProgram() {
|
|
18
|
+
const program = new Command();
|
|
19
|
+
program
|
|
20
|
+
.name('autocode')
|
|
21
|
+
.description('Filesystem-based ticket system with web dashboard')
|
|
22
|
+
.version(VERSION);
|
|
23
|
+
// Register commands
|
|
24
|
+
program.addCommand(initCommand());
|
|
25
|
+
program.addCommand(newCommand());
|
|
26
|
+
program.addCommand(listCommand());
|
|
27
|
+
program.addCommand(showCommand());
|
|
28
|
+
program.addCommand(moveCommand());
|
|
29
|
+
program.addCommand(nextCommand());
|
|
30
|
+
program.addCommand(commentCommand());
|
|
31
|
+
program.addCommand(serveCommand());
|
|
32
|
+
// Shortcut: autocode AC-000001 => show
|
|
33
|
+
program
|
|
34
|
+
.argument('[key]', 'Ticket key to show details')
|
|
35
|
+
.action((key) => {
|
|
36
|
+
if (key && key.match(/^AC-\d{6}$/)) {
|
|
37
|
+
// Dynamically run show command
|
|
38
|
+
program.parse(['node', 'autocode', 'show', key]);
|
|
39
|
+
}
|
|
40
|
+
else if (key) {
|
|
41
|
+
console.error(`Unknown command or invalid ticket key: ${key}`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return program;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse and execute CLI
|
|
49
|
+
*/
|
|
50
|
+
export function runCLI(args = process.argv) {
|
|
51
|
+
const program = createProgram();
|
|
52
|
+
program.parse(args);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,UAAU,CAAC;SAChB,WAAW,CAAC,mDAAmD,CAAC;SAChE,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB,oBAAoB;IACpB,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;IACjC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC;IAEnC,uCAAuC;IACvC,OAAO;SACJ,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;SAC/C,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE;QACd,IAAI,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,EAAE,CAAC;YACnC,+BAA+B;YAC/B,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;QACnD,CAAC;aAAM,IAAI,GAAG,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,0CAA0C,GAAG,EAAE,CAAC,CAAC;YAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,MAAM,CAAC,OAAiB,OAAO,CAAC,IAAI;IAClD,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column management
|
|
3
|
+
*/
|
|
4
|
+
import type { Column, Language } from '../types/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Get all column definitions
|
|
7
|
+
*/
|
|
8
|
+
export declare function getColumns(): Column[];
|
|
9
|
+
/**
|
|
10
|
+
* Get a column by its slug
|
|
11
|
+
*/
|
|
12
|
+
export declare function getColumnBySlug(slug: string): Column | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Get a column by its name
|
|
15
|
+
*/
|
|
16
|
+
export declare function getColumnByName(name: string): Column | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Get a column by its index
|
|
19
|
+
*/
|
|
20
|
+
export declare function getColumnByIndex(index: number): Column | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Get the next column in the workflow
|
|
23
|
+
*/
|
|
24
|
+
export declare function getNextColumn(currentSlug: string): Column | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Get the previous column in the workflow
|
|
27
|
+
*/
|
|
28
|
+
export declare function getPreviousColumn(currentSlug: string): Column | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Check if a transition is valid (only forward by 1, unless forced)
|
|
31
|
+
*/
|
|
32
|
+
export declare function isValidTransition(fromSlug: string, toSlug: string, force?: boolean): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Get column name from ACTION.md file
|
|
35
|
+
*/
|
|
36
|
+
export declare function getColumnNameFromAction(rootDir: string, slug: string, lang?: Language): string;
|
|
37
|
+
/**
|
|
38
|
+
* Ensure all column directories exist
|
|
39
|
+
*/
|
|
40
|
+
export declare function ensureColumnStructure(rootDir: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Scan existing columns in root directory
|
|
43
|
+
*/
|
|
44
|
+
export declare function scanColumns(rootDir: string, lang?: Language): Column[];
|
|
45
|
+
/**
|
|
46
|
+
* Check if column is actionable (not backlog or done)
|
|
47
|
+
*/
|
|
48
|
+
export declare function isActionableColumn(slug: string): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Copy ACTION.md templates for all columns
|
|
51
|
+
*/
|
|
52
|
+
export declare function copyActionTemplates(rootDir: string, lang?: Language): void;
|
|
53
|
+
//# sourceMappingURL=column.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../src/core/column.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,QA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'node:path';
|
|
5
|
+
import { COLUMNS, getTemplatesDir } from '../utils/config.js';
|
|
6
|
+
import { ensureDir, readFileSafe, pathExists, listDirs, copyFile } from '../utils/fs.js';
|
|
7
|
+
/**
|
|
8
|
+
* Get all column definitions
|
|
9
|
+
*/
|
|
10
|
+
export function getColumns() {
|
|
11
|
+
return [...COLUMNS];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get a column by its slug
|
|
15
|
+
*/
|
|
16
|
+
export function getColumnBySlug(slug) {
|
|
17
|
+
return COLUMNS.find(c => c.slug === slug);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Get a column by its name
|
|
21
|
+
*/
|
|
22
|
+
export function getColumnByName(name) {
|
|
23
|
+
return COLUMNS.find(c => c.name.toLowerCase() === name.toLowerCase());
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get a column by its index
|
|
27
|
+
*/
|
|
28
|
+
export function getColumnByIndex(index) {
|
|
29
|
+
return COLUMNS.find(c => c.index === index);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get the next column in the workflow
|
|
33
|
+
*/
|
|
34
|
+
export function getNextColumn(currentSlug) {
|
|
35
|
+
const current = getColumnBySlug(currentSlug);
|
|
36
|
+
if (!current)
|
|
37
|
+
return undefined;
|
|
38
|
+
return getColumnByIndex(current.index + 1);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get the previous column in the workflow
|
|
42
|
+
*/
|
|
43
|
+
export function getPreviousColumn(currentSlug) {
|
|
44
|
+
const current = getColumnBySlug(currentSlug);
|
|
45
|
+
if (!current || current.index === 0)
|
|
46
|
+
return undefined;
|
|
47
|
+
return getColumnByIndex(current.index - 1);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Check if a transition is valid (only forward by 1, unless forced)
|
|
51
|
+
*/
|
|
52
|
+
export function isValidTransition(fromSlug, toSlug, force = false) {
|
|
53
|
+
if (force)
|
|
54
|
+
return true;
|
|
55
|
+
const from = getColumnBySlug(fromSlug);
|
|
56
|
+
const to = getColumnBySlug(toSlug);
|
|
57
|
+
if (!from || !to)
|
|
58
|
+
return false;
|
|
59
|
+
// Can only move forward by one
|
|
60
|
+
return to.index === from.index + 1;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get column name from ACTION.md file
|
|
64
|
+
*/
|
|
65
|
+
export function getColumnNameFromAction(rootDir, slug, lang = 'en') {
|
|
66
|
+
const actionFile = join(rootDir, slug, `ACTION.${lang}.md`);
|
|
67
|
+
const content = readFileSafe(actionFile);
|
|
68
|
+
if (!content) {
|
|
69
|
+
// Fallback to column definition
|
|
70
|
+
const col = getColumnBySlug(slug);
|
|
71
|
+
return col?.name || slug;
|
|
72
|
+
}
|
|
73
|
+
// First line is the title (# Column Name)
|
|
74
|
+
const firstLine = content.split('\n')[0];
|
|
75
|
+
return firstLine.replace(/^#\s*/, '').trim();
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Ensure all column directories exist
|
|
79
|
+
*/
|
|
80
|
+
export function ensureColumnStructure(rootDir) {
|
|
81
|
+
for (const column of COLUMNS) {
|
|
82
|
+
const columnDir = join(rootDir, column.slug);
|
|
83
|
+
const ticketsDir = join(columnDir, 'tickets');
|
|
84
|
+
ensureDir(columnDir);
|
|
85
|
+
ensureDir(ticketsDir);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Scan existing columns in root directory
|
|
90
|
+
*/
|
|
91
|
+
export function scanColumns(rootDir, lang = 'en') {
|
|
92
|
+
const dirs = listDirs(rootDir).filter(d => /^\d{2}_/.test(d)).sort();
|
|
93
|
+
return dirs.map((slug, index) => ({
|
|
94
|
+
slug,
|
|
95
|
+
name: getColumnNameFromAction(rootDir, slug, lang),
|
|
96
|
+
index,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Check if column is actionable (not backlog or done)
|
|
101
|
+
*/
|
|
102
|
+
export function isActionableColumn(slug) {
|
|
103
|
+
const col = getColumnBySlug(slug);
|
|
104
|
+
if (!col)
|
|
105
|
+
return false;
|
|
106
|
+
// Skip backlog (0) and done (12)
|
|
107
|
+
return col.index > 0 && col.index < 12;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Copy ACTION.md templates for all columns
|
|
111
|
+
*/
|
|
112
|
+
export function copyActionTemplates(rootDir, lang = 'en') {
|
|
113
|
+
const templatesDir = join(getTemplatesDir(), 'columns');
|
|
114
|
+
for (const column of COLUMNS) {
|
|
115
|
+
const columnDir = join(rootDir, column.slug);
|
|
116
|
+
// Copy both EN and FR templates (or just the requested language)
|
|
117
|
+
const languages = ['en', 'fr'];
|
|
118
|
+
for (const l of languages) {
|
|
119
|
+
const templateFile = join(templatesDir, `${column.slug}.${l}.md`);
|
|
120
|
+
const targetFile = join(columnDir, `ACTION.${l}.md`);
|
|
121
|
+
// Only copy if template exists and target doesn't
|
|
122
|
+
if (pathExists(templateFile) && !pathExists(targetFile)) {
|
|
123
|
+
copyFile(templateFile, targetFile);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column.js","sourceRoot":"","sources":["../../src/core/column.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGzF;;GAEG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IA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AE,CAAC;gBACxD,QAAQ,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ticket CRUD operations - Multi-file structure
|
|
3
|
+
*/
|
|
4
|
+
import type { Ticket, TicketCreateInput, TicketUpdateInput } from '../types/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Find a ticket directory by its key
|
|
7
|
+
*/
|
|
8
|
+
export declare function findTicketDir(rootDir: string, key: string): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Find a ticket path by its key (for backwards compatibility)
|
|
11
|
+
* @deprecated Use findTicketDir instead
|
|
12
|
+
*/
|
|
13
|
+
export declare function findTicketPath(rootDir: string, key: string): string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Get a ticket by its key
|
|
16
|
+
*/
|
|
17
|
+
export declare function getTicket(rootDir: string, key: string): Ticket | null;
|
|
18
|
+
/**
|
|
19
|
+
* Create a new ticket
|
|
20
|
+
*/
|
|
21
|
+
export declare function createTicket(rootDir: string, input: TicketCreateInput): Ticket;
|
|
22
|
+
/**
|
|
23
|
+
* Update a ticket
|
|
24
|
+
*/
|
|
25
|
+
export declare function updateTicket(rootDir: string, key: string, updates: TicketUpdateInput): Ticket | null;
|
|
26
|
+
/**
|
|
27
|
+
* Add a comment to a ticket
|
|
28
|
+
*/
|
|
29
|
+
export declare function addComment(rootDir: string, key: string, text: string, column?: string): Ticket | null;
|
|
30
|
+
/**
|
|
31
|
+
* Move a ticket to a new column
|
|
32
|
+
*/
|
|
33
|
+
export declare function moveTicket(rootDir: string, key: string, toColumnName: string, force?: boolean): Ticket | null;
|
|
34
|
+
/**
|
|
35
|
+
* Move a ticket to the next column
|
|
36
|
+
*/
|
|
37
|
+
export declare function nextTicket(rootDir: string, key: string): Ticket | null;
|
|
38
|
+
/**
|
|
39
|
+
* List all tickets
|
|
40
|
+
*/
|
|
41
|
+
export declare function listTickets(rootDir: string): Ticket[];
|
|
42
|
+
/**
|
|
43
|
+
* List tickets in a specific column
|
|
44
|
+
*/
|
|
45
|
+
export declare function listTicketsInColumn(rootDir: string, columnSlug: string): Ticket[];
|
|
46
|
+
/**
|
|
47
|
+
* Find the first actionable ticket (for Claude processing)
|
|
48
|
+
*/
|
|
49
|
+
export declare function findActionableTicket(rootDir: string): Ticket | null;
|
|
50
|
+
//# sourceMappingURL=ticket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ticket.d.ts","sourceRoot":"","sources":["../../src/core/ticket.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwBH,OAAO,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAY,MAAM,mBAAmB,CAAC;AAEhG;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgBzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI1E;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKrE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAiC9E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CA+BpG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI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