@kody-ade/kody-engine-lite 0.1.51 → 0.1.53

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
@@ -300,7 +300,7 @@ var init_config = __esm({
300
300
  repo: ""
301
301
  },
302
302
  paths: {
303
- taskDir: ".tasks"
303
+ taskDir: ".kody/tasks"
304
304
  },
305
305
  agent: {
306
306
  runner: "claude-code",
@@ -1601,6 +1601,20 @@ function executeShipStage(ctx, _def) {
1601
1601
  try {
1602
1602
  const head = getCurrentBranch(ctx.projectDir);
1603
1603
  const base = getDefaultBranch(ctx.projectDir);
1604
+ try {
1605
+ execFileSync7("git", ["add", ctx.taskDir], {
1606
+ cwd: ctx.projectDir,
1607
+ env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
1608
+ stdio: "pipe"
1609
+ });
1610
+ execFileSync7("git", ["commit", "--no-gpg-sign", "-m", `chore: add kody task artifacts [skip ci]`], {
1611
+ cwd: ctx.projectDir,
1612
+ env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
1613
+ stdio: "pipe"
1614
+ });
1615
+ logger.info(" Committed task artifacts");
1616
+ } catch {
1617
+ }
1604
1618
  pushBranch(ctx.projectDir);
1605
1619
  const config = getProjectConfig();
1606
1620
  let owner = config.github?.owner;
@@ -1698,6 +1712,7 @@ Failed: ${msg}
1698
1712
  var init_ship = __esm({
1699
1713
  "src/stages/ship.ts"() {
1700
1714
  "use strict";
1715
+ init_logger();
1701
1716
  init_git_utils();
1702
1717
  init_github_api();
1703
1718
  init_config();
@@ -2249,6 +2264,7 @@ If no pipeline flaw is detected, set "pipelineFlaw" to null.
2249
2264
  import * as fs14 from "fs";
2250
2265
  import * as path14 from "path";
2251
2266
  function ensureFeatureBranchIfNeeded(ctx) {
2267
+ if (ctx.input.prNumber) return;
2252
2268
  if (!ctx.input.issueNumber || ctx.input.dryRun) return;
2253
2269
  try {
2254
2270
  const taskMdPath = path14.join(ctx.taskDir, "task.md");
@@ -2525,7 +2541,7 @@ import * as fs16 from "fs";
2525
2541
  import * as path15 from "path";
2526
2542
  import { execFileSync as execFileSync9 } from "child_process";
2527
2543
  function findLatestTaskForIssue(issueNumber, projectDir) {
2528
- const tasksDir = path15.join(projectDir, ".tasks");
2544
+ const tasksDir = path15.join(projectDir, ".kody", "tasks");
2529
2545
  if (!fs16.existsSync(tasksDir)) return null;
2530
2546
  const allDirs = fs16.readdirSync(tasksDir, { withFileTypes: true }).filter((d) => d.isDirectory()).map((d) => d.name).sort().reverse();
2531
2547
  const prefix = `${issueNumber}-`;
@@ -2586,7 +2602,7 @@ Or comment on the specific PR: \`@kody review\``
2586
2602
  }
2587
2603
  async function runStandaloneReview(input) {
2588
2604
  const taskId = input.taskId ?? `review-${generateTaskId()}`;
2589
- const taskDir = path16.join(input.projectDir, ".tasks", taskId);
2605
+ const taskDir = path16.join(input.projectDir, ".kody", "tasks", taskId);
2590
2606
  fs17.mkdirSync(taskDir, { recursive: true });
2591
2607
  const taskContent = `# ${input.prTitle}
2592
2608
 
@@ -2829,7 +2845,7 @@ function resolveTaskAction(issueNumber, existingTaskId, existingState) {
2829
2845
  function resolveForIssue(issueNumber, projectDir) {
2830
2846
  const existingTaskId = findLatestTaskForIssue(issueNumber, projectDir);
2831
2847
  if (existingTaskId) {
2832
- const statusPath = path18.join(projectDir, ".tasks", existingTaskId, "status.json");
2848
+ const statusPath = path18.join(projectDir, ".kody", "tasks", existingTaskId, "status.json");
2833
2849
  let existingState = null;
2834
2850
  if (fs19.existsSync(statusPath)) {
2835
2851
  try {
@@ -2923,7 +2939,7 @@ async function main() {
2923
2939
  process.exit(1);
2924
2940
  }
2925
2941
  }
2926
- const taskDir = path19.join(projectDir, ".tasks", taskId);
2942
+ const taskDir = path19.join(projectDir, ".kody", "tasks", taskId);
2927
2943
  fs20.mkdirSync(taskDir, { recursive: true });
2928
2944
  if (input.command === "status") {
2929
2945
  printStatus(taskId, taskDir);
@@ -3035,7 +3051,7 @@ ${issue.body ?? ""}`;
3035
3051
  }
3036
3052
  }
3037
3053
  if (!fs20.existsSync(taskMdPath)) {
3038
- console.error("No task.md found. Provide --task, --issue-number, or ensure .tasks/<id>/task.md exists.");
3054
+ console.error("No task.md found. Provide --task, --issue-number, or ensure .kody/tasks/<id>/task.md exists.");
3039
3055
  process.exit(1);
3040
3056
  }
3041
3057
  if (input.command === "fix" && !input.fromStage) {
@@ -3536,7 +3552,7 @@ Given this project context, output ONLY a JSON object with EXACTLY this structur
3536
3552
  },
3537
3553
  "git": { "defaultBranch": "${basic.defaultBranch}" },
3538
3554
  "github": { "owner": "${basic.owner}", "repo": "${basic.repo}" },
3539
- "paths": { "taskDir": ".tasks" },
3555
+ "paths": { "taskDir": ".kody/tasks" },
3540
3556
  "agent": {
3541
3557
  "runner": "${"claude-code"}",
3542
3558
  "defaultRunner": "${"claude"}",
@@ -3594,7 +3610,7 @@ ${context}`;
3594
3610
  config.git.defaultBranch = config.git.defaultBranch || basic.defaultBranch;
3595
3611
  config.github.owner = config.github.owner || basic.owner;
3596
3612
  config.github.repo = config.github.repo || basic.repo;
3597
- config.paths.taskDir = config.paths.taskDir || ".tasks";
3613
+ config.paths.taskDir = config.paths.taskDir || ".kody/tasks";
3598
3614
  config.agent.runner = config.agent.runner || "claude-code";
3599
3615
  config.agent.defaultRunner = config.agent.defaultRunner || "claude";
3600
3616
  if (!config.agent.modelMap) {
@@ -3676,7 +3692,7 @@ function buildFallbackConfig(cwd, basic) {
3676
3692
  },
3677
3693
  git: { defaultBranch: basic.defaultBranch },
3678
3694
  github: { owner: basic.owner, repo: basic.repo },
3679
- paths: { taskDir: ".tasks" },
3695
+ paths: { taskDir: ".kody/tasks" },
3680
3696
  agent: {
3681
3697
  runner: "claude-code",
3682
3698
  defaultRunner: "claude",
@@ -3718,11 +3734,12 @@ function initCommand(opts) {
3718
3734
  const gitignorePath = path20.join(cwd, ".gitignore");
3719
3735
  if (fs21.existsSync(gitignorePath)) {
3720
3736
  const content = fs21.readFileSync(gitignorePath, "utf-8");
3721
- if (!content.includes(".tasks/")) {
3722
- fs21.appendFileSync(gitignorePath, "\n.tasks/\n");
3723
- console.log(" \u2713 .gitignore (added .tasks/)");
3737
+ if (content.includes(".tasks/")) {
3738
+ const updated = content.replace(/\n?\.tasks\/\n?/g, "\n");
3739
+ fs21.writeFileSync(gitignorePath, updated);
3740
+ console.log(" \u2713 .gitignore (removed legacy .tasks/ \u2014 tasks now committed in .kody/tasks/)");
3724
3741
  } else {
3725
- console.log(" \u25CB .gitignore (.tasks/ already present)");
3742
+ console.log(" \u25CB .gitignore (ok)");
3726
3743
  }
3727
3744
  }
3728
3745
  console.log("\n\u2500\u2500 Prerequisites \u2500\u2500");
@@ -82,8 +82,8 @@
82
82
  "properties": {
83
83
  "taskDir": {
84
84
  "type": "string",
85
- "description": "Directory for pipeline artifacts and state (gitignored)",
86
- "default": ".tasks"
85
+ "description": "Directory for pipeline artifacts and state (committed to branch)",
86
+ "default": ".kody/tasks"
87
87
  }
88
88
  },
89
89
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -253,7 +253,7 @@ jobs:
253
253
  if: always()
254
254
  run: |
255
255
  TASK_ID="${{ github.event.inputs.task_id || needs.parse.outputs.task_id }}"
256
- STATUS_FILE=".tasks/${TASK_ID}/status.json"
256
+ STATUS_FILE=".kody/tasks/${TASK_ID}/status.json"
257
257
  if [ -f "$STATUS_FILE" ]; then
258
258
  STATE=$(jq -r '.state' "$STATUS_FILE")
259
259
  ICON="❌"
@@ -282,7 +282,7 @@ jobs:
282
282
  uses: actions/upload-artifact@v4
283
283
  with:
284
284
  name: kody-tasks-${{ github.event.inputs.task_id || needs.parse.outputs.task_id }}
285
- path: .tasks/
285
+ path: .kody/tasks/
286
286
  retention-days: 7
287
287
 
288
288
  # ─── Error Notifications ─────────────────────────────────────────────────────
@@ -345,11 +345,11 @@ jobs:
345
345
  run: kody-engine-lite --help
346
346
  - name: Dry run
347
347
  run: |
348
- mkdir -p .tasks/smoke-test
349
- echo "Smoke test task" > .tasks/smoke-test/task.md
348
+ mkdir -p .kody/tasks/smoke-test
349
+ echo "Smoke test task" > .kody/tasks/smoke-test/task.md
350
350
  kody-engine-lite run --task-id smoke-test --dry-run || true
351
- if [ -f ".tasks/smoke-test/status.json" ]; then
351
+ if [ -f ".kody/tasks/smoke-test/status.json" ]; then
352
352
  echo "✓ status.json created"
353
- cat .tasks/smoke-test/status.json
353
+ cat .kody/tasks/smoke-test/status.json
354
354
  fi
355
- rm -rf .tasks/smoke-test
355
+ rm -rf .kody/tasks/smoke-test