@benzotti/jedi 0.1.0
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/README.md +615 -0
- package/dist/index.js +10514 -0
- package/framework/adapters/generic.yaml +23 -0
- package/framework/adapters/laravel.yaml +46 -0
- package/framework/adapters/nextjs.yaml +36 -0
- package/framework/adapters/node.yaml +29 -0
- package/framework/agents/jdi-architect.md +118 -0
- package/framework/agents/jdi-backend.md +52 -0
- package/framework/agents/jdi-codebase-mapper.md +59 -0
- package/framework/agents/jdi-committer.md +83 -0
- package/framework/agents/jdi-debugger.md +73 -0
- package/framework/agents/jdi-devops.md +46 -0
- package/framework/agents/jdi-executor.md +89 -0
- package/framework/agents/jdi-feedback-learner.md +92 -0
- package/framework/agents/jdi-frontend.md +51 -0
- package/framework/agents/jdi-head-engineering.md +30 -0
- package/framework/agents/jdi-phase-researcher.md +59 -0
- package/framework/agents/jdi-plan-checker.md +80 -0
- package/framework/agents/jdi-planner.md +140 -0
- package/framework/agents/jdi-pr-feedback.md +118 -0
- package/framework/agents/jdi-pr-generator.md +80 -0
- package/framework/agents/jdi-product-lead.md +44 -0
- package/framework/agents/jdi-quality.md +77 -0
- package/framework/agents/jdi-researcher.md +70 -0
- package/framework/agents/jdi-ux-designer.md +40 -0
- package/framework/agents/jdi-verifier.md +80 -0
- package/framework/commands/commit.md +20 -0
- package/framework/commands/create-plan.md +32 -0
- package/framework/commands/generate-pr.md +19 -0
- package/framework/commands/implement-plan.md +34 -0
- package/framework/commands/init.md +65 -0
- package/framework/commands/pr-feedback.md +20 -0
- package/framework/commands/pr-review.md +15 -0
- package/framework/commands/quick.md +17 -0
- package/framework/commands/status.md +13 -0
- package/framework/commands/worktree-remove.md +32 -0
- package/framework/commands/worktree.md +52 -0
- package/framework/components/execution/CodebaseContext.md +36 -0
- package/framework/components/execution/Commit.md +121 -0
- package/framework/components/execution/Verify.md +140 -0
- package/framework/components/execution/VerifyAdvanced.md +43 -0
- package/framework/components/meta/AgentBase.md +108 -0
- package/framework/components/meta/AgentTeamsOrchestration.md +71 -0
- package/framework/components/meta/ComplexityRouter.md +80 -0
- package/framework/components/meta/StateUpdate.md +191 -0
- package/framework/components/meta/TeamRouter.md +86 -0
- package/framework/components/planning/TaskBreakdown.md +83 -0
- package/framework/components/planning/WaveComputation.md +59 -0
- package/framework/components/quality/PRReview.md +196 -0
- package/framework/components/quality/PRReviewLocal.md +99 -0
- package/framework/config/jdi-config.yaml +159 -0
- package/framework/config/state.yaml +72 -0
- package/framework/config/variables.yaml +43 -0
- package/framework/hooks/checkpoint.md +196 -0
- package/framework/hooks/jdi-worktree-cleanup.md +123 -0
- package/framework/hooks/lint-fix-frontend.md +59 -0
- package/framework/hooks/on-pause.md +213 -0
- package/framework/hooks/pre-commit.md +143 -0
- package/framework/jedi.md +336 -0
- package/framework/learnings/backend.md +3 -0
- package/framework/learnings/devops.md +3 -0
- package/framework/learnings/frontend.md +3 -0
- package/framework/learnings/general.md +3 -0
- package/framework/learnings/testing.md +3 -0
- package/framework/rules/commit-rules.md +24 -0
- package/framework/rules/deviation-rules.md +221 -0
- package/framework/teams/devops.md +26 -0
- package/framework/teams/engineering.md +29 -0
- package/framework/teams/micro-management.md +26 -0
- package/framework/teams/product-research.md +29 -0
- package/framework/teams/quality-assurance.md +27 -0
- package/framework/templates/PLAN-TASK.md +28 -0
- package/framework/templates/PLAN.md +127 -0
- package/framework/templates/PROJECT.md +104 -0
- package/framework/templates/PROJECT.yaml +16 -0
- package/framework/templates/REQUIREMENTS.md +95 -0
- package/framework/templates/REQUIREMENTS.yaml +27 -0
- package/framework/templates/ROADMAP.md +116 -0
- package/framework/templates/ROADMAP.yaml +24 -0
- package/framework/templates/STATE.md +137 -0
- package/framework/templates/SUMMARY.md +201 -0
- package/framework/workflows/README.md +87 -0
- package/package.json +35 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lint-fix-frontend
|
|
3
|
+
description: Auto-fix ESLint issues on frontend files after edit
|
|
4
|
+
trigger: PostToolUse (Edit|Write)
|
|
5
|
+
type: claude-code-hook
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Lint Fix Frontend Hook
|
|
9
|
+
|
|
10
|
+
Automatically runs `bun run lint:fix` after Claude Code (or an agent) edits or writes a file.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Trigger
|
|
15
|
+
|
|
16
|
+
Fires when:
|
|
17
|
+
- Claude Code edits a file (Edit tool)
|
|
18
|
+
- Claude Code writes a file (Write tool)
|
|
19
|
+
- Any JDI agent edits/writes files via subagents
|
|
20
|
+
|
|
21
|
+
**Claude Code event:** `PostToolUse` with matcher `Edit|Write`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Behaviour
|
|
26
|
+
|
|
27
|
+
Runs `bun run lint:fix` (`turbo lint -- --fix`) asynchronously in the background so Claude is not blocked. Covers all frontend workspaces via turbo.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
Registered automatically by `/jdi:init` in `.claude/settings.local.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"hooks": {
|
|
38
|
+
"PostToolUse": [
|
|
39
|
+
{
|
|
40
|
+
"matcher": "Edit|Write",
|
|
41
|
+
"hooks": [
|
|
42
|
+
{
|
|
43
|
+
"type": "command",
|
|
44
|
+
"command": "bun run lint:fix",
|
|
45
|
+
"timeout": 30,
|
|
46
|
+
"async": true
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Manual Override
|
|
58
|
+
|
|
59
|
+
To temporarily disable, remove the `PostToolUse` entry from `.claude/settings.local.json`.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: on-pause
|
|
3
|
+
description: Actions to perform when work is paused, generates continuation file
|
|
4
|
+
trigger: pause_request
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# On-Pause Hook
|
|
8
|
+
|
|
9
|
+
Actions performed when the user requests to pause work or when a session ends naturally.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Trigger
|
|
14
|
+
|
|
15
|
+
Fires when:
|
|
16
|
+
- User explicitly requests to pause (`/jdi:pause`)
|
|
17
|
+
- Session is ending (user leaves)
|
|
18
|
+
- Blocking issue encountered (Rule 4 deviation)
|
|
19
|
+
- Checkpoint requires extended user action
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Purpose
|
|
24
|
+
|
|
25
|
+
Create a continuation file that enables seamless resumption:
|
|
26
|
+
1. Capture current position precisely
|
|
27
|
+
2. Record context that would be lost
|
|
28
|
+
3. Provide clear next action
|
|
29
|
+
4. Enable fresh context resumption
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Actions
|
|
34
|
+
|
|
35
|
+
### 1. Capture Current State
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Read current state
|
|
39
|
+
cat .jdi/config/state.yaml
|
|
40
|
+
|
|
41
|
+
# Extract position
|
|
42
|
+
PHASE=$(yq -r '.position.phase' .jdi/config/state.yaml)
|
|
43
|
+
PLAN=$(yq -r '.position.plan' .jdi/config/state.yaml)
|
|
44
|
+
TASK=$(yq -r '.position.task' .jdi/config/state.yaml)
|
|
45
|
+
STATUS=$(yq -r '.position.status' .jdi/config/state.yaml)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 2. Identify Next Action
|
|
49
|
+
|
|
50
|
+
Based on current status, determine what should happen next:
|
|
51
|
+
|
|
52
|
+
| Status | Next Action |
|
|
53
|
+
|--------|-------------|
|
|
54
|
+
| `planning` | Continue planning |
|
|
55
|
+
| `executing` | Resume task execution |
|
|
56
|
+
| `verifying` | Complete verification |
|
|
57
|
+
| `blocked` | Resolve blocker |
|
|
58
|
+
| `checkpoint` | Await user response |
|
|
59
|
+
|
|
60
|
+
### 3. Capture Session Context
|
|
61
|
+
|
|
62
|
+
Gather context that would be lost:
|
|
63
|
+
- Recent decisions made
|
|
64
|
+
- Key discoveries
|
|
65
|
+
- Warnings or concerns
|
|
66
|
+
- User preferences expressed
|
|
67
|
+
|
|
68
|
+
### 4. Generate Continuation File
|
|
69
|
+
|
|
70
|
+
Create `.jdi/CONTINUE-HERE.md`:
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
---
|
|
74
|
+
paused_at: {ISO timestamp}
|
|
75
|
+
phase: {N}
|
|
76
|
+
plan: {NN}
|
|
77
|
+
task: {N or null}
|
|
78
|
+
status: {status}
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
# Continue Here
|
|
82
|
+
|
|
83
|
+
## Quick Resume
|
|
84
|
+
|
|
85
|
+
**Last completed:** {description of last completed work}
|
|
86
|
+
**Current status:** {what's in progress}
|
|
87
|
+
**Next action:** `{command to run}`
|
|
88
|
+
|
|
89
|
+
## Position
|
|
90
|
+
|
|
91
|
+
| Level | Value | Name |
|
|
92
|
+
|-------|-------|------|
|
|
93
|
+
| Phase | {N} | {phase_name} |
|
|
94
|
+
| Plan | {NN} | {plan_name} |
|
|
95
|
+
| Task | {N} | {task_name or "N/A"} |
|
|
96
|
+
| Status | {status} | |
|
|
97
|
+
|
|
98
|
+
## Context from This Session
|
|
99
|
+
|
|
100
|
+
### Decisions Made
|
|
101
|
+
{List of decisions made during this session}
|
|
102
|
+
|
|
103
|
+
### Key Discoveries
|
|
104
|
+
{Important findings or learnings}
|
|
105
|
+
|
|
106
|
+
### Warnings/Concerns
|
|
107
|
+
{Any issues to be aware of}
|
|
108
|
+
|
|
109
|
+
### User Preferences
|
|
110
|
+
{Any preferences expressed by user}
|
|
111
|
+
|
|
112
|
+
## To Resume
|
|
113
|
+
|
|
114
|
+
### Option 1: Continue Where Left Off
|
|
115
|
+
```bash
|
|
116
|
+
/jdi:resume
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Option 2: Manual Resume
|
|
120
|
+
```bash
|
|
121
|
+
# If task was in progress:
|
|
122
|
+
/jdi:implement-plan {phase}-{plan} --resume-from-task {task}
|
|
123
|
+
|
|
124
|
+
# If planning:
|
|
125
|
+
/jdi:create-plan {phase}
|
|
126
|
+
|
|
127
|
+
# If verifying:
|
|
128
|
+
/jdi:verify {phase}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Recent Commits
|
|
132
|
+
|
|
133
|
+
| Time | Hash | Message |
|
|
134
|
+
|------|------|---------|
|
|
135
|
+
{List recent commits from session}
|
|
136
|
+
|
|
137
|
+
## Files Modified (Uncommitted)
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
git status --short
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
{Output of uncommitted changes, if any}
|
|
144
|
+
|
|
145
|
+
## Blockers (if any)
|
|
146
|
+
|
|
147
|
+
{Description of any blocking issues}
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
*Generated by JDI on-pause hook at {timestamp}*
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### 5. Update State
|
|
155
|
+
|
|
156
|
+
Mark session as paused:
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
position:
|
|
160
|
+
status: paused
|
|
161
|
+
session:
|
|
162
|
+
paused_at: "{timestamp}"
|
|
163
|
+
continuation_file: ".jdi/CONTINUE-HERE.md"
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### 6. Display Pause Summary
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
170
|
+
JDI ► SESSION PAUSED
|
|
171
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
172
|
+
|
|
173
|
+
Paused at: Phase {N}, Plan {NN}, Task {N}
|
|
174
|
+
Status: {status}
|
|
175
|
+
|
|
176
|
+
Continuation file: .jdi/CONTINUE-HERE.md
|
|
177
|
+
|
|
178
|
+
To resume: /jdi:resume
|
|
179
|
+
|
|
180
|
+
───────────────────────────────────────────────────────
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Continuation File Location
|
|
186
|
+
|
|
187
|
+
The continuation file is always at: `.jdi/CONTINUE-HERE.md`
|
|
188
|
+
|
|
189
|
+
This file is:
|
|
190
|
+
- Overwritten on each pause (only one active)
|
|
191
|
+
- Deleted after successful resume
|
|
192
|
+
- Human-readable for manual recovery
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Integration with Resume
|
|
197
|
+
|
|
198
|
+
The `/jdi:resume` command:
|
|
199
|
+
1. Reads `.jdi/CONTINUE-HERE.md`
|
|
200
|
+
2. Loads context specified in the file
|
|
201
|
+
3. Executes the `next_action`
|
|
202
|
+
4. Deletes the continuation file on success
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Success Criteria
|
|
207
|
+
|
|
208
|
+
- [ ] Current position captured accurately
|
|
209
|
+
- [ ] Next action clearly identified
|
|
210
|
+
- [ ] Session context preserved
|
|
211
|
+
- [ ] Continuation file is self-contained
|
|
212
|
+
- [ ] State updated to paused
|
|
213
|
+
- [ ] User informed of how to resume
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pre-commit
|
|
3
|
+
description: Validation before creating a commit
|
|
4
|
+
trigger: commit_attempt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Pre-Commit Hook
|
|
8
|
+
|
|
9
|
+
Validation performed before creating any commit.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Trigger
|
|
14
|
+
|
|
15
|
+
Fires when:
|
|
16
|
+
- <JDI:Commit /> component invoked
|
|
17
|
+
- `/jdi-commit` command run
|
|
18
|
+
- Manual commit through JDI workflow
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Validation Steps
|
|
23
|
+
|
|
24
|
+
### 1. Check Staged Files
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git diff --cached --name-only
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Verify:**
|
|
31
|
+
- At least one file staged
|
|
32
|
+
- No unintended files (logs, secrets, temp)
|
|
33
|
+
- Files match expected task files
|
|
34
|
+
|
|
35
|
+
### 1b. CRITICAL: Validate Excluded Directories
|
|
36
|
+
|
|
37
|
+
**The following directories must NEVER be staged:**
|
|
38
|
+
- `.worktrees/**` - Git worktrees are execution infrastructure
|
|
39
|
+
- `.jdi/**` - JDI runtime state and configuration
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Check for excluded files in staging
|
|
43
|
+
EXCLUDED=$(git diff --cached --name-only | grep -E "^(\.worktrees/|\.jdi/)")
|
|
44
|
+
if [ -n "$EXCLUDED" ]; then
|
|
45
|
+
echo "ERROR: Excluded directories found in staging:"
|
|
46
|
+
echo "$EXCLUDED"
|
|
47
|
+
echo ""
|
|
48
|
+
echo "These directories must not be committed:"
|
|
49
|
+
echo " .worktrees/ - Git worktrees are execution infrastructure"
|
|
50
|
+
echo " .jdi/ - JDI runtime state and configuration"
|
|
51
|
+
echo ""
|
|
52
|
+
echo "Unstage these files with: git reset HEAD <file>"
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**If excluded files found:**
|
|
58
|
+
- **BLOCK COMMIT** (no override allowed)
|
|
59
|
+
- Display error message
|
|
60
|
+
- List offending files
|
|
61
|
+
- Provide unstaging instructions
|
|
62
|
+
|
|
63
|
+
### 2. Run Quality Checks
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# TypeScript check (if applicable)
|
|
67
|
+
bun run typecheck 2>&1 | head -20
|
|
68
|
+
|
|
69
|
+
# Lint check (if applicable)
|
|
70
|
+
bun run lint 2>&1 | head -20
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**If errors:**
|
|
74
|
+
- Block commit
|
|
75
|
+
- Display errors
|
|
76
|
+
- Suggest fixes
|
|
77
|
+
|
|
78
|
+
### 3. Check for Secrets
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Common secret patterns
|
|
82
|
+
grep -r -E "(API_KEY|SECRET|PASSWORD|TOKEN)=" --include="*.ts" --include="*.tsx" --include="*.env" .
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**If found:**
|
|
86
|
+
- Block commit
|
|
87
|
+
- Warn about potential secrets
|
|
88
|
+
- Require confirmation to proceed
|
|
89
|
+
|
|
90
|
+
### 4. Validate Commit Message
|
|
91
|
+
|
|
92
|
+
Check message format:
|
|
93
|
+
```
|
|
94
|
+
{type}({scope}): {description}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Valid types:** feat, fix, refactor, docs, test, chore, perf, style
|
|
98
|
+
|
|
99
|
+
**Validation:**
|
|
100
|
+
- First line ≤72 characters
|
|
101
|
+
- Imperative mood
|
|
102
|
+
- No period at end
|
|
103
|
+
- Scope matches task context
|
|
104
|
+
|
|
105
|
+
### 5. Check for Large Files
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git diff --cached --stat | grep -E "\+[0-9]{4,}"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**If large additions:**
|
|
112
|
+
- Warn about file size
|
|
113
|
+
- Confirm intentional
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Blocking Conditions
|
|
118
|
+
|
|
119
|
+
Commit is blocked if:
|
|
120
|
+
- **Files in `.worktrees/` or `.jdi/` are staged** (NO OVERRIDE ALLOWED)
|
|
121
|
+
- Type check fails
|
|
122
|
+
- Lint errors exist (not warnings)
|
|
123
|
+
- Secrets detected (without override)
|
|
124
|
+
- Message format invalid
|
|
125
|
+
- No files staged
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Override
|
|
130
|
+
|
|
131
|
+
Allow override with:
|
|
132
|
+
- `--no-verify` flag (use sparingly)
|
|
133
|
+
- Explicit confirmation for warnings
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Outputs
|
|
138
|
+
|
|
139
|
+
| Output | Purpose |
|
|
140
|
+
|--------|---------|
|
|
141
|
+
| Pass/Fail | Gate decision |
|
|
142
|
+
| Errors | What needs fixing |
|
|
143
|
+
| Warnings | What to review |
|