@kaddo/cli 3.57.0 → 3.59.0

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 (2) hide show
  1. package/dist/index.js +32 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2232,6 +2232,8 @@ validation (how to test it), definition of done, open questions and dependencies
2232
2232
  - Do not expand scope without explicit confirmation.
2233
2233
  - Do not create mega Work Items \u2014 split when it covers multiple outcomes.
2234
2234
  - Keep acceptance criteria testable.
2235
+ - This skill refines scope and acceptance criteria but does not approve implementation readiness.
2236
+ Readiness requires human confirmation through \`kaddo ready\` or the MCP \`mark_work_item_ready\` action.
2235
2237
 
2236
2238
  ## Quality checklist
2237
2239
 
@@ -2637,9 +2639,9 @@ var RESPONSIBILITY_MATRIX = {
2637
2639
  agent: "work-item-agent",
2638
2640
  responsibleFor: ["Work Item refinement"],
2639
2641
  produces: ["knowledge/delivery/work-items/"],
2640
- canSuggest: ["implementation-agent"],
2642
+ canSuggest: ["kaddo ready", "mark_work_item_ready", "implementation-agent"],
2641
2643
  cannotSuggest: ["branches", "commits", "pull requests", "code"],
2642
- next: ["implementation-agent"]
2644
+ next: ["kaddo ready (human review)", "implementation-agent"]
2643
2645
  },
2644
2646
  "implementation-agent": {
2645
2647
  agent: "implementation-agent",
@@ -3652,7 +3654,16 @@ and \`blocked\` as active work; \`completed\` and \`archived\` are historical kn
3652
3654
 
3653
3655
  ## Handoff
3654
3656
 
3655
- When the Work Item is refined and ready to build, **hand off to the implementation-agent**.
3657
+ After refining a Work Item, **do not mark it ready automatically**. If the Work Item appears
3658
+ complete (acceptance criteria, validation, code globs, domains all present, open questions
3659
+ resolved), recommend human review and the ready transition:
3660
+
3661
+ - **CLI:** \`kaddo ready <WI-ID>\`
3662
+ - **MCP:** \`mark_work_item_ready({ id: "<WI-ID>" })\`
3663
+
3664
+ The transition to \`ready\` requires explicit human confirmation. Only after a human marks the
3665
+ Work Item as ready should it be handed off to the implementation-agent.
3666
+
3656
3667
  You do **not** suggest branches, commits or pull requests \u2014 implementation (including any Git
3657
3668
  branch suggestion) is the implementation-agent's responsibility, and only by respecting the
3658
3669
  project Git strategy. Your job ends at a clear, traceable Work Item that **states how to test it**.
@@ -8904,6 +8915,8 @@ function buildDeliveryState(dir) {
8904
8915
  return {
8905
8916
  phase: "",
8906
8917
  draft_work_items: byState("draft"),
8918
+ refined_draft_work_items: wis.filter((w) => w.lifecycle === "draft" && w.rawFrontmatter.refined_by).length,
8919
+ refined_draft_ids: wis.filter((w) => w.lifecycle === "draft" && w.rawFrontmatter.refined_by).map((w) => w.id),
8907
8920
  ready_work_items: byState("ready"),
8908
8921
  in_progress_work_items: byState("in-progress"),
8909
8922
  blocked_work_items: byState("blocked"),
@@ -9031,6 +9044,20 @@ function resolveNextStep(dir, now = /* @__PURE__ */ new Date()) {
9031
9044
  const secondary = buildSecondaryRecommendations(st);
9032
9045
  const roadmap = roadmapSignal(dir);
9033
9046
  if (roadmap !== "has-candidates" && st.draft_work_items > 0) {
9047
+ if (st.refined_draft_work_items > 0) {
9048
+ const ids = st.refined_draft_ids;
9049
+ const single = ids.length === 1;
9050
+ return {
9051
+ id: "review-work-item",
9052
+ phase: "Active Delivery",
9053
+ label: single ? `Review ${ids[0]} and mark it ready for implementation.` : "Review refined draft Work Items and mark one ready for implementation.",
9054
+ command: single ? `kaddo ready ${ids[0]}` : "kaddo ready <WI-ID>",
9055
+ mcpAction: "kaddo_mark_work_item_ready",
9056
+ ...single ? { target: ids[0], mcpArgs: { id: ids[0] } } : { targets: ids },
9057
+ reason: single ? `${ids[0]} is a refined draft Work Item awaiting human review.` : `There are ${ids.length} refined draft Work Items awaiting human review.`,
9058
+ ...secondary.length ? { secondary } : {}
9059
+ };
9060
+ }
9034
9061
  return {
9035
9062
  id: "refine-work-item",
9036
9063
  phase: "Active Delivery",
@@ -9836,7 +9863,8 @@ function mapNextStepId(id) {
9836
9863
  "refine-product": "define-product",
9837
9864
  "refine-capabilities": "discover-capabilities",
9838
9865
  "refine-current-state": "describe-architecture",
9839
- "refine-codebase": "describe-architecture"
9866
+ "refine-codebase": "describe-architecture",
9867
+ "review-work-item": "refine-work-item"
9840
9868
  };
9841
9869
  return MAP[id] ?? id;
9842
9870
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaddo/cli",
3
- "version": "3.57.0",
3
+ "version": "3.59.0",
4
4
  "description": "Knowledge Driven Development toolkit",
5
5
  "license": "MIT",
6
6
  "repository": {