@benzotti/jedi 0.1.3 → 0.1.5
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/action/action.yml +108 -0
- package/action/workflow-template.yml +172 -0
- package/dist/index.js +873 -82
- package/framework/agents/jdi-backend.md +1 -1
- package/framework/agents/jdi-devops.md +1 -1
- package/framework/agents/jdi-executor.md +1 -1
- package/framework/agents/jdi-feedback-learner.md +18 -17
- package/framework/agents/jdi-frontend.md +1 -1
- package/framework/agents/jdi-pr-feedback.md +2 -0
- package/framework/agents/jdi-quality.md +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
name: 'Jedi AI Developer'
|
|
2
|
+
description: 'AI-powered development workflows using the Jedi framework, powered by anthropic/claude-code-action'
|
|
3
|
+
author: 'benzotti'
|
|
4
|
+
|
|
5
|
+
inputs:
|
|
6
|
+
anthropic_api_key:
|
|
7
|
+
description: 'Anthropic API key for Claude'
|
|
8
|
+
required: true
|
|
9
|
+
clickup_api_token:
|
|
10
|
+
description: 'ClickUp API token for ticket fetching (optional)'
|
|
11
|
+
required: false
|
|
12
|
+
default: ''
|
|
13
|
+
allowed_users:
|
|
14
|
+
description: 'Comma-separated GitHub usernames allowed to trigger (empty = repo collaborators with write access)'
|
|
15
|
+
required: false
|
|
16
|
+
default: ''
|
|
17
|
+
trigger_phrase:
|
|
18
|
+
description: 'The trigger phrase to look for in comments'
|
|
19
|
+
required: false
|
|
20
|
+
default: '@jedi'
|
|
21
|
+
jedi_version:
|
|
22
|
+
description: 'Version of @benzotti/jedi to install for init'
|
|
23
|
+
required: false
|
|
24
|
+
default: 'latest'
|
|
25
|
+
claude_code_action_version:
|
|
26
|
+
description: 'Version of anthropic/claude-code-action to use'
|
|
27
|
+
required: false
|
|
28
|
+
default: 'v1'
|
|
29
|
+
|
|
30
|
+
outputs:
|
|
31
|
+
session_id:
|
|
32
|
+
description: 'Claude Code session ID for conversation continuity'
|
|
33
|
+
value: ${{ steps.claude.outputs.session_id }}
|
|
34
|
+
execution_file:
|
|
35
|
+
description: 'Path to Claude Code execution output'
|
|
36
|
+
value: ${{ steps.claude.outputs.execution_file }}
|
|
37
|
+
|
|
38
|
+
runs:
|
|
39
|
+
using: 'composite'
|
|
40
|
+
steps:
|
|
41
|
+
# Ensure Jedi framework is initialised in the repo
|
|
42
|
+
- name: Bootstrap Jedi framework
|
|
43
|
+
shell: bash
|
|
44
|
+
run: |
|
|
45
|
+
if [ ! -d ".jdi/framework" ]; then
|
|
46
|
+
echo "Jedi framework not found — initialising..."
|
|
47
|
+
npx @benzotti/jedi@${{ inputs.jedi_version }} init --ci
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# Ensure persistence directory exists
|
|
51
|
+
mkdir -p .jdi/persistence
|
|
52
|
+
|
|
53
|
+
# Run Claude Code Action with Jedi-specific configuration
|
|
54
|
+
- name: Run Claude with Jedi framework
|
|
55
|
+
id: claude
|
|
56
|
+
uses: anthropics/claude-code-action@${{ inputs.claude_code_action_version }}
|
|
57
|
+
with:
|
|
58
|
+
anthropic_api_key: ${{ inputs.anthropic_api_key }}
|
|
59
|
+
trigger_phrase: ${{ inputs.trigger_phrase }}
|
|
60
|
+
prompt: |
|
|
61
|
+
You are Jedi, an AI development framework that uses specialised agents to plan, implement, review, and ship features.
|
|
62
|
+
|
|
63
|
+
## Framework
|
|
64
|
+
|
|
65
|
+
Read `.jdi/framework/components/meta/AgentBase.md` for the base agent protocol.
|
|
66
|
+
Your framework files are in `.jdi/framework/` — agents, components, learnings, and teams.
|
|
67
|
+
Your state is tracked in `.jdi/config/state.yaml`.
|
|
68
|
+
Plans live in `.jdi/plans/`.
|
|
69
|
+
|
|
70
|
+
## Learnings
|
|
71
|
+
|
|
72
|
+
Check `.jdi/persistence/learnings.md` for accumulated team learnings and preferences.
|
|
73
|
+
Check `.jdi/framework/learnings/` for categorised learnings (backend, frontend, testing, devops, general).
|
|
74
|
+
When you learn something from a review or feedback, update the appropriate learnings file.
|
|
75
|
+
|
|
76
|
+
## Workflow Routing
|
|
77
|
+
|
|
78
|
+
Based on the user's request, follow the appropriate workflow:
|
|
79
|
+
|
|
80
|
+
- **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.
|
|
81
|
+
- **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.
|
|
82
|
+
- **Quick changes** ("quick", "fix", "small"): Make minimal focused changes. Commit when done.
|
|
83
|
+
- **Review** ("review"): Review PR changes using `.jdi/framework/components/quality/PRReview.md`.
|
|
84
|
+
- **PR feedback** ("feedback"): Address review comments using `.jdi/framework/agents/jdi-pr-feedback.md`. Extract learnings from reviewer preferences.
|
|
85
|
+
- **"do" + ClickUp URL**: Full flow — plan from ticket, then implement.
|
|
86
|
+
|
|
87
|
+
## Iterative Refinement
|
|
88
|
+
|
|
89
|
+
After completing any workflow, present a summary and ask for feedback.
|
|
90
|
+
When the user provides feedback, apply changes incrementally — do not restart from scratch.
|
|
91
|
+
When the user approves ("approved", "lgtm", "looks good"), finalise the work.
|
|
92
|
+
|
|
93
|
+
## ClickUp Integration
|
|
94
|
+
|
|
95
|
+
If the user provides a ClickUp URL, fetch the ticket details using the ClickUp API:
|
|
96
|
+
```bash
|
|
97
|
+
curl -s -H "Authorization: $CLICKUP_API_TOKEN" "https://api.clickup.com/api/v2/task/{task_id}"
|
|
98
|
+
```
|
|
99
|
+
Use the ticket name, description, and checklists as requirements.
|
|
100
|
+
|
|
101
|
+
claude_args: '--permission-mode bypassPermissions'
|
|
102
|
+
|
|
103
|
+
env:
|
|
104
|
+
CLICKUP_API_TOKEN: ${{ inputs.clickup_api_token }}
|
|
105
|
+
|
|
106
|
+
branding:
|
|
107
|
+
icon: 'zap'
|
|
108
|
+
color: 'purple'
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Jedi AI Developer — GitHub Actions Workflow
|
|
2
|
+
# Copy this file to .github/workflows/jedi.yml in your repository
|
|
3
|
+
#
|
|
4
|
+
# Prerequisites:
|
|
5
|
+
# 1. Set ANTHROPIC_API_KEY secret in your repo settings
|
|
6
|
+
# 2. That's it — Jedi bootstraps everything else automatically
|
|
7
|
+
#
|
|
8
|
+
# Optional:
|
|
9
|
+
# - Set CLICKUP_API_TOKEN secret for ClickUp ticket integration
|
|
10
|
+
# - Run `npx @benzotti/jedi init` locally to customise framework files
|
|
11
|
+
#
|
|
12
|
+
# Usage: Comment on any issue or PR with @jedi followed by a command:
|
|
13
|
+
# @jedi plan <description> — Create an implementation plan
|
|
14
|
+
# @jedi quick <description> — Make a small, focused change
|
|
15
|
+
# @jedi review — Review the current PR
|
|
16
|
+
# @jedi feedback — Address PR review comments
|
|
17
|
+
# @jedi do <clickup-ticket-url> — Full flow: plan + implement from ticket
|
|
18
|
+
#
|
|
19
|
+
# Conversation: Jedi supports back-and-forth iteration. After Jedi responds,
|
|
20
|
+
# reply with feedback to refine, or say "approved" to finalise.
|
|
21
|
+
#
|
|
22
|
+
# Learnings: Jedi accumulates team preferences across PRs automatically.
|
|
23
|
+
# No files to commit — everything lives in the GitHub Actions cache.
|
|
24
|
+
|
|
25
|
+
name: Jedi
|
|
26
|
+
|
|
27
|
+
on:
|
|
28
|
+
issue_comment:
|
|
29
|
+
types: [created]
|
|
30
|
+
pull_request_review_comment:
|
|
31
|
+
types: [created]
|
|
32
|
+
push:
|
|
33
|
+
branches: [main, master]
|
|
34
|
+
|
|
35
|
+
permissions:
|
|
36
|
+
contents: write
|
|
37
|
+
pull-requests: write
|
|
38
|
+
issues: write
|
|
39
|
+
|
|
40
|
+
jobs:
|
|
41
|
+
# ── Triggered by @jedi comments on issues/PRs ──
|
|
42
|
+
jedi:
|
|
43
|
+
if: >-
|
|
44
|
+
(github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment')
|
|
45
|
+
&& contains(github.event.comment.body, '@jedi')
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
with:
|
|
50
|
+
ref: ${{ github.head_ref || github.ref }}
|
|
51
|
+
|
|
52
|
+
# Restore persisted Jedi state (learnings + codebase-index)
|
|
53
|
+
# 1. Exact match for this branch
|
|
54
|
+
# 2. Fall back to main baseline (accumulated from all merged PRs)
|
|
55
|
+
# 3. Fall back to any branch prefix match
|
|
56
|
+
- name: Restore Jedi state
|
|
57
|
+
uses: actions/cache@v4
|
|
58
|
+
with:
|
|
59
|
+
path: |
|
|
60
|
+
.jdi/persistence/
|
|
61
|
+
.jdi/framework/
|
|
62
|
+
.jdi/config/
|
|
63
|
+
key: jedi-state-${{ github.repository }}-${{ github.head_ref || github.ref_name }}
|
|
64
|
+
restore-keys: |
|
|
65
|
+
jedi-state-${{ github.repository }}-main
|
|
66
|
+
jedi-state-${{ github.repository }}-
|
|
67
|
+
|
|
68
|
+
# Bootstrap Jedi framework if not present (first run or cache miss)
|
|
69
|
+
- name: Bootstrap Jedi
|
|
70
|
+
run: |
|
|
71
|
+
if [ ! -d ".jdi/framework" ]; then
|
|
72
|
+
npx @benzotti/jedi@latest init --ci
|
|
73
|
+
fi
|
|
74
|
+
mkdir -p .jdi/persistence
|
|
75
|
+
|
|
76
|
+
# Run Jedi via the official Claude Code Action
|
|
77
|
+
- name: Run Jedi
|
|
78
|
+
uses: anthropics/claude-code-action@v1
|
|
79
|
+
with:
|
|
80
|
+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
81
|
+
trigger_phrase: '@jedi'
|
|
82
|
+
prompt: |
|
|
83
|
+
You are Jedi, an AI development framework that uses specialised agents to plan, implement, review, and ship features.
|
|
84
|
+
|
|
85
|
+
## Framework
|
|
86
|
+
|
|
87
|
+
Read `.jdi/framework/components/meta/AgentBase.md` for the base agent protocol.
|
|
88
|
+
Your framework files are in `.jdi/framework/` — agents, components, learnings, and teams.
|
|
89
|
+
Your state is tracked in `.jdi/config/state.yaml`.
|
|
90
|
+
Plans live in `.jdi/plans/`.
|
|
91
|
+
|
|
92
|
+
## Learnings
|
|
93
|
+
|
|
94
|
+
IMPORTANT: Always read learnings BEFORE starting any work.
|
|
95
|
+
Check `.jdi/persistence/learnings.md` for accumulated team learnings and preferences.
|
|
96
|
+
Check `.jdi/framework/learnings/` for categorised learnings (backend, frontend, testing, devops, general).
|
|
97
|
+
These learnings represent the team's coding standards — follow them.
|
|
98
|
+
When you learn something new from a review or feedback, update the appropriate learnings file
|
|
99
|
+
AND write the consolidated version to `.jdi/persistence/learnings.md`.
|
|
100
|
+
|
|
101
|
+
## Codebase Index
|
|
102
|
+
|
|
103
|
+
Check `.jdi/persistence/codebase-index.md` for an indexed representation of the codebase.
|
|
104
|
+
If it exists, use it for faster navigation. If it doesn't, consider generating one
|
|
105
|
+
and saving it to `.jdi/persistence/codebase-index.md` for future runs.
|
|
106
|
+
|
|
107
|
+
## Workflow Routing
|
|
108
|
+
|
|
109
|
+
Based on the user's request, follow the appropriate workflow:
|
|
110
|
+
|
|
111
|
+
- **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.
|
|
112
|
+
- **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.
|
|
113
|
+
- **Quick changes** ("quick", "fix", "small"): Make minimal focused changes. Commit when done.
|
|
114
|
+
- **Review** ("review"): Review PR changes using `.jdi/framework/components/quality/PRReview.md`.
|
|
115
|
+
- **PR feedback** ("feedback"): Address review comments using `.jdi/framework/agents/jdi-pr-feedback.md`. Extract learnings from reviewer preferences.
|
|
116
|
+
- **"do" + ClickUp URL**: Full flow — plan from ticket, then implement.
|
|
117
|
+
|
|
118
|
+
## Iterative Refinement
|
|
119
|
+
|
|
120
|
+
After completing any workflow, present a summary and ask for feedback.
|
|
121
|
+
When the user provides feedback, apply changes incrementally — do not restart from scratch.
|
|
122
|
+
When the user approves ("approved", "lgtm", "looks good"), finalise the work.
|
|
123
|
+
|
|
124
|
+
## ClickUp Integration
|
|
125
|
+
|
|
126
|
+
If the user provides a ClickUp URL, fetch the ticket details:
|
|
127
|
+
```bash
|
|
128
|
+
curl -s -H "Authorization: $CLICKUP_API_TOKEN" "https://api.clickup.com/api/v2/task/{task_id}"
|
|
129
|
+
```
|
|
130
|
+
Use the ticket name, description, and checklists as requirements.
|
|
131
|
+
env:
|
|
132
|
+
CLICKUP_API_TOKEN: ${{ secrets.CLICKUP_API_TOKEN }}
|
|
133
|
+
|
|
134
|
+
# Save Jedi state — framework, config, persistence all cached together
|
|
135
|
+
- name: Save Jedi state
|
|
136
|
+
if: always()
|
|
137
|
+
uses: actions/cache/save@v4
|
|
138
|
+
with:
|
|
139
|
+
path: |
|
|
140
|
+
.jdi/persistence/
|
|
141
|
+
.jdi/framework/
|
|
142
|
+
.jdi/config/
|
|
143
|
+
key: jedi-state-${{ github.repository }}-${{ github.head_ref || github.ref_name }}-${{ github.run_id }}
|
|
144
|
+
|
|
145
|
+
# ── Promote learnings to main baseline when PRs merge ──
|
|
146
|
+
promote-learnings:
|
|
147
|
+
if: github.event_name == 'push'
|
|
148
|
+
runs-on: ubuntu-latest
|
|
149
|
+
steps:
|
|
150
|
+
- uses: actions/checkout@v4
|
|
151
|
+
|
|
152
|
+
- name: Restore latest Jedi state
|
|
153
|
+
id: restore
|
|
154
|
+
uses: actions/cache@v4
|
|
155
|
+
with:
|
|
156
|
+
path: |
|
|
157
|
+
.jdi/persistence/
|
|
158
|
+
.jdi/framework/
|
|
159
|
+
.jdi/config/
|
|
160
|
+
key: jedi-state-${{ github.repository }}-main-promotion-${{ github.sha }}
|
|
161
|
+
restore-keys: |
|
|
162
|
+
jedi-state-${{ github.repository }}-
|
|
163
|
+
|
|
164
|
+
- name: Promote to main baseline
|
|
165
|
+
if: steps.restore.outputs.cache-hit != ''
|
|
166
|
+
uses: actions/cache/save@v4
|
|
167
|
+
with:
|
|
168
|
+
path: |
|
|
169
|
+
.jdi/persistence/
|
|
170
|
+
.jdi/framework/
|
|
171
|
+
.jdi/config/
|
|
172
|
+
key: jedi-state-${{ github.repository }}-main-${{ github.sha }}
|