@kody-ade/kody-engine 0.4.20 → 0.4.21

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/kody.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@kody-ade/kody-engine",
6
- version: "0.4.20",
6
+ version: "0.4.21",
7
7
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -335,6 +335,16 @@ ensure_label "$failed_label" "b60205" "kody goal-runner: task failed; needs huma
335
335
  # counting child tasks, so list_goal_issues can filter it out cleanly.
336
336
  ensure_goal_issue
337
337
 
338
+ # Open the draft goal PR if the goal branch already exists. Must run BEFORE
339
+ # any of the early exits below (in_flight check, no-undispatched-task idle,
340
+ # etc.) — otherwise active goals that always have a task in flight would
341
+ # never get past the in_flight gate to reach the late call site, leaving
342
+ # the umbrella row without its branch + preview anchor in the dashboard.
343
+ # `ensure_goal_pr` is a safe no-op when the branch hasn't been created yet
344
+ # (the lazy-branch-creation block at the dispatch site handles that case;
345
+ # the next tick picks up the PR creation here).
346
+ ensure_goal_pr
347
+
338
348
  # Merge ready goal-task PRs into the goal branch. We own the merge here
339
349
  # instead of relying on GitHub's `--auto` flag (which requires the repo's
340
350
  # "Allow auto-merge" setting and silently no-ops when disabled). Only merge
@@ -543,11 +553,8 @@ else
543
553
  fi
544
554
  fi
545
555
  fi
546
-
547
- # Open the draft goal PR now that the branch exists. The PR is the dashboard's
548
- # single anchor for the goal's branch + preview + CI; finalize promotes it
549
- # from draft to ready-for-review when every task has closed.
550
- ensure_goal_pr
556
+ # (`ensure_goal_pr` runs at the top of the active path so it's reached even
557
+ # when this tick exits early via the in_flight gate; not duplicated here.)
551
558
 
552
559
  echo "[goal-tick] dispatching @kody on task #$next_issue (--base $goal_branch)"
553
560
  gh issue comment "$next_issue" --body "@kody --base ${goal_branch}"
@@ -1,8 +1,16 @@
1
+ ---
2
+ every: 7d
3
+ ---
4
+
1
5
  # watch-stale-prs
2
6
 
3
7
  > Weekly digest of open PRs that haven't been touched in a while. Writes a
4
8
  > markdown report at `.kody/reports/watch-stale-prs.md` (surfaced by the
5
9
  > dashboard's `/reports` page).
10
+ >
11
+ > Cadence is enforced by the engine via the `every: 7d` frontmatter — this
12
+ > file only fires once per 7 days regardless of how often `job-scheduler`
13
+ > wakes. No prose cadence guard needed.
6
14
 
7
15
  ## Job
8
16
 
@@ -10,10 +18,6 @@ Find every open PR untouched for **≥ 7 days** and write a report listing
10
18
  them, sorted by staleness (oldest first). When there are no stale PRs,
11
19
  write a short "all clear" report so operators know the check ran.
12
20
 
13
- **Cadence guard.** Skip this tick unless `data.lastRunAt` is null or older
14
- than 7 days from now. When skipping, emit the same state back unchanged
15
- with no `gh` calls.
16
-
17
21
  ### What "stale" means
18
22
 
19
23
  A PR is stale if:
@@ -71,16 +75,15 @@ Truncate to the 50 oldest if the list is longer; append a final line
71
75
 
72
76
  ## State
73
77
 
74
- `cursor`:
75
-
76
- - `"idle"` — between runs (cadence guard skipped this tick or the run
77
- finished cleanly).
78
+ `cursor`: always `"idle"` — this job has no phases; each fire is a
79
+ one-shot report write.
78
80
 
79
81
  `data`:
80
82
 
81
- - `lastRunAt` (string, ISO) — when the report was last written. Used by
82
- the cadence guard.
83
83
  - `lastStaleCount` (number) — how many stale PRs were in the most recent
84
- report. Diagnostic only.
84
+ report. Diagnostic only; the engine ignores it.
85
+
86
+ (Engine-managed fields like `lastFiredAt` live under `data` automatically;
87
+ do not write or rely on them from the prompt.)
85
88
 
86
89
  `done`: always `false` — this job is evergreen.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.20",
3
+ "version": "0.4.21",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",