mrvn-cli 0.5.0 → 0.5.1

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 CHANGED
@@ -14490,7 +14490,7 @@ function propagateProgressFromTask(store, taskId) {
14490
14490
  store.update(taskId, { progress: 100 });
14491
14491
  updated.push(taskId);
14492
14492
  }
14493
- } else {
14493
+ } else if (!task.frontmatter.progressOverride) {
14494
14494
  const children = store.list({ type: "contribution" }).filter((d) => d.frontmatter.aboutArtifact === taskId);
14495
14495
  if (children.length > 0) {
14496
14496
  const avg = children.reduce((sum, c) => sum + getEffectiveProgress(c.frontmatter), 0) / children.length;
@@ -14521,27 +14521,29 @@ function propagateProgressToAction(store, actionId) {
14521
14521
  }
14522
14522
  return updated;
14523
14523
  }
14524
- const childTasks = store.list({ type: "task" }).filter((d) => d.frontmatter.aboutArtifact === actionId);
14525
- const directContribs = store.list({ type: "contribution" }).filter((d) => d.frontmatter.aboutArtifact === actionId);
14526
- const hasTasks = childTasks.length > 0;
14527
- const hasContribs = directContribs.length > 0;
14528
- let progress;
14529
- if (hasTasks && hasContribs) {
14530
- const taskAvg = childTasks.reduce((s, t) => s + getEffectiveProgress(t.frontmatter), 0) / childTasks.length;
14531
- const contribAvg = directContribs.reduce((s, c) => s + getEffectiveProgress(c.frontmatter), 0) / directContribs.length;
14532
- progress = Math.round(taskAvg * 0.8 + contribAvg * 0.2);
14533
- } else if (hasTasks) {
14534
- progress = Math.round(
14535
- childTasks.reduce((s, t) => s + getEffectiveProgress(t.frontmatter), 0) / childTasks.length
14536
- );
14537
- } else if (hasContribs) {
14538
- progress = Math.round(
14539
- directContribs.reduce((s, c) => s + getEffectiveProgress(c.frontmatter), 0) / directContribs.length
14540
- );
14541
- }
14542
- if (progress !== void 0) {
14543
- store.update(actionId, { progress });
14544
- updated.push(actionId);
14524
+ if (!action.frontmatter.progressOverride) {
14525
+ const childTasks = store.list({ type: "task" }).filter((d) => d.frontmatter.aboutArtifact === actionId);
14526
+ const directContribs = store.list({ type: "contribution" }).filter((d) => d.frontmatter.aboutArtifact === actionId);
14527
+ const hasTasks = childTasks.length > 0;
14528
+ const hasContribs = directContribs.length > 0;
14529
+ let progress;
14530
+ if (hasTasks && hasContribs) {
14531
+ const taskAvg = childTasks.reduce((s, t) => s + getEffectiveProgress(t.frontmatter), 0) / childTasks.length;
14532
+ const contribAvg = directContribs.reduce((s, c) => s + getEffectiveProgress(c.frontmatter), 0) / directContribs.length;
14533
+ progress = Math.round(taskAvg * 0.8 + contribAvg * 0.2);
14534
+ } else if (hasTasks) {
14535
+ progress = Math.round(
14536
+ childTasks.reduce((s, t) => s + getEffectiveProgress(t.frontmatter), 0) / childTasks.length
14537
+ );
14538
+ } else if (hasContribs) {
14539
+ progress = Math.round(
14540
+ directContribs.reduce((s, c) => s + getEffectiveProgress(c.frontmatter), 0) / directContribs.length
14541
+ );
14542
+ }
14543
+ if (progress !== void 0) {
14544
+ store.update(actionId, { progress });
14545
+ updated.push(actionId);
14546
+ }
14545
14547
  }
14546
14548
  return updated;
14547
14549
  }
@@ -14733,6 +14735,7 @@ function createActionTools(store) {
14733
14735
  }
14734
14736
  if (typeof progress === "number") {
14735
14737
  updates.progress = Math.max(0, Math.min(100, Math.round(progress)));
14738
+ updates.progressOverride = true;
14736
14739
  }
14737
14740
  const doc = store.update(id, updates, content);
14738
14741
  if (args.status !== void 0 || typeof progress === "number") {
@@ -20525,7 +20528,23 @@ function tlSprintPage(ctx) {
20525
20528
  </div>`;
20526
20529
  }
20527
20530
  const techTypes = /* @__PURE__ */ new Set(["epic", "task"]);
20528
- const techItems = data.workItems.items.filter((w) => techTypes.has(w.type));
20531
+ const techItems = [];
20532
+ for (const item of data.workItems.items) {
20533
+ if (techTypes.has(item.type)) {
20534
+ techItems.push(item);
20535
+ } else if (item.children) {
20536
+ const promoteChildren = (children) => {
20537
+ for (const child of children) {
20538
+ if (techTypes.has(child.type)) {
20539
+ techItems.push(child);
20540
+ } else if (child.children) {
20541
+ promoteChildren(child.children);
20542
+ }
20543
+ }
20544
+ };
20545
+ promoteChildren(item.children);
20546
+ }
20547
+ }
20529
20548
  const techDone = techItems.filter((w) => DONE_STATUSES11.has(w.status)).length;
20530
20549
  const allDocs = ctx.store.list();
20531
20550
  const tlContributions = allDocs.filter((d) => TL_CONTRIBUTION_TYPES.has(d.frontmatter.type));
@@ -22197,7 +22216,7 @@ function createContributionTools(store) {
22197
22216
  if (parent) {
22198
22217
  if (typeof args.parentProgress === "number") {
22199
22218
  const clamped = Math.max(0, Math.min(100, Math.round(args.parentProgress)));
22200
- store.update(args.aboutArtifact, { progress: clamped });
22219
+ store.update(args.aboutArtifact, { progress: clamped, progressOverride: true });
22201
22220
  progressParts.push(`${args.aboutArtifact} \u2192 ${clamped}%`);
22202
22221
  if (parent.frontmatter.type === "task") {
22203
22222
  const grandparent = parent.frontmatter.aboutArtifact;
@@ -22823,6 +22842,7 @@ function createTaskTools(store) {
22823
22842
  }
22824
22843
  if (typeof progress === "number") {
22825
22844
  updates.progress = Math.max(0, Math.min(100, Math.round(progress)));
22845
+ updates.progressOverride = true;
22826
22846
  }
22827
22847
  const doc = store.update(id, updates, content);
22828
22848
  if (args.status !== void 0 || typeof progress === "number") {
@@ -28974,7 +28994,7 @@ function createProgram() {
28974
28994
  const program = new Command();
28975
28995
  program.name("marvin").description(
28976
28996
  "AI-powered product development assistant with Product Owner, Delivery Manager, and Technical Lead personas"
28977
- ).version("0.5.0");
28997
+ ).version("0.5.1");
28978
28998
  program.command("init").description("Initialize a new Marvin project in the current directory").action(async () => {
28979
28999
  await initCommand();
28980
29000
  });