@benzotti/jedi 0.1.8 → 0.1.9

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.
@@ -61,6 +61,7 @@ jobs:
61
61
  .jdi/persistence/
62
62
  .jdi/framework/
63
63
  .jdi/config/
64
+ .claude/
64
65
  key: jedi-state-${{ github.repository }}-${{ github.head_ref || github.ref_name }}
65
66
  restore-keys: |
66
67
  jedi-state-${{ github.repository }}-main
@@ -79,63 +80,14 @@ jobs:
79
80
  fi
80
81
  mkdir -p .jdi/persistence
81
82
 
82
- # Run Jedi via the official Claude Code Action
83
+ # Run Jedi via the official Claude Code Action (tag mode — posts comments automatically)
84
+ # NOTE: No 'prompt' input — Jedi instructions live in .claude/CLAUDE.md (written by bootstrap)
85
+ # Using prompt would switch to agent mode which doesn't post comments back to the PR/issue
83
86
  - name: Run Jedi
84
87
  uses: anthropics/claude-code-action@v1
85
88
  with:
86
89
  anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
87
90
  trigger_phrase: '@jedi'
88
- prompt: |
89
- You are Jedi, an AI development framework that uses specialised agents to plan, implement, review, and ship features.
90
-
91
- IMPORTANT: You are running inside a GitHub Action. Your final text response will be posted as a comment on the issue/PR. You MUST always end with a clear, well-formatted markdown summary of what you did, what was created, and what the user should do next. Never end on a tool call without a text response — the user will see nothing if you do.
92
-
93
- ## Framework
94
-
95
- Read `.jdi/framework/components/meta/AgentBase.md` for the base agent protocol.
96
- Your framework files are in `.jdi/framework/` — agents, components, learnings, and teams.
97
- Your state is tracked in `.jdi/config/state.yaml`.
98
- Plans live in `.jdi/plans/`.
99
-
100
- ## Learnings
101
-
102
- IMPORTANT: Always read learnings BEFORE starting any work.
103
- Check `.jdi/persistence/learnings.md` for accumulated team learnings and preferences.
104
- Check `.jdi/framework/learnings/` for categorised learnings (backend, frontend, testing, devops, general).
105
- These learnings represent the team's coding standards — follow them.
106
- When you learn something new from a review or feedback, update the appropriate learnings file
107
- AND write the consolidated version to `.jdi/persistence/learnings.md`.
108
-
109
- ## Codebase Index
110
-
111
- Check `.jdi/persistence/codebase-index.md` for an indexed representation of the codebase.
112
- If it exists, use it for faster navigation. If it doesn't, consider generating one
113
- and saving it to `.jdi/persistence/codebase-index.md` for future runs.
114
-
115
- ## Workflow Routing
116
-
117
- Based on the user's request, follow the appropriate workflow:
118
-
119
- - **Plan requests** ("plan", "design", or ClickUp ticket URLs): Read `.jdi/framework/agents/jdi-planner.md` and create a plan in `.jdi/plans/`. Present a summary and ask for feedback.
120
- - **Implementation** ("implement", "build", "execute"): Read the current plan from state.yaml, use `.jdi/framework/components/meta/ComplexityRouter.md` to decide single-agent vs teams mode.
121
- - **Quick changes** ("quick", "fix", "small"): Make minimal focused changes. Commit when done.
122
- - **Review** ("review"): Review PR changes using `.jdi/framework/components/quality/PRReview.md`.
123
- - **PR feedback** ("feedback"): Address review comments using `.jdi/framework/agents/jdi-pr-feedback.md`. Extract learnings from reviewer preferences.
124
- - **"do" + ClickUp URL**: Full flow — plan from ticket, then implement.
125
-
126
- ## Iterative Refinement
127
-
128
- After completing any workflow, present a summary and ask for feedback.
129
- When the user provides feedback, apply changes incrementally — do not restart from scratch.
130
- When the user approves ("approved", "lgtm", "looks good"), finalise the work.
131
-
132
- ## ClickUp Integration
133
-
134
- If the user provides a ClickUp URL, fetch the ticket details:
135
- ```bash
136
- curl -s -H "Authorization: $CLICKUP_API_TOKEN" "https://api.clickup.com/api/v2/task/{task_id}"
137
- ```
138
- Use the ticket name, description, and checklists as requirements.
139
91
  env:
140
92
  CLICKUP_API_TOKEN: ${{ secrets.CLICKUP_API_TOKEN }}
141
93
 
@@ -148,6 +100,7 @@ jobs:
148
100
  .jdi/persistence/
