jioogen 0.2.9 → 0.2.10
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/dist/index.js +146 -68
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7382,6 +7382,7 @@ var VERIFICATION_HEADING_RE = /^#{1,6}\s*verification(?:\s*command)?\s*$/im;
|
|
|
7382
7382
|
var TARGET_FILES_LABEL_RE = /^\s*(?:[-*]\s*)?\*{0,2}(?:targetFiles|target\s*files)\*{0,2}\s*:\s*(.*)$/im;
|
|
7383
7383
|
var TARGET_FILES_HEADING_RE = /^#{1,6}\s*target\s*files\s*$/im;
|
|
7384
7384
|
var ACCEPTANCE_HEADING_RE = /^#{1,6}\s*acceptance(?:\s*criteria)?\s*$/im;
|
|
7385
|
+
var SUBTASKS_HEADING_RE = /^#{1,6}\s*subtasks\s*$/im;
|
|
7385
7386
|
function isCommandLike(cmd) {
|
|
7386
7387
|
if (cmd === null || cmd === void 0) return false;
|
|
7387
7388
|
const cleaned = cleanCommand(cmd);
|
|
@@ -7640,7 +7641,7 @@ function parsePrd(prd) {
|
|
|
7640
7641
|
}
|
|
7641
7642
|
return { sections, requirementIds, acceptanceIds, featureIds, contractIds, subfeatureIds };
|
|
7642
7643
|
}
|
|
7643
|
-
var TASK_FIELD_LABELS = "id|layer|phase|checkpoint|foundation|dependsOn|dependencies|featureId|feature|cap|subtasks|acceptance|specRef|contracts|moduleId|concernIds|isolationRefs|lifecycleRefs|engineRef|flowRef|tracesTo|subfeatures|subfeatureIds|targetFiles|verificationCommand";
|
|
7644
|
+
var TASK_FIELD_LABELS = "id|layer|phase|checkpoint|foundation|dependsOn|dependencies|featureId|feature|cap|subtasks|acceptance|specRef|contracts|moduleId|concernIds|isolationRefs|lifecycleRefs|engineRef|flowRef|tracesTo|subfeatures|subfeatureIds|targetFiles|verificationCommand|surface|uiStates|responsive|mockSource|mockupRef";
|
|
7644
7645
|
function normalizeTaskLabels(content) {
|
|
7645
7646
|
const re = new RegExp(`^\\s*(?:[-*]\\s*)?\\*{0,2}(${TASK_FIELD_LABELS})\\*{0,2}\\s*:`, "gim");
|
|
7646
7647
|
return content.replace(re, "$1:");
|
|
@@ -7700,12 +7701,21 @@ function parseTaskContext(content, taskId2) {
|
|
|
7700
7701
|
const contracts = readListField("contracts");
|
|
7701
7702
|
const concernIds = readListField("concernIds");
|
|
7702
7703
|
const isolationRefs = readListField("isolationRefs");
|
|
7704
|
+
const flowRef = readListField("flowRef");
|
|
7705
|
+
const lifecycleRefs = readListField("lifecycleRefs");
|
|
7706
|
+
const engineRef = readListField("engineRef");
|
|
7707
|
+
const uiStates = readListField("uiStates");
|
|
7703
7708
|
const subfeatures = readListField("subfeatures") ?? readListField("subfeatureIds") ?? void 0;
|
|
7709
|
+
const surfaceMatch = normalized.match(/surface:\s*([^\n]+)/i);
|
|
7710
|
+
const surface = surfaceMatch?.[1]?.trim();
|
|
7704
7711
|
const parsedTargetFiles = taskTargetFiles(content);
|
|
7705
7712
|
const parsedVerificationCommand = taskVerificationCommand(content);
|
|
7706
7713
|
const featureMatch = normalized.match(/(?:featureId|feature):\s*([^\n]+)/i);
|
|
7707
7714
|
const capMatch = normalized.match(/cap:\s*([^\n]+)/i);
|
|
7708
|
-
|
|
7715
|
+
let subtasks = readListField("subtasks");
|
|
7716
|
+
if (subtasks === void 0) {
|
|
7717
|
+
subtasks = followingBlock(content, SUBTASKS_HEADING_RE).split(/\r?\n/).map((line) => /^\s*[-*]\s*(?:\[[ x]\]\s*)?(?:SUB-\d+\s*—\s*)?(.+)$/i.exec(line)?.[1]?.trim()).filter((item) => item !== void 0 && item.length > 0);
|
|
7718
|
+
}
|
|
7709
7719
|
const moduleIdMatch = normalized.match(/moduleId:\s*([^\n]+)/i);
|
|
7710
7720
|
const moduleId = moduleIdMatch?.[1]?.trim();
|
|
7711
7721
|
return {
|
|
@@ -7729,6 +7739,11 @@ function parseTaskContext(content, taskId2) {
|
|
|
7729
7739
|
...moduleId && { moduleId },
|
|
7730
7740
|
...concernIds && concernIds.length > 0 && { concernIds },
|
|
7731
7741
|
...isolationRefs && isolationRefs.length > 0 && { isolationRefs },
|
|
7742
|
+
...flowRef && flowRef.length > 0 && { flowRef },
|
|
7743
|
+
...lifecycleRefs && lifecycleRefs.length > 0 && { lifecycleRefs },
|
|
7744
|
+
...engineRef && engineRef.length > 0 && { engineRef },
|
|
7745
|
+
...uiStates && uiStates.length > 0 && { uiStates },
|
|
7746
|
+
...surface !== void 0 && surface.length > 0 && { surface },
|
|
7732
7747
|
...tracesTo !== void 0 && { tracesTo },
|
|
7733
7748
|
...subfeatures && subfeatures.length > 0 && { subfeatures }
|
|
7734
7749
|
};
|
|
@@ -9564,7 +9579,7 @@ Urutan otoritas: keamanan/a11y inti > PRD/specs > file di sini > default generik
|
|
|
9564
9579
|
var EXECUTION_SIDECAR_PATH = "tasks/.execution/state.json";
|
|
9565
9580
|
var EXECUTION_SIDECAR_VERSION = 1;
|
|
9566
9581
|
var EXECUTION_SIDECAR_VERSION_V2 = 2;
|
|
9567
|
-
var HANDOFF_PROMPT_VERSION =
|
|
9582
|
+
var HANDOFF_PROMPT_VERSION = 21;
|
|
9568
9583
|
var HANDOFF_AGENT_TOKEN_TTL_SECONDS = 30 * 24 * 3600;
|
|
9569
9584
|
var HandoffPayloadSchema = external_exports.object({
|
|
9570
9585
|
promptVersion: external_exports.literal(HANDOFF_PROMPT_VERSION),
|
|
@@ -9784,7 +9799,7 @@ var ApiClient = class {
|
|
|
9784
9799
|
|
|
9785
9800
|
// src/commands.ts
|
|
9786
9801
|
import { spawn } from "node:child_process";
|
|
9787
|
-
import { readdir as readdir7, readFile as readFile10, writeFile as writeFile8 } from "node:fs/promises";
|
|
9802
|
+
import { mkdir as mkdir8, readdir as readdir7, readFile as readFile10, writeFile as writeFile8 } from "node:fs/promises";
|
|
9788
9803
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
9789
9804
|
|
|
9790
9805
|
// src/authoring.ts
|
|
@@ -10285,7 +10300,13 @@ var LAYER_RANK = {
|
|
|
10285
10300
|
};
|
|
10286
10301
|
var IN_PROGRESS = ["in_progress", "verifying"];
|
|
10287
10302
|
var QUALITY_HEADING = "## KUALITAS WAJIB (ringkas; detail di skill bila tersedia)";
|
|
10303
|
+
var BREAKDOWN_HEADING = "## BREAKDOWN WAJIB \u2014 SEBELUM CODING";
|
|
10288
10304
|
var MAX_CHECKLIST_LINES = 12;
|
|
10305
|
+
var BREAKDOWN_RULES = [
|
|
10306
|
+
"Breakdown ini mengikat: tulis/centang setiap item sebelum mulai edit, dan jangan `task complete` selama ada item tanpa bukti.",
|
|
10307
|
+
"Ini checklist kerja, bukan task baru; task baru hanya diizinkan pada `--mode seed`.",
|
|
10308
|
+
"Pratinjau ulang: `npx jioogen task expand <ref>`."
|
|
10309
|
+
];
|
|
10289
10310
|
var UI_SKILLS = ["ui-ux-pro-max", "impeccable"];
|
|
10290
10311
|
var LAYER_CHECKLISTS = {
|
|
10291
10312
|
frontend_mock: [
|
|
@@ -10425,9 +10446,59 @@ function renderActiveTask(task, context) {
|
|
|
10425
10446
|
);
|
|
10426
10447
|
const checklist = renderQualityChecklist(task.layer, context);
|
|
10427
10448
|
if (checklist.length > 0) lines.push("", ...checklist);
|
|
10449
|
+
const breakdown = buildTaskBreakdown(task);
|
|
10450
|
+
const breakdownLines = [...breakdown.authored, ...breakdown.derived];
|
|
10451
|
+
if (breakdownLines.length > 0) {
|
|
10452
|
+
lines.push("", BREAKDOWN_HEADING, ...BREAKDOWN_RULES);
|
|
10453
|
+
for (const item of breakdownLines) lines.push(`- [ ] ${item}`);
|
|
10454
|
+
}
|
|
10428
10455
|
lines.push("", "--- ISI TASK (otoritas scope) ---", task.content, "--- AKHIR ISI TASK ---");
|
|
10429
10456
|
return lines.join("\n");
|
|
10430
10457
|
}
|
|
10458
|
+
function buildTaskBreakdown(task) {
|
|
10459
|
+
const context = parseTaskContext(task.content, task.id);
|
|
10460
|
+
const authored = (context.subtasks ?? []).filter((item) => !/^N\/A\b/i.test(item));
|
|
10461
|
+
const derived = [];
|
|
10462
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10463
|
+
const push = (item) => {
|
|
10464
|
+
const key = item.trim().toLowerCase();
|
|
10465
|
+
if (key.length === 0 || seen.has(key)) return;
|
|
10466
|
+
seen.add(key);
|
|
10467
|
+
derived.push(item);
|
|
10468
|
+
};
|
|
10469
|
+
for (const subfeature of context.subfeatures ?? []) {
|
|
10470
|
+
push(`${subfeature} \u2014 petakan ke AC, flow/state, dan targetFiles`);
|
|
10471
|
+
}
|
|
10472
|
+
for (const acceptance of context.acceptance ?? []) {
|
|
10473
|
+
if (/^N\/A\b/i.test(acceptance)) continue;
|
|
10474
|
+
push(`${acceptance} \u2014 penuhi + catat bukti`);
|
|
10475
|
+
}
|
|
10476
|
+
for (const flow of context.flowRef ?? []) {
|
|
10477
|
+
push(`${flow} \u2014 implement alur sampai outcome`);
|
|
10478
|
+
}
|
|
10479
|
+
for (const lifecycle of context.lifecycleRefs ?? []) {
|
|
10480
|
+
push(`Lifecycle ${lifecycle} \u2014 state/transition yang relevan`);
|
|
10481
|
+
}
|
|
10482
|
+
for (const engine of context.engineRef ?? []) {
|
|
10483
|
+
push(`Engine ${engine} \u2014 invariant/keputusan yang dijaga`);
|
|
10484
|
+
}
|
|
10485
|
+
for (const state of context.uiStates ?? []) {
|
|
10486
|
+
push(`UI state ${state} \u2014 render + verifikasi`);
|
|
10487
|
+
}
|
|
10488
|
+
for (const isolation of context.isolationRefs ?? []) {
|
|
10489
|
+
push(`${isolation} \u2014 tegakkan boundary + AC penolakan akses`);
|
|
10490
|
+
}
|
|
10491
|
+
for (const file of context.targetFiles ?? []) {
|
|
10492
|
+
push(`File ${file} \u2014 buat/edit + test terkait`);
|
|
10493
|
+
}
|
|
10494
|
+
if (context.verificationCommand !== null && context.verificationCommand !== void 0) {
|
|
10495
|
+
push(`Verifikasi: \`${context.verificationCommand}\` (wajib exit 0)`);
|
|
10496
|
+
}
|
|
10497
|
+
if (authored.length === 0 && derived.length === 0) {
|
|
10498
|
+
push("Baca task + PRD/specs, lalu tulis langkah kerja eksplisit sebelum edit");
|
|
10499
|
+
}
|
|
10500
|
+
return { authored, derived };
|
|
10501
|
+
}
|
|
10431
10502
|
function renderQualityChecklist(layer, context) {
|
|
10432
10503
|
if (context === void 0 || layer === void 0) return [];
|
|
10433
10504
|
const items = [...LAYER_CHECKLISTS[layer] ?? []];
|
|
@@ -11275,12 +11346,13 @@ var JIOOGEN_AGENTS_MD = `${MARKER}
|
|
|
11275
11346
|
- Jangan mengubah \`PRD.md\` atau \`specs/\`; itu kontrak, bukan hasil eksekusi.
|
|
11276
11347
|
|
|
11277
11348
|
## 2. Alur per giliran
|
|
11278
|
-
1. \`npx jioogen task next\` \u2014 baca blok **TASK AKTIF** + isi file task.
|
|
11279
|
-
2. \`npx jioogen task
|
|
11280
|
-
3.
|
|
11281
|
-
4.
|
|
11282
|
-
5. \`npx jioogen task
|
|
11283
|
-
6. \`npx jioogen
|
|
11349
|
+
1. \`npx jioogen task next\` \u2014 baca blok **TASK AKTIF**, **BREAKDOWN WAJIB**, + isi file task.
|
|
11350
|
+
2. Tulis/centang breakdown (atau simpan dengan \`npx jioogen task expand <ref> --write\`).
|
|
11351
|
+
3. \`npx jioogen task start <ref>\`.
|
|
11352
|
+
4. Implementasikan **hanya** task itu sampai semua Acceptance Criteria dan item breakdown terpenuhi.
|
|
11353
|
+
5. Jalankan \`npx jioogen task verify <ref>\` \u2014 CLI menjalankan \`verificationCommand\` dan mencatat bukti exit code.
|
|
11354
|
+
6. \`npx jioogen task complete <ref>\` (ditolak bila belum ada bukti exit 0), lalu buat satu commit git kecil.
|
|
11355
|
+
7. \`npx jioogen sync\`, lalu kembali ke langkah 1.
|
|
11284
11356
|
|
|
11285
11357
|
## 2b. Pekerjaan yang dibangun di luar harness
|
|
11286
11358
|
|
|
@@ -11327,13 +11399,18 @@ Catat di \`task complete --note "micro-fix: <ringkas>"\` dan commit message.
|
|
|
11327
11399
|
Jika fix mengubah kontrak/scope/data model/keamanan: STOP dan laporkan satu
|
|
11328
11400
|
ringkasan; jangan dipecah menjadi banyak task.
|
|
11329
11401
|
|
|
11330
|
-
## 3d. Breakdown runtime
|
|
11402
|
+
## 3d. Breakdown runtime \u2014 WAJIB sebelum coding
|
|
11331
11403
|
|
|
11332
|
-
Task parent bersifat naratif.
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
-
|
|
11336
|
-
-
|
|
11404
|
+
Task parent bersifat naratif. \`task next\` menyuntik \`## BREAKDOWN WAJIB\` yang
|
|
11405
|
+
diturunkan dari AC, subfeature, flow/step, lifecycle, engine, UI states,
|
|
11406
|
+
\`targetFiles\`, dan \`verificationCommand\`. Wajib:
|
|
11407
|
+
- Tulis/centang setiap item di breakdown kerja sebelum mulai edit; item tidak boleh dilewati.
|
|
11408
|
+
- \`npx jioogen task expand <ref>\` menampilkan scaffold; \`--write\` menyimpannya
|
|
11409
|
+
(task authored: \`## Subtasks\` di file task; scaffold: \`.jioogen/breakdown/<ref>.md\`).
|
|
11410
|
+
- Breakdown bukan task baru; jangan menambah task atau mengubah
|
|
11411
|
+
\`PRD.md\`/\`specs/\`/\`tasks/\` (task baru hanya pada \`--mode seed\`).
|
|
11412
|
+
- Jangan \`task complete\` selama ada item breakdown tanpa bukti. Selesai bila semua
|
|
11413
|
+
item, \`targetFiles\`, AC, dan \`verificationCommand\` terpenuhi.
|
|
11337
11414
|
|
|
11338
11415
|
## 4. Verifikasi jujur
|
|
11339
11416
|
- Pakai test runner yang dideklarasikan di \`specs/\` atau dibuat task scaffold.
|
|
@@ -11405,13 +11482,14 @@ atas ide, refactor, perbaikan, atau fitur lain.
|
|
|
11405
11482
|
|
|
11406
11483
|
## 2. Siklus per giliran
|
|
11407
11484
|
|
|
11408
|
-
1. \`npx jioogen task next\` \u2014 baca TASK AKTIF + isi file task.
|
|
11409
|
-
2. \`npx jioogen task
|
|
11410
|
-
3.
|
|
11411
|
-
4.
|
|
11412
|
-
5. \`npx jioogen task
|
|
11485
|
+
1. \`npx jioogen task next\` \u2014 baca TASK AKTIF, BREAKDOWN WAJIB, + isi file task.
|
|
11486
|
+
2. Tulis/centang breakdown (atau simpan dengan \`npx jioogen task expand <ref> --write\`).
|
|
11487
|
+
3. \`npx jioogen task start <ref>\`.
|
|
11488
|
+
4. Implementasikan **hanya** task itu sampai semua Acceptance Criteria dan item breakdown terpenuhi.
|
|
11489
|
+
5. Jalankan \`npx jioogen task verify <ref>\` sampai exit 0; CLI mencatat buktinya.
|
|
11490
|
+
6. \`npx jioogen task complete <ref>\` (wajib bukti), lalu buat **satu commit git kecil** untuk
|
|
11413
11491
|
task itu (lewati bila folder bukan repo git).
|
|
11414
|
-
|
|
11492
|
+
7. \`npx jioogen sync\`, lalu kembali ke langkah 1.
|
|
11415
11493
|
|
|
11416
11494
|
## 2b. Pekerjaan yang dibangun di luar harness
|
|
11417
11495
|
|
|
@@ -11464,13 +11542,18 @@ Catat di \`task complete --note "micro-fix: <ringkas>"\` dan commit message.
|
|
|
11464
11542
|
Jika fix mengubah kontrak/scope/data model/keamanan: STOP dan laporkan satu
|
|
11465
11543
|
ringkasan; jangan dipecah menjadi banyak task.
|
|
11466
11544
|
|
|
11467
|
-
## 3d. Breakdown runtime
|
|
11545
|
+
## 3d. Breakdown runtime \u2014 WAJIB sebelum coding
|
|
11468
11546
|
|
|
11469
|
-
Task parent bersifat naratif.
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
-
|
|
11473
|
-
-
|
|
11547
|
+
Task parent bersifat naratif. \`task next\` menyuntik \`## BREAKDOWN WAJIB\` yang
|
|
11548
|
+
diturunkan dari AC, subfeature, flow/step, lifecycle, engine, UI states,
|
|
11549
|
+
\`targetFiles\`, dan \`verificationCommand\`. Wajib:
|
|
11550
|
+
- Tulis/centang setiap item di breakdown kerja sebelum mulai edit; item tidak boleh dilewati.
|
|
11551
|
+
- \`npx jioogen task expand <ref>\` menampilkan scaffold; \`--write\` menyimpannya
|
|
11552
|
+
(task authored: \`## Subtasks\` di file task; scaffold: \`.jioogen/breakdown/<ref>.md\`).
|
|
11553
|
+
- Breakdown bukan task baru; jangan menambah task atau mengubah
|
|
11554
|
+
\`PRD.md\`/\`specs/\`/\`tasks/\` (task baru hanya pada \`--mode seed\`).
|
|
11555
|
+
- Jangan \`task complete\` selama ada item breakdown tanpa bukti. Selesai bila semua
|
|
11556
|
+
item, \`targetFiles\`, AC, dan \`verificationCommand\` terpenuhi.
|
|
11474
11557
|
|
|
11475
11558
|
## 3e. Anti-Bloat & Code Health
|
|
11476
11559
|
|
|
@@ -13336,34 +13419,6 @@ Status: ${next.state.status} \u2014 silakan ulangi.`);
|
|
|
13336
13419
|
Progress: ${written.counts?.done ?? 0}/${definitions.length} task selesai.`);
|
|
13337
13420
|
for (const finding of drift) console.warn(formatDrift(finding));
|
|
13338
13421
|
}
|
|
13339
|
-
function extractSubtasks(content) {
|
|
13340
|
-
const inline = /^\s*subtasks\s*:\s*\[([^\]]*)\]/im.exec(content)?.[1];
|
|
13341
|
-
if (inline !== void 0) {
|
|
13342
|
-
return inline.split(",").map((item) => item.trim().replace(/^["']|["']$/g, "")).filter((item) => item.length > 0);
|
|
13343
|
-
}
|
|
13344
|
-
const block = /^\s*subtasks\s*:\s*(?:\r?\n)((?:\s*-\s*[^\n]+\r?\n?)+)/im.exec(content)?.[1];
|
|
13345
|
-
if (block !== void 0) {
|
|
13346
|
-
return block.split(/\r?\n/).map((line) => line.replace(/^\s*-\s*/, "").trim()).filter((item) => item.length > 0);
|
|
13347
|
-
}
|
|
13348
|
-
const section3 = /^##\s+Subtasks\s*$([\s\S]*?)(?=^##\s|$)/im.exec(content)?.[1];
|
|
13349
|
-
if (section3 !== void 0) {
|
|
13350
|
-
return section3.split(/\r?\n/).map((line) => /^\s*-\s*\[[ x]\]\s*(?:SUB-\d+\s*—\s*)?(.+)$/i.exec(line)?.[1]?.trim()).filter((item) => item !== void 0 && item.length > 0);
|
|
13351
|
-
}
|
|
13352
|
-
const plain = /^\s*Subtasks\s*:\s*$/im.exec(content);
|
|
13353
|
-
if (plain === null) return [];
|
|
13354
|
-
const after = content.slice((plain.index ?? 0) + plain[0].length);
|
|
13355
|
-
const items = [];
|
|
13356
|
-
for (const line of after.split(/\r?\n/)) {
|
|
13357
|
-
const item = /^\s*[-*]\s*(?:\[[ x]\]\s*)?(.+)$/i.exec(line)?.[1]?.trim();
|
|
13358
|
-
if (item !== void 0 && item.length > 0) {
|
|
13359
|
-
items.push(item);
|
|
13360
|
-
continue;
|
|
13361
|
-
}
|
|
13362
|
-
if (line.trim().length === 0) continue;
|
|
13363
|
-
break;
|
|
13364
|
-
}
|
|
13365
|
-
return items;
|
|
13366
|
-
}
|
|
13367
13422
|
async function taskExpandCommand(ref, options) {
|
|
13368
13423
|
const local = await withLocalState(options, async (value) => value);
|
|
13369
13424
|
const key = ref.trim().toUpperCase();
|
|
@@ -13372,32 +13427,55 @@ async function taskExpandCommand(ref, options) {
|
|
|
13372
13427
|
);
|
|
13373
13428
|
if (definition === void 0) throw new Error(`Task ${ref} tidak ditemukan.`);
|
|
13374
13429
|
const cap = /^\s*cap:\s*(CAP-[A-Z0-9-]+)/im.exec(definition.content)?.[1];
|
|
13375
|
-
const
|
|
13376
|
-
|
|
13430
|
+
const breakdown = buildTaskBreakdown(definition);
|
|
13431
|
+
const authored = breakdown.authored;
|
|
13432
|
+
const items = authored.length > 0 ? authored : breakdown.derived;
|
|
13433
|
+
if (items.length === 0) {
|
|
13377
13434
|
console.log(
|
|
13378
|
-
`Task ${definition.id} belum punya
|
|
13435
|
+
`Task ${definition.id} belum punya metadata breakdown. Tambahkan \`subtasks\`, \`acceptance\`, atau \`targetFiles\`.`
|
|
13379
13436
|
);
|
|
13380
13437
|
return;
|
|
13381
13438
|
}
|
|
13382
|
-
const
|
|
13439
|
+
const prefix = authored.length > 0 ? "SUB" : "BD";
|
|
13440
|
+
const section3 = `## ${authored.length > 0 ? "Subtasks" : "Breakdown"}
|
|
13383
13441
|
|
|
13384
|
-
${
|
|
13442
|
+
${items.map((item, index) => `- [ ] ${prefix}-${String(index + 1).padStart(2, "0")} \u2014 ${item}`).join("\n")}
|
|
13385
13443
|
`;
|
|
13386
13444
|
console.log(`Task ${definition.id} \u2014 ${definition.title}`);
|
|
13387
13445
|
if (cap !== void 0) console.log(`CAP: ${cap}`);
|
|
13388
13446
|
console.log(section3);
|
|
13389
13447
|
if (options.write !== true) {
|
|
13390
|
-
console.log(
|
|
13448
|
+
console.log(
|
|
13449
|
+
"Preview saja. Tambahkan `--write` untuk menyimpan checklist (task authored: ke file task; scaffold: ke `.jioogen/breakdown/`)."
|
|
13450
|
+
);
|
|
13391
13451
|
return;
|
|
13392
13452
|
}
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
|
|
13396
|
-
|
|
13453
|
+
if (authored.length > 0) {
|
|
13454
|
+
const path2 = join10(local.bundleDir, "tasks", definition.file);
|
|
13455
|
+
const current = await readFile10(path2, "utf8");
|
|
13456
|
+
const stripped = current.replace(/\n##\s+Subtasks\b[\s\S]*?(?=\n##\s|$)/i, "").replace(/\n{3,}/g, "\n\n");
|
|
13457
|
+
await writeFile8(path2, `${stripped.trimEnd()}
|
|
13397
13458
|
|
|
13398
13459
|
${section3}`, "utf8");
|
|
13460
|
+
console.log(
|
|
13461
|
+
`Ditulis ke tasks/${definition.file}. Parent task tetap satu; checklist tidak menambah task count.`
|
|
13462
|
+
);
|
|
13463
|
+
return;
|
|
13464
|
+
}
|
|
13465
|
+
const dir = join10(local.bundleDir, ".jioogen", "breakdown");
|
|
13466
|
+
const path = join10(dir, `${definition.id}.md`);
|
|
13467
|
+
await mkdir8(dir, { recursive: true });
|
|
13468
|
+
await writeFile8(
|
|
13469
|
+
path,
|
|
13470
|
+
`# Breakdown ${definition.id} \u2014 ${definition.title}
|
|
13471
|
+
|
|
13472
|
+
${section3}
|
|
13473
|
+
> Scaffold deterministik dari metadata task. Boleh ditambah detail, tapi item di atas tidak boleh dilewati.
|
|
13474
|
+
`,
|
|
13475
|
+
"utf8"
|
|
13476
|
+
);
|
|
13399
13477
|
console.log(
|
|
13400
|
-
`Ditulis ke
|
|
13478
|
+
`Ditulis ke .jioogen/breakdown/${definition.id}.md. Ini checklist lokal; task count tidak berubah.`
|
|
13401
13479
|
);
|
|
13402
13480
|
}
|
|
13403
13481
|
async function taskStartCommand(ref, options) {
|
|
@@ -14150,7 +14228,7 @@ async function authoringRemoveCommand(options) {
|
|
|
14150
14228
|
}
|
|
14151
14229
|
|
|
14152
14230
|
// src/index.ts
|
|
14153
|
-
var VERSION = "0.2.
|
|
14231
|
+
var VERSION = "0.2.10";
|
|
14154
14232
|
function parseTaskModeOption(value) {
|
|
14155
14233
|
if (value === void 0) return void 0;
|
|
14156
14234
|
const parsed = TaskModeSchema.safeParse(value);
|