workflow-ai 1.0.26 → 1.0.28
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/configs/ticket-movement-rules.yaml +83 -0
- package/package.json +1 -1
- package/src/init.mjs +16 -10
- package/src/lib/js-yaml.mjs +3856 -0
- package/src/lib/utils.mjs +1 -1
- package/src/runner.mjs +35 -3
- package/src/scripts/check-anomalies.js +1 -1
- package/src/scripts/move-ticket.js +1 -1
- package/src/scripts/move-to-ready.js +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Конфигурация правил перемещения тикетов
|
|
2
|
+
# Версия: 1.0
|
|
3
|
+
|
|
4
|
+
version: "1.0"
|
|
5
|
+
|
|
6
|
+
# Правила перемещения тикетов на основе статуса ревью
|
|
7
|
+
# Каждое правило применяется к указанной директории
|
|
8
|
+
# condition: "passed" | "failed" | "skipped" | null
|
|
9
|
+
# - "passed" — ревью пройдено
|
|
10
|
+
# - "failed" — ревью провалено
|
|
11
|
+
# - "skipped" — ревью пропущено
|
|
12
|
+
# - null — ревью отсутствует (не заполнено)
|
|
13
|
+
# to_dir: целевая директория перемещения
|
|
14
|
+
# reason: причина перемещения (для логирования)
|
|
15
|
+
|
|
16
|
+
rules:
|
|
17
|
+
# Правила для backlog/ — защита от ошибочного перемещения завершённых тикетов
|
|
18
|
+
backlog:
|
|
19
|
+
- condition: passed
|
|
20
|
+
to_dir: done
|
|
21
|
+
reason: "review passed"
|
|
22
|
+
- condition: skipped
|
|
23
|
+
to_dir: done
|
|
24
|
+
reason: "review skipped"
|
|
25
|
+
|
|
26
|
+
# Правила для blocked/
|
|
27
|
+
blocked:
|
|
28
|
+
- condition: passed
|
|
29
|
+
to_dir: done
|
|
30
|
+
reason: "review passed"
|
|
31
|
+
- condition: skipped
|
|
32
|
+
to_dir: done
|
|
33
|
+
reason: "review skipped"
|
|
34
|
+
- condition: failed
|
|
35
|
+
to_dir: backlog
|
|
36
|
+
reason: "review failed"
|
|
37
|
+
# null (нет ревью) — не перемещаем
|
|
38
|
+
|
|
39
|
+
# Правила для done/
|
|
40
|
+
done:
|
|
41
|
+
- condition: failed
|
|
42
|
+
to_dir: backlog
|
|
43
|
+
reason: "review failed"
|
|
44
|
+
- condition: null
|
|
45
|
+
to_dir: backlog
|
|
46
|
+
reason: "no review"
|
|
47
|
+
# passed или skipped — не перемещаем
|
|
48
|
+
|
|
49
|
+
# Правила для review/
|
|
50
|
+
review:
|
|
51
|
+
- condition: passed
|
|
52
|
+
to_dir: done
|
|
53
|
+
reason: "review passed"
|
|
54
|
+
- condition: skipped
|
|
55
|
+
to_dir: done
|
|
56
|
+
reason: "review skipped"
|
|
57
|
+
|
|
58
|
+
# Правила для in-progress/
|
|
59
|
+
in_progress:
|
|
60
|
+
- condition: passed
|
|
61
|
+
to_dir: done
|
|
62
|
+
reason: "review passed"
|
|
63
|
+
- condition: skipped
|
|
64
|
+
to_dir: done
|
|
65
|
+
reason: "review skipped"
|
|
66
|
+
|
|
67
|
+
# Правила для ready/
|
|
68
|
+
ready:
|
|
69
|
+
- condition: passed
|
|
70
|
+
to_dir: done
|
|
71
|
+
reason: "review passed"
|
|
72
|
+
- condition: skipped
|
|
73
|
+
to_dir: done
|
|
74
|
+
reason: "review skipped"
|
|
75
|
+
|
|
76
|
+
# Директории тикетов (относительно .workflow/tickets/)
|
|
77
|
+
directories:
|
|
78
|
+
backlog: backlog
|
|
79
|
+
ready: ready
|
|
80
|
+
in_progress: in-progress
|
|
81
|
+
blocked: blocked
|
|
82
|
+
review: review
|
|
83
|
+
done: done
|
package/package.json
CHANGED
package/src/init.mjs
CHANGED
|
@@ -366,16 +366,15 @@ export function initProject(targetPath = process.cwd(), options = {}) {
|
|
|
366
366
|
const libDest = join(workflowRoot, 'src', 'lib');
|
|
367
367
|
ensureDir(libDest);
|
|
368
368
|
|
|
369
|
-
const
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
copyFile(findRootSrc, join(libDest, 'find-root.mjs'));
|
|
369
|
+
const libFiles = ['utils.mjs', 'find-root.mjs', 'js-yaml.mjs', 'logger.mjs'];
|
|
370
|
+
|
|
371
|
+
for (const file of libFiles) {
|
|
372
|
+
const fileSrc = join(libSrc, file);
|
|
373
|
+
if (existsSync(fileSrc)) {
|
|
374
|
+
copyFile(fileSrc, join(libDest, file));
|
|
375
|
+
}
|
|
377
376
|
}
|
|
378
|
-
result.steps.push('Copied lib files (utils.mjs, find-root.mjs) → .workflow/src/lib/');
|
|
377
|
+
result.steps.push('Copied lib files (utils.mjs, find-root.mjs, js-yaml.mjs) → .workflow/src/lib/');
|
|
379
378
|
|
|
380
379
|
// Step 5: Copy templates (3 templates)
|
|
381
380
|
const templatesSrc = join(packageRoot, 'templates');
|
|
@@ -414,7 +413,14 @@ export function initProject(targetPath = process.cwd(), options = {}) {
|
|
|
414
413
|
copyFile(pipelineSrc, join(configDest, 'pipeline.yaml'));
|
|
415
414
|
result.steps.push('Generated pipeline.yaml (overwritten)');
|
|
416
415
|
}
|
|
417
|
-
|
|
416
|
+
|
|
417
|
+
// ticket-movement-rules.yaml — always
|
|
418
|
+
const movementRulesSrc = join(packageRoot, 'configs', 'ticket-movement-rules.yaml');
|
|
419
|
+
if (existsSync(movementRulesSrc)) {
|
|
420
|
+
copyFile(movementRulesSrc, join(configDest, 'ticket-movement-rules.yaml'));
|
|
421
|
+
result.steps.push('Generated ticket-movement-rules.yaml (overwritten)');
|
|
422
|
+
}
|
|
423
|
+
|
|
418
424
|
// Step 7: Create .kilocode symlinks
|
|
419
425
|
const symlinkResult = createKilocodeSymlinks(projectRoot, force);
|
|
420
426
|
if (symlinkResult.success) {
|