@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.
Files changed (125) hide show
  1. package/README.md +172 -0
  2. package/bin/autocode +2 -0
  3. package/dist/cli/commands/comment.d.ts +9 -0
  4. package/dist/cli/commands/comment.d.ts.map +1 -0
  5. package/dist/cli/commands/comment.js +37 -0
  6. package/dist/cli/commands/comment.js.map +1 -0
  7. package/dist/cli/commands/init.d.ts +9 -0
  8. package/dist/cli/commands/init.d.ts.map +1 -0
  9. package/dist/cli/commands/init.js +41 -0
  10. package/dist/cli/commands/init.js.map +1 -0
  11. package/dist/cli/commands/list.d.ts +9 -0
  12. package/dist/cli/commands/list.d.ts.map +1 -0
  13. package/dist/cli/commands/list.js +78 -0
  14. package/dist/cli/commands/list.js.map +1 -0
  15. package/dist/cli/commands/move.d.ts +9 -0
  16. package/dist/cli/commands/move.d.ts.map +1 -0
  17. package/dist/cli/commands/move.js +59 -0
  18. package/dist/cli/commands/move.js.map +1 -0
  19. package/dist/cli/commands/new.d.ts +9 -0
  20. package/dist/cli/commands/new.d.ts.map +1 -0
  21. package/dist/cli/commands/new.js +74 -0
  22. package/dist/cli/commands/new.js.map +1 -0
  23. package/dist/cli/commands/next.d.ts +9 -0
  24. package/dist/cli/commands/next.d.ts.map +1 -0
  25. package/dist/cli/commands/next.js +46 -0
  26. package/dist/cli/commands/next.js.map +1 -0
  27. package/dist/cli/commands/serve.d.ts +9 -0
  28. package/dist/cli/commands/serve.d.ts.map +1 -0
  29. package/dist/cli/commands/serve.js +55 -0
  30. package/dist/cli/commands/serve.js.map +1 -0
  31. package/dist/cli/commands/show.d.ts +9 -0
  32. package/dist/cli/commands/show.d.ts.map +1 -0
  33. package/dist/cli/commands/show.js +91 -0
  34. package/dist/cli/commands/show.js.map +1 -0
  35. package/dist/cli/parser.d.ts +13 -0
  36. package/dist/cli/parser.d.ts.map +1 -0
  37. package/dist/cli/parser.js +54 -0
  38. package/dist/cli/parser.js.map +1 -0
  39. package/dist/core/column.d.ts +53 -0
  40. package/dist/core/column.d.ts.map +1 -0
  41. package/dist/core/column.js +128 -0
  42. package/dist/core/column.js.map +1 -0
  43. package/dist/core/ticket.d.ts +50 -0
  44. package/dist/core/ticket.d.ts.map +1 -0
  45. package/dist/core/ticket.js +228 -0
  46. package/dist/core/ticket.js.map +1 -0
  47. package/dist/core/workflow.d.ts +66 -0
  48. package/dist/core/workflow.d.ts.map +1 -0
  49. package/dist/core/workflow.js +176 -0
  50. package/dist/core/workflow.js.map +1 -0
  51. package/dist/index.d.ts +8 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +9 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/server/api.d.ts +9 -0
  56. package/dist/server/api.d.ts.map +1 -0
  57. package/dist/server/api.js +313 -0
  58. package/dist/server/api.js.map +1 -0
  59. package/dist/server/dashboard.d.ts +8 -0
  60. package/dist/server/dashboard.d.ts.map +1 -0
  61. package/dist/server/dashboard.js +1865 -0
  62. package/dist/server/dashboard.js.map +1 -0
  63. package/dist/server/index.d.ts +8 -0
  64. package/dist/server/index.d.ts.map +1 -0
  65. package/dist/server/index.js +94 -0
  66. package/dist/server/index.js.map +1 -0
  67. package/dist/server/watcher.d.ts +13 -0
  68. package/dist/server/watcher.d.ts.map +1 -0
  69. package/dist/server/watcher.js +62 -0
  70. package/dist/server/watcher.js.map +1 -0
  71. package/dist/server/websocket.d.ts +26 -0
  72. package/dist/server/websocket.d.ts.map +1 -0
  73. package/dist/server/websocket.js +165 -0
  74. package/dist/server/websocket.js.map +1 -0
  75. package/dist/services/claude.d.ts +52 -0
  76. package/dist/services/claude.d.ts.map +1 -0
  77. package/dist/services/claude.js +304 -0
  78. package/dist/services/claude.js.map +1 -0
  79. package/dist/services/ticket-io.d.ts +76 -0
  80. package/dist/services/ticket-io.d.ts.map +1 -0
  81. package/dist/services/ticket-io.js +248 -0
  82. package/dist/services/ticket-io.js.map +1 -0
  83. package/dist/types/index.d.ts +79 -0
  84. package/dist/types/index.d.ts.map +1 -0
  85. package/dist/types/index.js +5 -0
  86. package/dist/types/index.js.map +1 -0
  87. package/dist/utils/config.d.ts +93 -0
  88. package/dist/utils/config.d.ts.map +1 -0
  89. package/dist/utils/config.js +96 -0
  90. package/dist/utils/config.js.map +1 -0
  91. package/dist/utils/fs.d.ts +60 -0
  92. package/dist/utils/fs.d.ts.map +1 -0
  93. package/dist/utils/fs.js +129 -0
  94. package/dist/utils/fs.js.map +1 -0
  95. package/dist/utils/logger.d.ts +23 -0
  96. package/dist/utils/logger.d.ts.map +1 -0
  97. package/dist/utils/logger.js +56 -0
  98. package/dist/utils/logger.js.map +1 -0
  99. package/package.json +57 -0
  100. package/templates/columns/00_backlog.en.md +31 -0
  101. package/templates/columns/00_backlog.fr.md +31 -0
  102. package/templates/columns/01_ready.en.md +30 -0
  103. package/templates/columns/01_ready.fr.md +30 -0
  104. package/templates/columns/02_in-progress.en.md +30 -0
  105. package/templates/columns/02_in-progress.fr.md +30 -0
  106. package/templates/columns/03_review-best-practices.en.md +31 -0
  107. package/templates/columns/03_review-best-practices.fr.md +31 -0
  108. package/templates/columns/04_review-no-duplication.en.md +30 -0
  109. package/templates/columns/04_review-no-duplication.fr.md +30 -0
  110. package/templates/columns/05_review-consistency.en.md +31 -0
  111. package/templates/columns/05_review-consistency.fr.md +31 -0
  112. package/templates/columns/06_review-security.en.md +32 -0
  113. package/templates/columns/06_review-security.fr.md +32 -0
  114. package/templates/columns/07_testing-playwright.en.md +30 -0
  115. package/templates/columns/07_testing-playwright.fr.md +30 -0
  116. package/templates/columns/08_testing-cypress.en.md +31 -0
  117. package/templates/columns/08_testing-cypress.fr.md +31 -0
  118. package/templates/columns/09_update-docs.en.md +29 -0
  119. package/templates/columns/09_update-docs.fr.md +29 -0
  120. package/templates/columns/10_deploy-staging.en.md +29 -0
  121. package/templates/columns/10_deploy-staging.fr.md +29 -0
  122. package/templates/columns/11_validate-staging.en.md +32 -0
  123. package/templates/columns/11_validate-staging.fr.md +32 -0
  124. package/templates/columns/12_done.en.md +23 -0
  125. package/templates/columns/12_done.fr.md +23 -0
