@kody-ade/kody-engine 0.2.40 → 0.2.41

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/kody2.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.2.40",
6
+ version: "0.2.41",
7
7
  description: "kody2 \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -2855,6 +2855,24 @@ ${plan}
2855
2855
  Comment \`@kody2 run\` to execute this plan.`;
2856
2856
  }
2857
2857
 
2858
+ // src/scripts/postResearchComment.ts
2859
+ var postResearchComment = async (ctx) => {
2860
+ if (!ctx.data.agentDone) return;
2861
+ const targetType = ctx.data.commentTargetType;
2862
+ const targetNumber = Number(ctx.data.commentTargetNumber ?? 0);
2863
+ const body = ctx.data.prSummary?.trim();
2864
+ if (targetType !== "issue" || !targetNumber || !body) return;
2865
+ try {
2866
+ postIssueComment(targetNumber, renderResearchComment(targetNumber, body), ctx.cwd);
2867
+ } catch {
2868
+ }
2869
+ };
2870
+ function renderResearchComment(issueNumber, body) {
2871
+ return `## Research for issue #${issueNumber}
2872
+
2873
+ ${body}`;
2874
+ }
2875
+
2858
2876
  // src/scripts/postReviewResult.ts
2859
2877
  function detectVerdict(body) {
2860
2878
  const m = body.match(/##\s*Verdict\s*:\s*(PASS|CONCERNS|FAIL)\b/i);
@@ -3781,6 +3799,7 @@ var postflightScripts = {
3781
3799
  ensurePr: ensurePr2,
3782
3800
  postIssueComment: postIssueComment2,
3783
3801
  postPlanComment,
3802
+ postResearchComment,
3784
3803
  postReviewResult,
3785
3804
  persistArtifacts,
3786
3805
  writeRunSummary,
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "research",
3
+ "describe": "Research an issue: understand the ask, map relevant repo context, and surface clarifying questions + gaps. Read-only — no branches, no commits, no prescribed next steps.",
4
+ "inputs": [
5
+ {
6
+ "name": "issue",
7
+ "flag": "--issue",
8
+ "type": "int",
9
+ "required": true,
10
+ "describe": "GitHub issue number to research."
11
+ }
12
+ ],
13
+ "claudeCode": {
14
+ "model": "inherit",
15
+ "permissionMode": "default",
16
+ "maxTurns": null,
17
+ "systemPromptAppend": null,
18
+ "tools": [
19
+ "Read",
20
+ "Grep",
21
+ "Glob",
22
+ "Bash"
23
+ ],
24
+ "hooks": [],
25
+ "skills": [],
26
+ "commands": [],
27
+ "subagents": [],
28
+ "plugins": [],
29
+ "mcpServers": []
30
+ },
31
+ "cliTools": [],
32
+ "scripts": {
33
+ "preflight": [
34
+ {
35
+ "script": "loadIssueContext"
36
+ },
37
+ {
38
+ "script": "loadTaskState"
39
+ },
40
+ {
41
+ "script": "loadConventions"
42
+ },
43
+ {
44
+ "script": "composePrompt"
45
+ }
46
+ ],
47
+ "postflight": [
48
+ {
49
+ "script": "parseAgentResult"
50
+ },
51
+ {
52
+ "script": "persistArtifacts"
53
+ },
54
+ {
55
+ "script": "postResearchComment"
56
+ },
57
+ {
58
+ "script": "writeRunSummary"
59
+ },
60
+ {
61
+ "script": "saveTaskState"
62
+ }
63
+ ]
64
+ },
65
+ "output": {
66
+ "actionTypes": [
67
+ "RESEARCH_COMPLETED",
68
+ "RESEARCH_FAILED"
69
+ ],
70
+ "artifacts": [
71
+ {
72
+ "name": "research",
73
+ "format": "markdown",
74
+ "from": "prSummary"
75
+ }
76
+ ]
77
+ }
78
+ }
@@ -0,0 +1,61 @@
1
+ You are a senior engineer **researching** a GitHub issue. Your job is to fill in missing information so a downstream planner (human or agent) can make a decision. You will NOT write code. You will NOT run git or gh commands. You will NOT modify files. You will NOT prescribe a next step.
2
+
3
+ Use Read / Grep / Glob / Bash (read-only) to study the codebase as much as needed. Then emit a final message with the research doc wrapped in the required markers (see "Required output").
4
+
5
+ ---
6
+
7
+ # Repo
8
+ - {{repoOwner}}/{{repoName}}, default branch: {{defaultBranch}}
9
+
10
+ # Issue #{{issue.number}}: {{issue.title}}
11
+
12
+ {{issue.body}}
13
+
14
+ Recent comments (most recent first, truncated):
15
+ {{issue.commentsFormatted}}
16
+
17
+ {{conventionsBlock}}
18
+
19
+ ---
20
+
21
+ # Required output
22
+
23
+ Your FINAL message must be exactly this shape (no extra text before or after):
24
+
25
+ ```
26
+ DONE
27
+ COMMIT_MSG: research: <very short title>
28
+ PR_SUMMARY:
29
+ <A research doc in markdown with EXACTLY these sections, in order:
30
+
31
+ ## Understood request
32
+ One paragraph restating what the issue is asking for, in your own words.
33
+
34
+ ## Repo context
35
+ Files, modules, and existing patterns most relevant to the request. Use
36
+ `path/to/file.ts` references. Note anything that constrains the solution
37
+ space (existing abstractions, invariants from AGENTS.md / CLAUDE.md).
38
+
39
+ ## Clarifying questions
40
+ Numbered list. Each question must include a one-line "Why:" explaining why
41
+ the answer changes the implementation. Skip if there are genuinely none.
42
+
43
+ ## Gaps & assumptions
44
+ What is unknown, and — for each gap — what assumption the implementer would
45
+ have to make if it stays unanswered.
46
+
47
+ ## Proposed scope
48
+ Two bullet lists: **In scope** and **Out of scope**. Keep tight: only what
49
+ the issue asks for; call out adjacent work that should NOT be bundled.
50
+
51
+ Keep the whole doc to ~80 lines or less. No filler. No marketing language.
52
+ Do NOT include a "Next steps" / "Recommendation" / "How to proceed" section —
53
+ research stops at findings.>
54
+ ```
55
+
56
+ # Rules
57
+ - Read-only. Do NOT modify any file.
58
+ - Do NOT run git or gh commands.
59
+ - Do NOT propose an implementation plan — that's the planner's job.
60
+ - Do NOT tell the user what command to run next.
61
+ - If the issue is empty or incomprehensible, output `FAILED: <why>` instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.2.40",
3
+ "version": "0.2.41",
4
4
  "description": "kody2 — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",