149
101
  .jdi/framework/
150
102
  .jdi/config/
103
+ .claude/
151
104
  key: jedi-state-${{ github.repository }}-${{ github.head_ref || github.ref_name }}-${{ github.run_id }}
152
105
 
153
106
  # ── Promote learnings to main baseline when PRs merge ──
@@ -165,6 +118,7 @@ jobs:
165
118
  .jdi/persistence/
166
119
  .jdi/framework/
167
120
  .jdi/config/
121
+ .claude/
168
122
  key: jedi-state-${{ github.repository }}-main-promotion-${{ github.sha }}
169
123
  restore-keys: |
170
124
  jedi-state-${{ github.repository }}-
@@ -177,4 +131,5 @@ jobs:
177
131
  .jdi/persistence/
178
132
  .jdi/framework/
179
133
  .jdi/config/
134
+ .claude/
180
135
  key: jedi-state-${{ github.repository }}-main-${{ github.sha }}
package/dist/index.js CHANGED
@@ -9244,7 +9244,7 @@ async function detectProjectType(cwd) {
9244
9244
  // src/utils/copy-framework.ts
9245
9245
  import { join as join2, dirname } from "path";
9246
9246
  import { existsSync as existsSync2, mkdirSync } from "fs";
9247
- async function copyFrameworkFiles(cwd, projectType, force) {
9247
+ async function copyFrameworkFiles(cwd, projectType, force, ci = false) {
9248
9248
  const frameworkDir = join2(import.meta.dir, "../framework");
9249
9249
  const frameworkDest = join2(cwd, ".jdi", "framework");
9250
9250
  const glob = new Bun.Glob("**/*");
@@ -9287,9 +9287,65 @@ async function copyFrameworkFiles(cwd, projectType, force) {
9287
9287
  await Bun.write(dest, content);
9288
9288
  }
9289
9289
  const claudeMdPath = join2(cwd, ".claude", "CLAUDE.md");
9290
- const routingHeader = "## JDI Workflow Routing";
9291
- if (!existsSync2(claudeMdPath)) {
9292
- await Bun.write(claudeMdPath, `${routingHeader}
9290
+ const claudeDir = join2(cwd, ".claude");
9291
+ if (!existsSync2(claudeDir))
9292
+ mkdirSync(claudeDir, { recursive: true });
9293
+ if (ci) {
9294
+ await Bun.write(claudeMdPath, `# Jedi AI Development Framework
9295
+
9296
+ You are Jedi, an AI development framework that uses specialised agents to plan, implement, review, and ship features.
9297
+
9298
+ ## Framework
9299
+
9300
+ Read \`.jdi/framework/components/meta/AgentBase.md\` for the base agent protocol.
9301
+ Your framework files are in \`.jdi/framework/\` \u2014 agents, components, learnings, and teams.
9302
+ Your state is tracked in \`.jdi/config/state.yaml\`.
9303
+ Plans live in \`.jdi/plans/\`.
9304
+
9305
+ ## Learnings
9306
+
9307
+ IMPORTANT: Always read learnings BEFORE starting any work.
9308
+ Check \`.jdi/persistence/learnings.md\` for accumulated team learnings and preferences.
9309
+ Check \`.jdi/framework/learnings/\` for categorised learnings (backend, frontend, testing, devops, general).
9310
+ These learnings represent the team's coding standards \u2014 follow them.
9311
+ When you learn something new from a review or feedback, update the appropriate learnings file
9312
+ AND write the consolidated version to \`.jdi/persistence/learnings.md\`.
9313
+
9314
+ ## Codebase Index
9315
+
9316
+ Check \`.jdi/persistence/codebase-index.md\` for an indexed representation of the codebase.
9317
+ If it exists, use it for faster navigation. If it doesn't, consider generating one
9318
+ and saving it to \`.jdi/persistence/codebase-index.md\` for future runs.
9319
+
9320
+ ## Workflow Routing
9321
+
9322
+ Based on the user's request, follow the appropriate workflow:
9323
+
9324
+ - **Plan requests** ("plan", "design", or ClickUp ticket URLs): Read \`.jdi/framework/agents/jdi-planner.md\` and create a plan in \`.jdi/plans/\`. Present a summary and ask for feedback.
9325
+ - **Implementation** ("implement", "build", "execute"): Read the current plan from state.yaml, use \`.jdi/framework/components/meta/ComplexityRouter.md\` to decide single-agent vs teams mode.
9326
+ - **Quick changes** ("quick", "fix", "small"): Make minimal focused changes. Commit when done.
9327
+ - **Review** ("review"): Review PR changes using \`.jdi/framework/components/quality/PRReview.md\`.
9328
+ - **PR feedback** ("feedback"): Address review comments using \`.jdi/framework/agents/jdi-pr-feedback.md\`. Extract learnings from reviewer preferences.
9329
+ - **"do" + ClickUp URL**: Full flow \u2014 plan from ticket, then implement.
9330
+
9331
+ ## Iterative Refinement
9332
+
9333
+ After completing any workflow, present a summary and ask for feedback.
9334
+ When the user provides feedback, apply changes incrementally \u2014 do not restart from scratch.
9335
+ When the user approves ("approved", "lgtm", "looks good"), finalise the work.
9336
+
9337
+ ## ClickUp Integration
9338
+
9339
+ If the user provides a ClickUp URL, fetch the ticket details:
9340
+ \`\`\`bash
9341
+ curl -s -H "Authorization: $CLICKUP_API_TOKEN" "https://api.clickup.com/api/v2/task/{task_id}"
9342
+ \`\`\`
9343
+ Use the ticket name, description, and checklists as requirements.
9344
+ `);
9345
+ } else {
9346
+ const routingHeader = "## JDI Workflow Routing";
9347
+ if (!existsSync2(claudeMdPath)) {
9348
+ await Bun.write(claudeMdPath, `${routingHeader}
9293
9349
 
9294
9350
  Recognise natural language JDI intents and invoke the matching skill via the Skill tool. Pass the user's full message as the argument.
9295
9351
 
@@ -9307,10 +9363,10 @@ Extract flags from context: "in a worktree" \u2192 \`--worktree\`, "lightweight"
9307
9363
 
9308
9364
  After \`/jdi:create-plan\` or \`/jdi:implement-plan\` completes, the conversation continues naturally \u2014 no new command invocation needed. When the user provides feedback (e.g. "change task 2", "move this to a helper", "add error handling"), apply the changes directly, update state, and present the updated summary. When the user approves (e.g. "approved", "looks good", "lgtm"), finalise the review state. The conversation IS the feedback loop.
9309
9365
  `);
9310
- } else {
9311
- const existing = await Bun.file(claudeMdPath).text();
9312
- if (!existing.includes(routingHeader)) {
9313
- await Bun.write(claudeMdPath, existing + `
9366
+ } else {
9367
+ const existing = await Bun.file(claudeMdPath).text();
9368
+ if (!existing.includes(routingHeader)) {
9369
+ await Bun.write(claudeMdPath, existing + `
9314
9370
  ` + `${routingHeader}
9315
9371
 
9316
9372
  Recognise natural language JDI intents and invoke the matching skill via the Skill tool. Pass the user's full message as the argument.
@@ -9329,6 +9385,7 @@ Extract flags from context: "in a worktree" \u2192 \`--worktree\`, "lightweight"
9329
9385
 
9330
9386
  After \`/jdi:create-plan\` or \`/jdi:implement-plan\` completes, the conversation continues naturally \u2014 no new command invocation needed. When the user provides feedback (e.g. "change task 2", "move this to a helper", "add error handling"), apply the changes directly, update state, and present the updated summary. When the user approves (e.g. "approved", "looks good", "lgtm"), finalise the review state. The conversation IS the feedback loop.
9331
9387
  `);
9388
+ }
9332
9389
  }
9333
9390
  }
9334
9391
  }
@@ -9378,7 +9435,7 @@ var initCommand = defineCommand({
9378
9435
  for (const dir of dirs) {
9379
9436
  await Bun.write(join3(cwd, dir, ".gitkeep"), "");
9380
9437
  }
9381
- await copyFrameworkFiles(cwd, projectType, args.force);
9438
+ await copyFrameworkFiles(cwd, projectType, args.force, args.ci);
9382
9439
  if (args.storage || args["storage-path"]) {
9383
9440
  const { parse, stringify } = await Promise.resolve().then(() => __toESM(require_dist(), 1));
9384
9441
  const configPath = join3(cwd, ".jdi", "config", "jdi-config.yaml");
@@ -11431,7 +11488,7 @@ var setupActionCommand = defineCommand({
11431
11488
  // package.json
11432
11489
  var package_default = {
11433
11490
  name: "@benzotti/jedi",
11434
- version: "0.1.8",
11491
+ version: "0.1.9",
11435
11492
  description: "JDI - Context-efficient AI development framework for Claude Code",
11436
11493
  type: "module",
11437
11494
  bin: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benzotti/jedi",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "JDI - Context-efficient AI development framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {