@kody-ade/kody-engine 0.4.224 → 0.4.225

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 (114) hide show
  1. package/README.md +2 -2
  2. package/dist/bin/kody.js +779 -831
  3. package/dist/executables/run/profile.json +1 -1
  4. package/dist/executables/types.ts +3 -1
  5. package/package.json +1 -1
  6. package/dist/duties/duty-scheduler/duty.md +0 -3
  7. package/dist/duties/duty-scheduler/profile.json +0 -6
  8. package/dist/duties/duty-tick/duty.md +0 -3
  9. package/dist/duties/duty-tick/profile.json +0 -6
  10. package/dist/duties/duty-tick-scripted/duty.md +0 -3
  11. package/dist/duties/duty-tick-scripted/profile.json +0 -6
  12. package/dist/duties/fix/duty.md +0 -10
  13. package/dist/duties/fix/profile.json +0 -6
  14. package/dist/duties/fix-ci/duty.md +0 -10
  15. package/dist/duties/fix-ci/profile.json +0 -6
  16. package/dist/duties/goal-scheduler/duty.md +0 -3
  17. package/dist/duties/goal-scheduler/profile.json +0 -6
  18. package/dist/duties/goal-tick/duty.md +0 -3
  19. package/dist/duties/goal-tick/profile.json +0 -6
  20. package/dist/duties/init/duty.md +0 -10
  21. package/dist/duties/init/profile.json +0 -6
  22. package/dist/duties/job-live-verify/duty.md +0 -3
  23. package/dist/duties/job-live-verify/profile.json +0 -6
  24. package/dist/duties/merge/duty.md +0 -10
  25. package/dist/duties/merge/profile.json +0 -6
  26. package/dist/duties/npm-publish/duty.md +0 -17
  27. package/dist/duties/npm-publish/profile.json +0 -6
  28. package/dist/duties/plan-verify/duty.md +0 -3
  29. package/dist/duties/plan-verify/profile.json +0 -6
  30. package/dist/duties/preview-build/duty.md +0 -10
  31. package/dist/duties/preview-build/profile.json +0 -6
  32. package/dist/duties/probe-skill/duty.md +0 -3
  33. package/dist/duties/probe-skill/profile.json +0 -6
  34. package/dist/duties/qa-goal/duty.md +0 -3
  35. package/dist/duties/qa-goal/profile.json +0 -6
  36. package/dist/duties/release/duty.md +0 -10
  37. package/dist/duties/release/profile.json +0 -6
  38. package/dist/duties/release-deploy/duty.md +0 -10
  39. package/dist/duties/release-deploy/profile.json +0 -6
  40. package/dist/duties/release-prepare/duty.md +0 -10
  41. package/dist/duties/release-prepare/profile.json +0 -6
  42. package/dist/duties/release-publish/duty.md +0 -10
  43. package/dist/duties/release-publish/profile.json +0 -6
  44. package/dist/duties/resolve/duty.md +0 -10
  45. package/dist/duties/resolve/profile.json +0 -6
  46. package/dist/duties/revert/duty.md +0 -10
  47. package/dist/duties/revert/profile.json +0 -6
  48. package/dist/duties/sync/duty.md +0 -10
  49. package/dist/duties/sync/profile.json +0 -6
  50. package/dist/duties/task-job-fail-once/duty.md +0 -3
  51. package/dist/duties/task-job-fail-once/profile.json +0 -6
  52. package/dist/duties/task-job-pass-a/duty.md +0 -3
  53. package/dist/duties/task-job-pass-a/profile.json +0 -6
  54. package/dist/duties/task-job-pass-b/duty.md +0 -3
  55. package/dist/duties/task-job-pass-b/profile.json +0 -6
  56. package/dist/duties/task-jobs/duty.md +0 -3
  57. package/dist/duties/task-jobs/profile.json +0 -6
  58. package/dist/duties/worker-ask/duty.md +0 -10
  59. package/dist/duties/worker-ask/profile.json +0 -6
  60. package/dist/executables/duty-scheduler/profile.json +0 -57
  61. package/dist/executables/duty-tick/profile.json +0 -78
  62. package/dist/executables/duty-tick/prompt.md +0 -77
  63. package/dist/executables/duty-tick/prompts/locked.md +0 -50
  64. package/dist/executables/duty-tick-scripted/profile.json +0 -72
  65. package/dist/executables/fix/profile.json +0 -91
  66. package/dist/executables/fix/prompt.md +0 -90
  67. package/dist/executables/fix-ci/profile.json +0 -71
  68. package/dist/executables/fix-ci/prompt.md +0 -78
  69. package/dist/executables/goal-scheduler/profile.json +0 -53
  70. package/dist/executables/goal-scheduler/scheduler.sh +0 -82
  71. package/dist/executables/goal-tick/profile.json +0 -69
  72. package/dist/executables/init/profile.json +0 -36
  73. package/dist/executables/job-live-verify/profile.json +0 -36
  74. package/dist/executables/job-live-verify/prompt.md +0 -42
  75. package/dist/executables/merge/profile.json +0 -54
  76. package/dist/executables/npm-publish/profile.json +0 -73
  77. package/dist/executables/npm-publish/publish.sh +0 -93
  78. package/dist/executables/plan-verify/profile.json +0 -38
  79. package/dist/executables/plan-verify/prompt.md +0 -72
  80. package/dist/executables/preview-build/profile.json +0 -61
  81. package/dist/executables/preview-health/profile.json +0 -48
  82. package/dist/executables/preview-health/tick.sh +0 -319
  83. package/dist/executables/probe-skill/profile.json +0 -35
  84. package/dist/executables/probe-skill/prompt.md +0 -31
  85. package/dist/executables/probe-skill/skills/probe-skill-marker/SKILL.md +0 -18
  86. package/dist/executables/qa-goal/profile.json +0 -65
  87. package/dist/executables/release/deploy.sh +0 -157
  88. package/dist/executables/release/prepare.sh +0 -353
  89. package/dist/executables/release/profile.json +0 -95
  90. package/dist/executables/release/publish.sh +0 -88
  91. package/dist/executables/release/release.sh +0 -230
  92. package/dist/executables/release/wait.sh +0 -88
  93. package/dist/executables/release-deploy/deploy.sh +0 -222
  94. package/dist/executables/release-deploy/profile.json +0 -53
  95. package/dist/executables/release-prepare/prepare.sh +0 -368
  96. package/dist/executables/release-prepare/profile.json +0 -70
  97. package/dist/executables/release-publish/profile.json +0 -53
  98. package/dist/executables/release-publish/publish.sh +0 -137
  99. package/dist/executables/resolve/apply-prefer.sh +0 -54
  100. package/dist/executables/resolve/profile.json +0 -107
  101. package/dist/executables/resolve/prompt.md +0 -51
  102. package/dist/executables/revert/profile.json +0 -82
  103. package/dist/executables/revert/revert.sh +0 -33
  104. package/dist/executables/sync/profile.json +0 -48
  105. package/dist/executables/task-job-fail-once/profile.json +0 -44
  106. package/dist/executables/task-job-fail-once/prompt.md +0 -1
  107. package/dist/executables/task-job-pass-a/profile.json +0 -43
  108. package/dist/executables/task-job-pass-a/prompt.md +0 -1
  109. package/dist/executables/task-job-pass-b/profile.json +0 -43
  110. package/dist/executables/task-job-pass-b/prompt.md +0 -1
  111. package/dist/executables/task-jobs/profile.json +0 -41
  112. package/dist/executables/task-jobs/prompt.md +0 -1
  113. package/dist/executables/worker-ask/profile.json +0 -70
  114. package/dist/executables/worker-ask/prompt.md +0 -60
