@kody-ade/kody-engine-lite 0.1.11 → 0.1.13

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/bin/cli.js CHANGED
@@ -1078,31 +1078,35 @@ function buildPrBody(ctx) {
1078
1078
  const raw = fs4.readFileSync(taskJsonPath, "utf-8");
1079
1079
  const cleaned = raw.replace(/^```json\s*\n?/m, "").replace(/\n?```\s*$/m, "");
1080
1080
  const task = JSON.parse(cleaned);
1081
- sections.push(`## Summary`);
1082
- sections.push(`**Type:** ${task.task_type ?? "unknown"} | **Risk:** ${task.risk_level ?? "unknown"}`);
1083
- if (task.description) sections.push(`
1081
+ if (task.description) {
1082
+ sections.push(`## What
1083
+
1084
1084
  ${task.description}`);
1085
- if (task.scope?.length) sections.push(`
1086
- **Scope:** ${task.scope.join(", ")}`);
1087
- } catch {
1088
- }
1089
- }
1090
- const planPath = path4.join(ctx.taskDir, "plan.md");
1091
- if (fs4.existsSync(planPath)) {
1092
- const plan = fs4.readFileSync(planPath, "utf-8").trim();
1093
- if (plan) {
1094
- const truncated = plan.length > 500 ? plan.slice(0, 500) + "\n..." : plan;
1095
- sections.push(`
1096
- ## Plan
1097
- <details><summary>Implementation plan</summary>
1085
+ }
1086
+ if (task.scope?.length) {
1087
+ sections.push(`
1088
+ ## Scope
1098
1089
 
1099
- ${truncated}
1100
- </details>`);
1090
+ ${task.scope.map((s) => `- \`${s}\``).join("\n")}`);
1091
+ }
1092
+ sections.push(`
1093
+ **Type:** ${task.task_type ?? "unknown"} | **Risk:** ${task.risk_level ?? "unknown"}`);
1094
+ } catch {
1101
1095
  }
1102
1096
  }
1103
1097
  const reviewPath = path4.join(ctx.taskDir, "review.md");
1104
1098
  if (fs4.existsSync(reviewPath)) {
1105
1099
  const review = fs4.readFileSync(reviewPath, "utf-8");
1100
+ const summaryMatch = review.match(/## Summary\s*\n([\s\S]*?)(?=\n## |\n*$)/);
1101
+ if (summaryMatch) {
1102
+ const summary = summaryMatch[1].trim();
1103
+ if (summary) {
1104
+ sections.push(`
1105
+ ## Changes
1106
+
1107
+ ${summary}`);
1108
+ }
1109
+ }
1106
1110
  const verdictMatch = review.match(/## Verdict:\s*(PASS|FAIL)/i);
1107
1111
  if (verdictMatch) {
1108
1112
  sections.push(`
@@ -1114,6 +1118,18 @@ ${truncated}
1114
1118
  const verify = fs4.readFileSync(verifyPath, "utf-8");
1115
1119
  if (/PASS/i.test(verify)) sections.push(`**Verify:** \u2705 typecheck + tests + lint passed`);
1116
1120
  }
1121
+ const planPath = path4.join(ctx.taskDir, "plan.md");
1122
+ if (fs4.existsSync(planPath)) {
1123
+ const plan = fs4.readFileSync(planPath, "utf-8").trim();
1124
+ if (plan) {
1125
+ const truncated = plan.length > 800 ? plan.slice(0, 800) + "\n..." : plan;
1126
+ sections.push(`
1127
+ <details><summary>\u{1F4CB} Implementation plan</summary>
1128
+
1129
+ ${truncated}
1130
+ </details>`);
1131
+ }
1132
+ }
1117
1133
  if (ctx.input.issueNumber) {
1118
1134
  sections.push(`
1119
1135
  Closes #${ctx.input.issueNumber}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -117,15 +117,24 @@ jobs:
117
117
 
118
118
  # For approve mode: extract answer body and convert to rerun
119
119
  # Must run BEFORE task-id generation so we don't create a new task
120
+ # approve: extract answers, convert to rerun
120
121
  if [ "$MODE" = "approve" ]; then
121
122
  APPROVE_BODY=$(echo "$BODY" | sed -n '/\(@kody\|\/kody\)\s*approve/,$p' | tail -n +2)
122
123
  FEEDBACK="$APPROVE_BODY"
123
124
  MODE="rerun"
124
- # Leave TASK_ID empty — entry.ts findLatestTaskForIssue will find the paused task
125
125
  fi
126
126
 
127
- # Auto-generate task-id if not provided (only for non-rerun modes)
128
- if [ -z "$TASK_ID" ] && [ "$MODE" != "rerun" ]; then
127
+ # fix: extract description as feedback, convert to fix command
128
+ if [ "$MODE" = "fix" ]; then
129
+ FIX_BODY=$(echo "$BODY" | sed -n '/\(@kody\|\/kody\)\s*fix/,$p' | tail -n +2)
130
+ if [ -n "$FIX_BODY" ]; then
131
+ FEEDBACK="$FIX_BODY"
132
+ fi
133
+ # Leave TASK_ID empty — entry.ts finds latest task for issue
134
+ fi
135
+
136
+ # Auto-generate task-id if not provided (only for full mode)
137
+ if [ -z "$TASK_ID" ] && [ "$MODE" = "full" ]; then
129
138
  TASK_ID="${ISSUE_NUM}-$(date +%y%m%d-%H%M%S)"
130
139
  fi
131
140