@@ -0,0 +1,79 @@
1
+ /**
2
+ * AutoCode Types
3
+ */
4
+ export type Priority = 'P0' | 'P1' | 'P2' | 'P3';
5
+ export type SemverType = 'major' | 'minor' | 'patch' | 'none';
6
+ export type Language = 'fr' | 'en';
7
+ export interface Comment {
8
+ text: string;
9
+ column: string;
10
+ created_at: string;
11
+ }
12
+ export interface HistoryEntry {
13
+ at: string;
14
+ action: 'created' | 'moved' | 'started' | 'forced';
15
+ from: string | null;
16
+ to: string;
17
+ }
18
+ export interface Ticket {
19
+ key: string;
20
+ title: string;
21
+ status: string;
22
+ column_slug: string;
23
+ priority: Priority;
24
+ labels: string[];
25
+ description: string;
26
+ acceptance_criteria: string[];
27
+ semver: SemverType;
28
+ assignee: string | null;
29
+ reporter: string | null;
30
+ comments: Comment[];
31
+ history: HistoryEntry[];
32
+ created_at: string;
33
+ updated_at: string;
34
+ _path?: string;
35
+ _body?: string;
36
+ }
37
+ export interface Column {
38
+ slug: string;
39
+ name: string;
40
+ index: number;
41
+ }
42
+ export interface Config {
43
+ root: string;
44
+ lang: Language;
45
+ port: number;
46
+ claudeEnabled: boolean;
47
+ claudeTimeout: number;
48
+ }
49
+ export interface TicketCreateInput {
50
+ title: string;
51
+ priority?: Priority;
52
+ labels?: string[];
53
+ description?: string;
54
+ acceptance_criteria?: string[];
55
+ semver?: SemverType;
56
+ }
57
+ export interface TicketUpdateInput {
58
+ title?: string;
59
+ priority?: Priority;
60
+ labels?: string[];
61
+ description?: string;
62
+ acceptance_criteria?: string[];
63
+ semver?: SemverType;
64
+ }
65
+ export interface ApiResponse<T = unknown> {
66
+ success: boolean;
67
+ data?: T;
68
+ error?: string;
69
+ }
70
+ export interface DashboardData {
71
+ tickets: Ticket[];
72
+ columns: Column[];
73
+ generatedAt: string;
74
+ }
75
+ export interface WorkflowValidation {
76
+ valid: boolean;
77
+ reason?: string;
78
+ }
79
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACjD,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAC9D,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnC,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEnB,KAAK,CAA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AC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * AutoCode Types
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Configuration management and project root detection
3
+ */
4
+ import type { Config } from '../types/index.js';
5
+ /**
6
+ * Find the project root by looking for package.json
7
+ */
8
+ export declare function findProjectRoot(startDir?: string): string;
9
+ /**
10
+ * Get the package directory (where autocode-cli is installed)
11
+ */
12
+ export declare function getPackageDir(): string;
13
+ /**
14
+ * Get the templates directory
15
+ */
16
+ export declare function getTemplatesDir(): string;
17
+ /**
18
+ * Default configuration
19
+ */
20
+ export declare const defaultConfig: Config;
21
+ /**
22
+ * Create a config object from environment and defaults
23
+ */
24
+ export declare function createConfig(overrides?: Partial<Config>): Config;
25
+ /**
26
+ * Column definitions - aligned with legacy autocode.sh
27
+ */
28
+ export declare const COLUMNS: readonly [{
29
+ readonly slug: "00_backlog";
30
+ readonly name: "Backlog";
31
+ readonly index: 0;
32
+ }, {
33
+ readonly slug: "01_ready";
34
+ readonly name: "Ready";
35
+ readonly index: 1;
36
+ }, {
37
+ readonly slug: "02_in-progress";
38
+ readonly name: "In Progress";
39
+ readonly index: 2;
40
+ }, {
41
+ readonly slug: "03_review-best-practices";
42
+ readonly name: "Review Best Practices";
43
+ readonly index: 3;
44
+ }, {
45
+ readonly slug: "04_review-no-duplication";
46
+ readonly name: "Review No Duplication";
47
+ readonly index: 4;
48
+ }, {
49
+ readonly slug: "05_review-consistency";
50
+ readonly name: "Review Consistency";
51
+ readonly index: 5;
52
+ }, {
53
+ readonly slug: "06_review-security";
54
+ readonly name: "Review Security";
55
+ readonly index: 6;
56
+ }, {
57
+ readonly slug: "07_testing-playwright";
58
+ readonly name: "Testing Playwright";
59
+ readonly index: 7;
60
+ }, {
61
+ readonly slug: "08_testing-cypress";
62
+ readonly name: "Testing Cypress";
63
+ readonly index: 8;
64
+ }, {
65
+ readonly slug: "09_update-docs";
66
+ readonly name: "Update Docs";
67
+ readonly index: 9;
68
+ }, {
69
+ readonly slug: "10_deploy-staging";
70
+ readonly name: "Deploy Staging";
71
+ readonly index: 10;
72
+ }, {
73
+ readonly slug: "11_validate-staging";
74
+ readonly name: "Validate Staging";
75
+ readonly index: 11;
76
+ }, {
77
+ readonly slug: "12_done";
78
+ readonly name: "Done";
79
+ readonly index: 12;
80
+ }];
81
+ export type ColumnSlug = typeof COLUMNS[number]['slug'];
82
+ export type ColumnName = typeof COLUMNS[number]['name'];
83
+ export declare const DEFAULT_ROOT: string;
84
+ export declare const DEFAULT_PORT: number;
85
+ /**
86
+ * Get the current configuration (singleton)
87
+ */
88
+ export declare function getConfig(): Config;
89
+ /**
90
+ * Reset config cache (useful for testing)
91
+ */
92
+ export declare function resetConfig(): void;
93
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAY,MAAM,mBAAmB,CAAC;AAI1D;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,GAAE,MAAsB,GAAG,MAAM,CAWxE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAExC;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAM3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,GAAE,OAAO,CAAC,MAAM,CAAM,GAAG,MAAM,CAWpE;AAED;;GAEG;AACH,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcV,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAGxD,eAAO,MAAM,YAAY,QAAqB,CAAC;AAC/C,eAAO,MAAM,YAAY,QAAqB,CAAC;AAK/C;;GAEG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAKlC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAElC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Configuration management and project root detection
3
+ */
4
+ import { existsSync } from 'node:fs';
5
+ import { dirname, resolve } from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ /**
9
+ * Find the project root by looking for package.json
10
+ */
11
+ export function findProjectRoot(startDir = process.cwd()) {
12
+ let current = startDir;
13
+ while (current !== '/') {
14
+ if (existsSync(resolve(current, 'package.json'))) {
15
+ return current;
16
+ }
17
+ current = dirname(current);
18
+ }
19
+ return process.cwd();
20
+ }
21
+ /**
22
+ * Get the package directory (where autocode-cli is installed)
23
+ */
24
+ export function getPackageDir() {
25
+ // Go up from src/utils to package root
26
+ return resolve(__dirname, '..', '..');
27
+ }
28
+ /**
29
+ * Get the templates directory
30
+ */
31
+ export function getTemplatesDir() {
32
+ return resolve(getPackageDir(), 'templates');
33
+ }
34
+ /**
35
+ * Default configuration
36
+ */
37
+ export const defaultConfig = {
38
+ root: 'autodoc',
39
+ lang: 'en',
40
+ port: 3333,
41
+ claudeEnabled: true,
42
+ claudeTimeout: 900000, // 15 minutes
43
+ };
44
+ /**
45
+ * Create a config object from environment and defaults
46
+ */
47
+ export function createConfig(overrides = {}) {
48
+ // Use current working directory for autodoc folder (not package root)
49
+ const cwd = process.cwd();
50
+ return {
51
+ root: resolve(cwd, overrides.root || process.env.AUTOCODE_ROOT || defaultConfig.root),
52
+ lang: (overrides.lang || process.env.AUTOCODE_LANG || defaultConfig.lang),
53
+ port: overrides.port || parseInt(process.env.AUTOCODE_PORT || '', 10) || defaultConfig.port,
54
+ claudeEnabled: overrides.claudeEnabled ?? (process.env.AUTOCODE_CLAUDE !== 'false'),
55
+ claudeTimeout: overrides.claudeTimeout || parseInt(process.env.AUTOCODE_CLAUDE_TIMEOUT || '', 10) || defaultConfig.claudeTimeout,
56
+ };
57
+ }
58
+ /**
59
+ * Column definitions - aligned with legacy autocode.sh
60
+ */
61
+ export const COLUMNS = [
62
+ { slug: '00_backlog', name: 'Backlog', index: 0 },
63
+ { slug: '01_ready', name: 'Ready', index: 1 },
64
+ { slug: '02_in-progress', name: 'In Progress', index: 2 },
65
+ { slug: '03_review-best-practices', name: 'Review Best Practices', index: 3 },
66
+ { slug: '04_review-no-duplication', name: 'Review No Duplication', index: 4 },
67
+ { slug: '05_review-consistency', name: 'Review Consistency', index: 5 },
68
+ { slug: '06_review-security', name: 'Review Security', index: 6 },
69
+ { slug: '07_testing-playwright', name: 'Testing Playwright', index: 7 },
70
+ { slug: '08_testing-cypress', name: 'Testing Cypress', index: 8 },
71
+ { slug: '09_update-docs', name: 'Update Docs', index: 9 },
72
+ { slug: '10_deploy-staging', name: 'Deploy Staging', index: 10 },
73
+ { slug: '11_validate-staging', name: 'Validate Staging', index: 11 },
74
+ { slug: '12_done', name: 'Done', index: 12 },
75
+ ];
76
+ // Convenience exports
77
+ export const DEFAULT_ROOT = defaultConfig.root;
78
+ export const DEFAULT_PORT = defaultConfig.port;
79
+ // Cached config instance
80
+ let cachedConfig = null;
81
+ /**
82
+ * Get the current configuration (singleton)
83
+ */
84
+ export function getConfig() {
85
+ if (!cachedConfig) {
86
+ cachedConfig = createConfig();
87
+ }
88
+ return cachedConfig;
89
+ }
90
+ /**
91
+ * Reset config cache (useful for testing)
92
+ */
93
+ export function resetConfig() {
94
+ cachedConfig = null;
95
+ }
96
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+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AAK,EAAE,CAAC,EAAE;IACvE,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAE;IACjE,EAAE,IAAI,EAAE,uBAAuB,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC,EAAE;IACvE,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAAC,EAAE;IACjE,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE;IACzD,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,EAAE,EAAE;IAChE,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,EAAE;IACpE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;CACpC,CAAC;AAKX,sBAAsB;AACtB,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC;AAE/C,yBAAyB;AACzB,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,YAAY,GAAG,YAAY,EAAE,CAAC;IAChC,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW;IACzB,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * File system utilities
3
+ */
4
+ /**
5
+ * Ensure a directory exists, create if not
6
+ */
7
+ export declare function ensureDir(dirPath: string): void;
8
+ /**
9
+ * Read a file safely, return null if not exists
10
+ */
11
+ export declare function readFileSafe(filePath: string): string | null;
12
+ /**
13
+ * Write a file, creating parent directories if needed
14
+ */
15
+ export declare function writeFileSafe(filePath: string, content: string): void;
16
+ /**
17
+ * List directories in a path
18
+ */
19
+ export declare function listDirs(dirPath: string): string[];
20
+ /**
21
+ * List files in a path
22
+ */
23
+ export declare function listFiles(dirPath: string): string[];
24
+ /**
25
+ * Move a directory
26
+ */
27
+ export declare function moveDir(srcPath: string, destPath: string): void;
28
+ /**
29
+ * Remove a directory recursively
30
+ */
31
+ export declare function removeDir(dirPath: string): void;
32
+ /**
33
+ * Check if a path exists
34
+ */
35
+ export declare function pathExists(filePath: string): boolean;
36
+ /**
37
+ * Get file modification time
38
+ */
39
+ export declare function getFileMtime(filePath: string): Date | null;
40
+ /**
41
+ * Get the sequence number from .seq file
42
+ */
43
+ export declare function getNextSequence(rootDir: string): number;
44
+ /**
45
+ * Generate a ticket key
46
+ */
47
+ export declare function generateTicketKey(rootDir: string): string;
48
+ /**
49
+ * Slugify a string for directory names
50
+ */
51
+ export declare function slugify(text: string): string;
52
+ /**
53
+ * Get current timestamp in ISO format
54
+ */
55
+ export declare function getTimestamp(): string;
56
+ /**
57
+ * Copy a file
58
+ */
59
+ export declare function copyFile(srcPath: string, destPath: string): void;
60
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI/C;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAGrE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAMlD;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAMnD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAG/D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI/C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAM1D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAWvD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ5C;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAGhE"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * File system utilities
3
+ */
4
+ import { existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, renameSync, rmSync, copyFileSync, statSync } from 'node:fs';
5
+ import { dirname, join } from 'node:path';
6
+ /**
7
+ * Ensure a directory exists, create if not
8
+ */
9
+ export function ensureDir(dirPath) {
10
+ if (!existsSync(dirPath)) {
11
+ mkdirSync(dirPath, { recursive: true });
12
+ }
13
+ }
14
+ /**
15
+ * Read a file safely, return null if not exists
16
+ */
17
+ export function readFileSafe(filePath) {
18
+ try {
19
+ return readFileSync(filePath, 'utf-8');
20
+ }
21
+ catch {
22
+ return null;
23
+ }
24
+ }
25
+ /**
26
+ * Write a file, creating parent directories if needed
27
+ */
28
+ export function writeFileSafe(filePath, content) {
29
+ ensureDir(dirname(filePath));
30
+ writeFileSync(filePath, content, 'utf-8');
31
+ }
32
+ /**
33
+ * List directories in a path
34
+ */
35
+ export function listDirs(dirPath) {
36
+ if (!existsSync(dirPath))
37
+ return [];
38
+ return readdirSync(dirPath, { withFileTypes: true })
39
+ .filter(entry => entry.isDirectory())
40
+ .map(entry => entry.name);
41
+ }
42
+ /**
43
+ * List files in a path
44
+ */
45
+ export function listFiles(dirPath) {
46
+ if (!existsSync(dirPath))
47
+ return [];
48
+ return readdirSync(dirPath, { withFileTypes: true })
49
+ .filter(entry => entry.isFile())
50
+ .map(entry => entry.name);
51
+ }
52
+ /**
53
+ * Move a directory
54
+ */
55
+ export function moveDir(srcPath, destPath) {
56
+ ensureDir(dirname(destPath));
57
+ renameSync(srcPath, destPath);
58
+ }
59
+ /**
60
+ * Remove a directory recursively
61
+ */
62
+ export function removeDir(dirPath) {
63
+ if (existsSync(dirPath)) {
64
+ rmSync(dirPath, { recursive: true, force: true });
65
+ }
66
+ }
67
+ /**
68
+ * Check if a path exists
69
+ */
70
+ export function pathExists(filePath) {
71
+ return existsSync(filePath);
72
+ }
73
+ /**
74
+ * Get file modification time
75
+ */
76
+ export function getFileMtime(filePath) {
77
+ try {
78
+ return statSync(filePath).mtime;
79
+ }
80
+ catch {
81
+ return null;
82
+ }
83
+ }
84
+ /**
85
+ * Get the sequence number from .seq file
86
+ */
87
+ export function getNextSequence(rootDir) {
88
+ const seqFile = join(rootDir, '.seq');
89
+ let seq = 1;
90
+ if (existsSync(seqFile)) {
91
+ const content = readFileSync(seqFile, 'utf-8').trim();
92
+ seq = parseInt(content, 10) + 1;
93
+ }
94
+ writeFileSync(seqFile, String(seq), 'utf-8');
95
+ return seq;
96
+ }
97
+ /**
98
+ * Generate a ticket key
99
+ */
100
+ export function generateTicketKey(rootDir) {
101
+ const seq = getNextSequence(rootDir);
102
+ return `AC-${String(seq).padStart(6, '0')}`;
103
+ }
104
+ /**
105
+ * Slugify a string for directory names
106
+ */
107
+ export function slugify(text) {
108
+ return text
109
+ .toLowerCase()
110
+ .normalize('NFD')
111
+ .replace(/[\u0300-\u036f]/g, '') // Remove diacritics
112
+ .replace(/[^a-z0-9]+/g, '_')
113
+ .replace(/^_+|_+$/g, '')
114
+ .substring(0, 50);
115
+ }
116
+ /**
117
+ * Get current timestamp in ISO format
118
+ */
119
+ export function getTimestamp() {
120
+ return new Date().toISOString();
121
+ }
122
+ /**
123
+ * Copy a file
124
+ */
125
+ export function copyFile(srcPath, destPath) {
126
+ ensureDir(dirname(destPath));
127
+ copyFileSync(srcPath, destPath);
128
+ }
129
+ //# sourceMappingURL=fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.js","sourceRoot":"","sources":["../../src/utils/fs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtI,OAAO,EAAE,OAAO,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,OAAe;IACvC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,O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AAE,CAAC;SACvB,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACtB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,QAAgB;IACxD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7B,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Console logging with colors
3
+ */
4
+ export declare const logger: {
5
+ info: (message: string) => void;
6
+ success: (message: string) => void;
7
+ warn: (message: string) => void;
8
+ error: (message: string) => void;
9
+ debug: (message: string) => void;
10
+ priority: (priority: string) => string;
11
+ bold: (text: string) => string;
12
+ dim: (text: string) => string;
13
+ cyan: (text: string) => string;
14
+ green: (text: string) => string;
15
+ yellow: (text: string) => string;
16
+ red: (text: string) => string;
17
+ gray: (text: string) => string;
18
+ row: (label: string, value: string, labelWidth?: number) => void;
19
+ separator: (width?: number) => void;
20
+ blank: () => void;
21
+ };
22
+ export default logger;
23
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,MAAM;oBACD,MAAM;uBAIH,MAAM;oBAIT,MAAM;qBAIL,MAAM;qBAIN,MAAM;yBAOF,MAAM,KAAG,MAAM;iBAWvB,MAAM;gBACP,MAAM;iBACL,MAAM;kBACL,MAAM;mBACL,MAAM;gBACT,MAAM;iBACL,MAAM;iBAGN,MAAM,SAAS,MAAM;;;CAcnC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Console logging with colors
3
+ */
4
+ import chalk from 'chalk';
5
+ export const logger = {
6
+ info: (message) => {
7
+ console.log(chalk.blue('ℹ'), message);
8
+ },
9
+ success: (message) => {
10
+ console.log(chalk.green('✓'), message);
11
+ },
12
+ warn: (message) => {
13
+ console.log(chalk.yellow('⚠'), message);
14
+ },
15
+ error: (message) => {
16
+ console.error(chalk.red('✗'), message);
17
+ },
18
+ debug: (message) => {
19
+ if (process.env.DEBUG) {
20
+ console.log(chalk.gray('🐛'), message);
21
+ }
22
+ },
23
+ // Priority colors
24
+ priority: (priority) => {
25
+ switch (priority) {
26
+ case 'P0': return chalk.red.bold(priority);
27
+ case 'P1': return chalk.yellow(priority);
28
+ case 'P2': return chalk.blue(priority);
29
+ case 'P3': return chalk.gray(priority);
30
+ default: return priority;
31
+ }
32
+ },
33
+ // Styled output
34
+ bold: (text) => chalk.bold(text),
35
+ dim: (text) => chalk.dim(text),
36
+ cyan: (text) => chalk.cyan(text),
37
+ green: (text) => chalk.green(text),
38
+ yellow: (text) => chalk.yellow(text),
39
+ red: (text) => chalk.red(text),
40
+ gray: (text) => chalk.gray(text),
41
+ // Table-like output
42
+ row: (label, value, labelWidth = 12) => {
43
+ const paddedLabel = label.padEnd(labelWidth);
44
+ console.log(` ${chalk.dim(paddedLabel)} ${value}`);
45
+ },
46
+ // Separator
47
+ separator: (width = 60) => {
48
+ console.log(chalk.dim('─'.repeat(width)));
49
+ },
50
+ // Blank line
51
+ blank: () => {
52
+ console.log();
53
+ },
54
+ };
55
+ export default logger;
56
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE;QACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CA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AI,CAAC;IACxC,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;IACxC,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;IAC1C,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5C,GAAG,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;IACtC,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;IAExC,oBAAoB;IACpB,GAAG,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,UAAU,GAAG,EAAE,EAAE,EAAE;QACrD,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,YAAY;IACZ,SAAS,EAAE,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE;QACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,aAAa;IACb,KAAK,EAAE,GAAG,EAAE;QACV,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;CACF,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@autocode-cli/autocode",
3
+ "version": "0.0.22",
4
+ "description": "Filesystem-based ticket system with web dashboard",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "autocode": "bin/autocode"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "watch": "tsc --watch",
13
+ "dev": "tsx src/index.ts",
14
+ "start": "node dist/index.js",
15
+ "test": "vitest",
16
+ "prepublishOnly": "npm run build"
17
+ },
18
+ "files": [
19
+ "dist/",
20
+ "bin/",
21
+ "templates/"
22
+ ],
23
+ "keywords": [
24
+ "tickets",
25
+ "kanban",
26
+ "workflow",
27
+ "cli",
28
+ "filesystem",
29
+ "dashboard",
30
+ "project-management"
31
+ ],
32
+ "author": "Evkoh",
33
+ "license": "MIT",
34
+ "homepage": "https://gitlab.com/evkoh/autocode",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://gitlab.com/evkoh/autocode.git"
38
+ },
39
+ "bugs": {
40
+ "url": "https://gitlab.com/evkoh/autocode/-/issues"
41
+ },
42
+ "engines": {
43
+ "node": ">=18.0.0"
44
+ },
45
+ "dependencies": {
46
+ "chalk": "^5.3.0",
47
+ "commander": "^12.1.0",
48
+ "yaml": "^2.6.1"
49
+ },
50
+ "devDependencies": {
51
+ "@playwright/test": "^1.57.0",
52
+ "@types/node": "^22.10.2",
53
+ "tsx": "^4.19.2",
54
+ "typescript": "^5.7.2",
55
+ "vitest": "^2.1.8"
56
+ }
57
+ }
@@ -0,0 +1,31 @@
1
+ # Backlog
2
+
3
+ ## Role
4
+
5
+ Storage for new tickets. Tickets here need qualification before work can begin.
6
+
7
+ ## Actions
8
+
9
+ 1. Read the ticket (title, description, attachments)
10
+ 2. Verify ticket quality and completeness
11
+ 3. If poorly written: rewrite title and enrich description
12
+ 4. Define acceptance criteria if missing
13
+ 5. Set priority (P0-P3) based on impact and urgency
14
+ 6. Identify scope and potentially affected files
15
+ 7. If out of scope work detected: `autocode new <title> <description>`
16
+ 8. Document: `autocode comment <key> "Qualification done"`
17
+ 9. Advance: `autocode next <key>`
18
+
19
+ > Or return: `autocode move <key> <column>`
20
+
21
+ ## Validation Criteria
22
+
23
+ - [ ] Title is explicit (verb + what + context)
24
+ - [ ] Description is clear and structured
25
+ - [ ] Scope is defined (included/excluded)
26
+ - [ ] Priority is set appropriately
27
+ - [ ] If bug: reproduction steps documented
28
+
29
+ ## Notes
30
+
31
+ A ticket can be a feature, bug, investigation, question, or technical task. Qualify thoroughly before starting work.