@@ -1,107 +0,0 @@
1
- {
2
- "name": "resolve",
3
- "role": "primitive",
4
- "describe": "Resolve merge conflicts between a PR branch and the default branch.",
5
- "inputs": [
6
- {
7
- "name": "pr",
8
- "flag": "--pr",
9
- "type": "int",
10
- "required": true,
11
- "describe": "GitHub PR number whose branch has conflicts with the default branch."
12
- },
13
- {
14
- "name": "prefer",
15
- "flag": "--prefer",
16
- "type": "enum",
17
- "values": ["ours", "theirs"],
18
- "required": false,
19
- "describe": "Force one side for every conflict: 'ours' = PR branch (HEAD), 'theirs' = base branch. Omit to let the agent merge by judgement."
20
- }
21
- ],
22
- "claudeCode": {
23
- "model": "inherit",
24
- "permissionMode": "acceptEdits",
25
- "maxTurns": null,
26
- "systemPromptAppend": null,
27
- "tools": [
28
- "Read",
29
- "Write",
30
- "Edit",
31
- "Bash",
32
- "Grep",
33
- "Glob"
34
- ],
35
- "hooks": ["block-git"],
36
- "skills": [],
37
- "commands": [],
38
- "subagents": [],
39
- "plugins": [],
40
- "mcpServers": []
41
- },
42
- "cliTools": [],
43
- "scripts": {
44
- "preflight": [
45
- {
46
- "script": "setLifecycleLabel",
47
- "with": {
48
- "label": "kody:resolving",
49
- "color": "b60205",
50
- "description": "kody: resolving merge conflicts"
51
- }
52
- },
53
- {
54
- "script": "resolveFlow"
55
- },
56
- {
57
- "shell": "apply-prefer.sh",
58
- "runWhen": { "args.prefer": ["ours", "theirs"] }
59
- },
60
- {
61
- "script": "loadTaskState"
62
- },
63
- {
64
- "script": "loadConventions"
65
- },
66
- {
67
- "script": "loadMemoryContext"
68
- },
69
- {
70
- "script": "loadCoverageRules"
71
- },
72
- {
73
- "script": "composePrompt"
74
- }
75
- ],
76
- "postflight": [
77
- {
78
- "script": "parseAgentResult"
79
- },
80
- {
81
- "script": "stageMergeConflicts"
82
- },
83
- {
84
- "script": "commitAndPush"
85
- },
86
- {
87
- "script": "ensurePr"
88
- },
89
- {
90
- "script": "postIssueComment"
91
- },
92
- {
93
- "script": "writeRunSummary"
94
- },
95
- {
96
- "script": "saveTaskState"
97
- }
98
- ]
99
- },
100
- "output": {
101
- "actionTypes": [
102
- "RESOLVE_COMPLETED",
103
- "RESOLVE_FAILED",
104
- "AGENT_NOT_RUN"
105
- ]
106
- }
107
- }
@@ -1,51 +0,0 @@
1
- You are Kody, an autonomous engineer. A `git merge origin/{{baseBranch}}` into PR #{{pr.number}} (`{{branch}}`) produced conflicts. Resolve them. The wrapper handles git/gh — you do not.
2
-
3
- # Repo
4
- - {{repoOwner}}/{{repoName}}
5
-
6
- # PR #{{pr.number}}: {{pr.title}}
7
-
8
- # Conflicted files
9
-
10
- {{conflictedFiles}}
11
-
12
- {{preferBlock}}{{conventionsBlock}}{{memoryContext}}{{toolsUsage}}# Working-tree conflict markers (truncated)
13
-
14
- {{conflictMarkersPreview}}
15
-
16
- # Required steps
17
- 1. For each conflicted file: read it, understand both sides of the `<<<<<<<` / `=======` / `>>>>>>>` markers, and produce the correct merged content. Remove all conflict markers.
18
- 2. If a conflict resolution directive is given above, follow it exactly — take the specified side for every conflict, no judgement. Otherwise, preserve the PR's intent (the HEAD side) unless `origin/{{baseBranch}}` made a change that should be preserved (e.g. security fix, renamed API), and use judgement.
19
- 3. **Asymmetric conflicts.** Symmetric conflicts (both sides modified the same lines) are easy: merge the content. Asymmetric ones are harder — apply this decision tree:
20
-
21
- - **One side deletes, the other modifies.** Read commit messages and surrounding code on both sides.
22
- - If base deletes (file/function removed) and HEAD modifies → likely the PR was written against an older revision; **prefer deletion**, then check whether HEAD's modification still has a home elsewhere (it may have moved). If the modification was a refactor, deletion wins.
23
- - If base modifies and HEAD deletes (PR removed something that base improved) → **prefer deletion** unless the base modification was a security/correctness fix the PR depends on.
24
- - If you cannot determine intent from the code, emit `FAILED: cannot resolve asymmetric conflict in <file> — <one-line description>` and stop. Do NOT guess.
25
-
26
- - **Both sides add (parallel additions of the same name/symbol).** Keep both if they are genuinely different (e.g. two new functions with similar names that do different things — rename one). Keep one if they are duplicates of the same intent.
27
-
28
- 4. **Generated files.** Do NOT manually merge generated artifacts:
29
- - Lockfiles (`package-lock.json`, `pnpm-lock.yaml`, `yarn.lock`, `bun.lockb`, `Cargo.lock`, `go.sum`, `poetry.lock`, `Pipfile.lock`).
30
- - Test snapshots (`__snapshots__/*.snap`, `*.snap`, Playwright snapshots).
31
- - Build outputs (anything under `dist/`, `build/`, `.next/`, `out/`).
32
- - Schema dumps (`prisma/schema.prisma` migrations directory, generated GraphQL schemas).
33
-
34
- For these, take the conflicted file from base (`origin/{{baseBranch}}`), then re-run the generator (`pnpm install`, `pnpm test -u` *only with confirmation that the snapshot diff is intentional*, `pnpm prisma generate`, etc.). If you cannot determine the right generator command from the repo, emit `FAILED: generated-file conflict in <file> — needs manual regeneration` and stop.
35
-
36
- 5. After resolving, run the quality commands with Bash and fix any issues YOUR resolution introduced.
37
- 6. Final message format (or `FAILED: <reason>` on failure):
38
-
39
- ```
40
- DONE
41
- COMMIT_MSG: fix: resolve merge conflicts with {{baseBranch}}
42
- PR_SUMMARY:
43
- <2-4 bullets: which files had conflicts, how you resolved each, any judgement calls>
44
- ```
45
-
46
- # Rules
47
- - Do NOT run git/gh. Wrapper handles the merge commit.
48
- - Do NOT delete files to "resolve" conflicts. Merge the content.
49
- - Do NOT leave any `<<<<<<<`, `=======`, or `>>>>>>>` markers in files.
50
- - Stay on `{{branch}}`.
51
- {{systemPromptAppend}}
@@ -1,82 +0,0 @@
1
- {
2
- "name": "revert",
3
- "role": "primitive",
4
- "describe": "Revert one or more commits on an existing PR branch via `git revert`. No agent — fully mechanical.",
5
- "inputs": [
6
- {
7
- "name": "pr",
8
- "flag": "--pr",
9
- "type": "int",
10
- "required": true,
11
- "describe": "GitHub PR number whose branch to revert commits on."
12
- },
13
- {
14
- "name": "shas",
15
- "flag": "--shas",
16
- "type": "string",
17
- "required": true,
18
- "bindsCommentRest": true,
19
- "describe": "One or more commit SHAs (whitespace-separated) to revert. Each must exist in the PR branch's history."
20
- }
21
- ],
22
- "claudeCode": {
23
- "model": "inherit",
24
- "permissionMode": "acceptEdits",
25
- "maxTurns": 0,
26
- "maxThinkingTokens": null,
27
- "systemPromptAppend": null,
28
- "tools": [],
29
- "hooks": [],
30
- "skills": [],
31
- "commands": [],
32
- "subagents": [],
33
- "plugins": [],
34
- "mcpServers": []
35
- },
36
- "cliTools": [
37
- {
38
- "name": "git",
39
- "install": { "required": true, "checkCommand": "git --version" },
40
- "verify": "git --version",
41
- "usage": "Used by revert.sh to stage `git revert --no-commit` and by commitAndPush to land the revert.",
42
- "allowedUses": ["revert", "rev-parse", "merge-base", "log", "commit", "push", "rev-list"]
43
- },
44
- {
45
- "name": "gh",
46
- "install": { "required": true, "checkCommand": "gh --version" },
47
- "verify": "gh --version",
48
- "usage": "Used by revertFlow to read PR metadata and post status / failure comments.",
49
- "allowedUses": ["pr", "api", "issue"]
50
- }
51
- ],
52
- "scripts": {
53
- "preflight": [
54
- {
55
- "script": "setLifecycleLabel",
56
- "with": {
57
- "label": "kody:reverting",
58
- "color": "cccccc",
59
- "description": "kody: reverting commits"
60
- }
61
- },
62
- { "script": "revertFlow" },
63
- { "script": "loadTaskState" },
64
- { "shell": "revert.sh" }
65
- ],
66
- "postflight": [
67
- { "script": "markFlowSuccess" },
68
- { "script": "commitAndPush" },
69
- { "script": "ensurePr" },
70
- { "script": "postIssueComment" },
71
- { "script": "recordOutcome" },
72
- { "script": "saveTaskState" },
73
- { "script": "writeRunSummary" }
74
- ]
75
- },
76
- "output": {
77
- "actionTypes": [
78
- "REVERT_COMPLETED",
79
- "REVERT_FAILED"
80
- ]
81
- }
82
- }
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # revert: stage `git revert` of one or more commits on the PR branch.
4
- #
5
- # Runs as a preflight shell entry after revertFlow has validated inputs and
6
- # checked out the branch. revertFlow:
7
- # - Resolved every requested SHA to its full form and re-set
8
- # ctx.args.shas to a whitespace-separated list (we read it via
9
- # KODY_ARG_SHAS).
10
- # - Set ctx.skipAgent=true and ctx.data.commitMessage already, so the
11
- # agent never runs and commitAndPush will use that message.
12
- #
13
- # This script does only the staging — `--no-commit` so commitAndPush
14
- # (postflight) makes the actual commit. That keeps kody's invariant
15
- # intact (only commitAndPush commits) and means the message comes from
16
- # revertFlow, not from git's auto-generated revert subject.
17
- #
18
- # Exits:
19
- # 0 — staged successfully
20
- # 1+ — git revert failed (executor surfaces stderr; postflight bails)
21
-
22
- set -euo pipefail
23
-
24
- shas="${KODY_ARG_SHAS:-}"
25
- if [[ -z "$shas" ]]; then
26
- echo "revert.sh: KODY_ARG_SHAS is empty (revertFlow should have set it)" >&2
27
- exit 64
28
- fi
29
-
30
- # shellcheck disable=SC2086 # Intentional word-splitting on whitespace-separated SHAs.
31
- git revert --no-commit --no-edit $shas
32
-
33
- echo "revert.sh: staged revert of: $shas"
@@ -1,48 +0,0 @@
1
- {
2
- "name": "sync",
3
- "role": "primitive",
4
- "describe": "Merge the default (base) branch into a PR branch and push. No agent.",
5
- "inputs": [
6
- {
7
- "name": "pr",
8
- "flag": "--pr",
9
- "type": "int",
10
- "required": true,
11
- "describe": "GitHub PR number to update from its base branch."
12
- }
13
- ],
14
- "claudeCode": {
15
- "model": "inherit",
16
- "permissionMode": "acceptEdits",
17
- "maxTurns": null,
18
- "systemPromptAppend": null,
19
- "tools": [],
20
- "hooks": [],
21
- "skills": [],
22
- "commands": [],
23
- "subagents": [],
24
- "plugins": [],
25
- "mcpServers": []
26
- },
27
- "cliTools": [],
28
- "scripts": {
29
- "preflight": [
30
- {
31
- "script": "setLifecycleLabel",
32
- "with": {
33
- "label": "kody:syncing",
34
- "color": "c5def5",
35
- "description": "kody: syncing PR with base"
36
- }
37
- },
38
- {
39
- "script": "syncFlow",
40
- "with": { "announceOnSuccess": true }
41
- },
42
- {
43
- "script": "skipAgent"
44
- }
45
- ],
46
- "postflight": []
47
- }
48
- }
@@ -1,44 +0,0 @@
1
- {
2
- "name": "task-job-fail-once",
3
- "role": "utility",
4
- "describe": "Live-test executable that fails the first planned job attempt and succeeds on rerun.",
5
- "kind": "oneshot",
6
- "inputs": [
7
- {
8
- "name": "issue",
9
- "flag": "--issue",
10
- "type": "int",
11
- "required": true,
12
- "describe": "GitHub issue number that owns the task state."
13
- }
14
- ],
15
- "claudeCode": {
16
- "model": "inherit",
17
- "permissionMode": "default",
18
- "maxTurns": 0,
19
- "maxThinkingTokens": null,
20
- "systemPromptAppend": null,
21
- "tools": [],
22
- "hooks": [],
23
- "skills": [],
24
- "commands": [],
25
- "subagents": [],
26
- "plugins": [],
27
- "mcpServers": []
28
- },
29
- "cliTools": [],
30
- "inputArtifacts": [],
31
- "outputArtifacts": [],
32
- "scripts": {
33
- "preflight": [
34
- { "script": "loadIssueContext" },
35
- { "script": "loadTaskState" },
36
- { "script": "skipAgent" }
37
- ],
38
- "postflight": [
39
- { "script": "failOnceTaskJob" },
40
- { "script": "recordOutcome" },
41
- { "script": "saveTaskState" }
42
- ]
43
- }
44
- }
@@ -1 +0,0 @@
1
- This executable is script-only.
@@ -1,43 +0,0 @@
1
- {
2
- "name": "task-job-pass-a",
3
- "role": "utility",
4
- "describe": "Live-test executable that deterministically succeeds as planned task slice A.",
5
- "kind": "oneshot",
6
- "inputs": [
7
- {
8
- "name": "issue",
9
- "flag": "--issue",
10
- "type": "int",
11
- "required": true,
12
- "describe": "GitHub issue number that owns the task state."
13
- }
14
- ],
15
- "claudeCode": {
16
- "model": "inherit",
17
- "permissionMode": "default",
18
- "maxTurns": 0,
19
- "maxThinkingTokens": null,
20
- "systemPromptAppend": null,
21
- "tools": [],
22
- "hooks": [],
23
- "skills": [],
24
- "commands": [],
25
- "subagents": [],
26
- "plugins": [],
27
- "mcpServers": []
28
- },
29
- "cliTools": [],
30
- "inputArtifacts": [],
31
- "outputArtifacts": [],
32
- "scripts": {
33
- "preflight": [
34
- { "script": "loadIssueContext" },
35
- { "script": "loadTaskState" },
36
- { "script": "skipAgent" }
37
- ],
38
- "postflight": [
39
- { "script": "recordOutcome" },
40
- { "script": "saveTaskState" }
41
- ]
42
- }
43
- }
@@ -1 +0,0 @@
1
- This executable is script-only.
@@ -1,43 +0,0 @@
1
- {
2
- "name": "task-job-pass-b",
3
- "role": "utility",
4
- "describe": "Live-test executable that deterministically succeeds as planned task slice B.",
5
- "kind": "oneshot",
6
- "inputs": [
7
- {
8
- "name": "issue",
9
- "flag": "--issue",
10
- "type": "int",
11
- "required": true,
12
- "describe": "GitHub issue number that owns the task state."
13
- }
14
- ],
15
- "claudeCode": {
16
- "model": "inherit",
17
- "permissionMode": "default",
18
- "maxTurns": 0,
19
- "maxThinkingTokens": null,
20
- "systemPromptAppend": null,
21
- "tools": [],
22
- "hooks": [],
23
- "skills": [],
24
- "commands": [],
25
- "subagents": [],
26
- "plugins": [],
27
- "mcpServers": []
28
- },
29
- "cliTools": [],
30
- "inputArtifacts": [],
31
- "outputArtifacts": [],
32
- "scripts": {
33
- "preflight": [
34
- { "script": "loadIssueContext" },
35
- { "script": "loadTaskState" },
36
- { "script": "skipAgent" }
37
- ],
38
- "postflight": [
39
- { "script": "recordOutcome" },
40
- { "script": "saveTaskState" }
41
- ]
42
- }
43
- }
@@ -1 +0,0 @@
1
- This executable is script-only.
@@ -1,41 +0,0 @@
1
- {
2
- "name": "task-jobs",
3
- "role": "utility",
4
- "describe": "Runs the next pending executable from a hidden task job plan on an issue.",
5
- "inputs": [
6
- {
7
- "name": "issue",
8
- "flag": "--issue",
9
- "type": "int",
10
- "required": true,
11
- "describe": "GitHub issue number that carries the task job plan."
12
- }
13
- ],
14
- "claudeCode": {
15
- "model": "inherit",
16
- "permissionMode": "default",
17
- "maxTurns": 0,
18
- "maxThinkingTokens": null,
19
- "systemPromptAppend": null,
20
- "tools": [],
21
- "hooks": [],
22
- "skills": [],
23
- "commands": [],
24
- "subagents": [],
25
- "plugins": [],
26
- "mcpServers": []
27
- },
28
- "cliTools": [],
29
- "inputArtifacts": [],
30
- "outputArtifacts": [],
31
- "scripts": {
32
- "preflight": [
33
- { "script": "loadIssueContext" },
34
- { "script": "loadTaskState" },
35
- { "script": "planTaskJobs" },
36
- { "script": "dispatchNextTaskJob" },
37
- { "script": "skipAgent" }
38
- ],
39
- "postflight": []
40
- }
41
- }
@@ -1 +0,0 @@
1
- This executable is script-only.
@@ -1,70 +0,0 @@
1
- {
2
- "name": "worker-ask",
3
- "role": "primitive",
4
- "describe": "Ad-hoc one-shot: run a staff persona against an inline message + context (from a dashboard @staff mention). Stateless — no duty folder, no state, no commit. Replies into the originating thread.",
5
- "kind": "oneshot",
6
- "inputs": [
7
- {
8
- "name": "worker",
9
- "flag": "--worker",
10
- "type": "string",
11
- "required": true,
12
- "describe": "Staff slug — basename (without .md) of the persona file under .kody/staff/."
13
- },
14
- {
15
- "name": "thread",
16
- "flag": "--thread",
17
- "type": "string",
18
- "describe": "Where to post the reply: `discussion:<n>` (or a bare number) for a Discussion, or `issue:<n>` for an issue/PR. When set, the worker answers as a comment on that thread."
19
- },
20
- {
21
- "name": "message",
22
- "flag": "--message",
23
- "type": "string",
24
- "bindsCommentRest": true,
25
- "describe": "Fallback inline message when no triggering comment body is available (CLI/testing). In production the message is read verbatim from the dispatching comment body."
26
- }
27
- ],
28
- "claudeCode": {
29
- "model": "inherit",
30
- "permissionMode": "default",
31
- "maxTurns": 20,
32
- "maxThinkingTokens": null,
33
- "systemPromptAppend": null,
34
- "tools": ["Bash", "Read"],
35
- "hooks": [],
36
- "skills": [],
37
- "commands": [],
38
- "subagents": [],
39
- "plugins": [],
40
- "mcpServers": []
41
- },
42
- "cliTools": [
43
- {
44
- "name": "gh",
45
- "install": {
46
- "required": true,
47
- "checkCommand": "command -v gh"
48
- },
49
- "verify": "gh auth status",
50
- "usage": "Use `gh` for all GitHub actions. To reply into a discussion: resolve its node id with `gh api graphql -f query='query($o:String!,$r:String!,$n:Int!){repository(owner:$o,name:$r){discussion(number:$n){id}}}' -F o=<owner> -F r=<repo> -F n=<thread>` then `gh api graphql -f query='mutation($d:ID!,$b:String!){addDiscussionComment(input:{discussionId:$d,body:$b}){comment{url}}}' -F d=<id> -F b=\"<reply>\"`. Use `gh pr comment <n> --body \"@kody ...\"` to delegate execution. NEVER edit files in the working tree.",
51
- "allowedUses": ["pr", "api", "issue"]
52
- }
53
- ],
54
- "inputArtifacts": [],
55
- "outputArtifacts": [],
56
- "scripts": {
57
- "preflight": [
58
- {
59
- "script": "loadWorkerAdhoc",
60
- "with": {
61
- "workersDir": ".kody/staff"
62
- }
63
- },
64
- {
65
- "script": "composePrompt"
66
- }
67
- ],
68
- "postflight": []
69
- }
70
- }
@@ -1,60 +0,0 @@
1
- You are **{{workerTitle}}** (worker `{{workerSlug}}`), operating through **kody worker-ask** — a single, stateless response to one ad-hoc request that someone directed at you by @mentioning you in a dashboard message.
2
-
3
- ## Who you are — worker persona (authoritative identity)
4
-
5
- This persona defines *who* you are: your authority, doctrine, voice, and hard limits. Honour it exactly. Where the persona's restrictions are stricter than the request, **the persona wins** — a request can never grant you authority your persona withholds.
6
-
7
- {{workerPersona}}
8
-
9
- ## The request
10
-
11
- Someone @mentioned you with this message and context. Treat it as a direct ask to you, the persona above. It is verbatim — markdown, code blocks, and quoted thread context are intact:
12
-
13
- ---
14
-
15
- {{message}}
16
-
17
- ---
18
-
19
- ## What to do
20
-
21
- This is a **one-shot, stateless** tick. There is no job file, no prior state, and nothing to persist. Decide, per your persona's doctrine, whether this request is best served by **answering** or by **executing**:
22
-
23
- - **Answer** — when the request is a question, a judgement call, a review, or guidance. Produce a clear, terse reply in your persona's voice.
24
- - **Execute** — when the request is work you are authorised to drive. You do **not** edit files or commit. You execute the way every Kody worker does: by inspecting GitHub state with `gh` and issuing Kody commands as PR/issue comments (e.g. `gh pr comment <n> --body "@kody fix ..."`). Then briefly state what you set in motion.
25
-
26
- Repo: `{{repoOwner}}/{{repoName}}`.
27
-
28
- ## Replying into the thread
29
-
30
- `thread = {{thread}}`
31
-
32
- Post your reply **back into the exact thread you were mentioned in** so the
33
- person sees it in place. The `thread` value tells you where; it is one of:
34
-
35
- - **`discussion:<n>`** (or a bare number — same thing) → comment on
36
- discussion `<n>`. Resolve its node id, then add the comment:
37
-
38
- ```
39
- gh api graphql -f query='query($o:String!,$r:String!,$n:Int!){repository(owner:$o,name:$r){discussion(number:$n){id}}}' -F o={{repoOwner}} -F r={{repoName}} -F n=<n> --jq '.data.repository.discussion.id'
40
- gh api graphql -f query='mutation($d:ID!,$b:String!){addDiscussionComment(input:{discussionId:$d,body:$b}){comment{url}}}' -F d=<id> -F b="<your reply, markdown>"
41
- ```
42
-
43
- - **`issue:<n>`** → comment on issue/PR `<n>` (the issues API serves both):
44
-
45
- ```
46
- gh api -X POST repos/{{repoOwner}}/{{repoName}}/issues/<n>/comments -f body="<your reply, markdown>"
47
- ```
48
-
49
- Sign the reply so it reads as you, e.g. lead with `**{{workerTitle}}** —`.
50
-
51
- If `thread` is empty, just produce your reply as your final response (no
52
- GitHub post).
53
-
54
- ## Rules
55
-
56
- - Never edit, create, or delete files in the working tree. Never `git commit`/`push`.
57
- - The only shell tool is `gh`. Everything goes through it.
58
- - Stay inside your persona's authority and restrictions at all times.
59
- - Be terse. One focused reply; do not spawn duplicate work.
60
- - There is **no state output contract** — do not emit a state fenced block. When you have replied (or posted to the thread), you are done.