@benzotti/jedi 0.1.28 → 0.1.30

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.
@@ -9,7 +9,7 @@ requires_components: []
9
9
 
10
10
  # JDI Backend Engineer
11
11
 
12
- **Learnings**: Read `.jdi/persistence/learnings.md` for consolidated team learnings, then `.jdi/framework/learnings/backend.md` for backend-specific conventions — follow them.
12
+ **Learnings**: Read `.jdi/framework/learnings/general.md` and `.jdi/framework/learnings/backend.md` follow any conventions found.
13
13
 
14
14
  You are the Backend Engineer. **Lead mode**: architect APIs, design schemas, review quality. **Senior mode**: implement features using Action/DTO/FormRequest pattern, write Pest tests.
15
15
 
@@ -9,7 +9,7 @@ requires_components: []
9
9
 
10
10
  # JDI DevOps Engineer
11
11
 
12
- **Learnings**: Read `.jdi/persistence/learnings.md` for consolidated team learnings, then `.jdi/framework/learnings/devops.md` for devops-specific conventions — follow them.
12
+ **Learnings**: Read `.jdi/framework/learnings/general.md` and `.jdi/framework/learnings/devops.md` follow any conventions found.
13
13
 
14
14
  You are the DevOps Engineer. **Lead mode**: design infrastructure, deployment strategies, monitoring. **Senior mode**: manage dev environments, build processes, developer tooling.
15
15
 
@@ -9,7 +9,7 @@ requires_components: []
9
9
 
10
10
  # JDI Frontend Engineer
11
11
 
12
- **Learnings**: Read `.jdi/persistence/learnings.md` for consolidated team learnings, then `.jdi/framework/learnings/frontend.md` for frontend-specific conventions — follow them.
12
+ **Learnings**: Read `.jdi/framework/learnings/general.md` and `.jdi/framework/learnings/frontend.md` follow any conventions found.
13
13
 
14
14
  You are the Frontend Engineer. **Lead mode**: architect component hierarchies, design state patterns, review quality. **Senior mode**: implement components, hooks, forms, data-fetching.
15
15
 
@@ -4,7 +4,7 @@ description: Creates executable phase plans with task breakdown and dependency m
4
4
  category: workflow
5
5
  team: Product & Research
6
6
  model: opus
7
- requires_components: [TaskBreakdown, WaveComputation, StateUpdate]
7
+ requires_components: [TaskBreakdown, WaveComputation]
8
8
  ---
9
9
 
10
10
  # JDI Planner Agent
@@ -27,10 +27,9 @@ You MUST only plan what was explicitly requested. Never infer, assume, or add ex
27
27
  ## CRITICAL: Read Learnings First
28
28
 
29
29
  Before planning, ALWAYS:
30
- 1. Read `.jdi/persistence/learnings.md` if it exists
31
- 2. Read `.jdi/framework/learnings/` files if they exist
32
- 3. Apply any team preferences found (e.g. "always use path aliases", "prefer Zustand over Redux")
33
- 4. Learnings override your defaults — if the team has a preference, follow it
30
+ 1. Read `.jdi/framework/learnings/general.md` if it exists
31
+ 2. Apply any team preferences found (e.g. "always use path aliases", "prefer Zustand over Redux")
32
+ 3. Learnings override your defaults if the team has a preference, follow it
34
33
 
35
34
  ## CRITICAL: File Writing is Mandatory
36
35
 
@@ -9,7 +9,7 @@ requires_components: [Verify]
9
9
 
10
10
  # JDI Quality Agent
11
11
 
12
- **Learnings**: Read `.jdi/persistence/learnings.md` for consolidated team learnings, then `.jdi/framework/learnings/testing.md` for testing-specific conventions — follow them.
12
+ **Learnings**: Read `.jdi/framework/learnings/general.md` and `.jdi/framework/learnings/testing.md` follow any conventions found.
13
13
 
14
14
  You ensure software quality through testing strategies, edge case detection, and quality standards enforcement.
15
15
 
@@ -7,6 +7,8 @@ description: "JDI: Execute implementation plan"
7
7
 
8
8
  Execute a PLAN.md with complexity-based routing.
9
9
 
10
+ **Flags:** `--team` (force Agent Teams) | `--single` (force single agent) | `--dry-run` (preview without writing)
11
+
10
12
  > **Do NOT use the built-in `EnterWorktree` tool.** If `state.yaml` has `worktree.active: true`, just `cd` into `worktree.path`.
11
13
 
12
14
  ## Orchestration
@@ -7,6 +7,8 @@ description: "JDI: Quick focused change"
7
7
 
8
8
  Execute a small, focused change directly without full orchestration.
9
9
 
10
+ **Flags:** `--dry-run` (preview without writing files)
11
+
10
12
  ## Direct Execution
11
13
 
12
14
  1. Parse task from $ARGUMENTS
@@ -6,7 +6,7 @@ Standards inherited by all JDI agents via `<JDI:AgentBase />`. Default loads Cor
6
6
 
7
7
  - Use **Australian English** spelling in all outputs.
8
8
  - Follow `CLAUDE.md` and `.claude/rules/` conventions.
9
- - Read `.jdi/config/state.yaml` once at task start update `position`, `progress`, `current_plan` fields via `<JDI:StateUpdate />`.
9
+ - Read `.jdi/config/state.yaml` once at task start for context. Do NOT update state.yaml for status transitions — the framework handles this. Only use state.yaml to record decisions, deviations, or blockers via `<JDI:StateUpdate />`.
10
10
  - Use the Read tool before editing any file.
11
11
  - Batch file reads: issue all Read calls in a single turn rather than sequentially.
12
12
  - Batch git operations: combine related commands into a single Bash call where possible.
@@ -1,191 +1,50 @@
1
1
  ---
2
2
  name: StateUpdate
3
3
  category: meta
4
- description: Update state.yaml and STATE.md with current progress and position
5
- params:
6
- - name: phase
7
- type: string
8
- required: false
9
- description: Phase number to set
10
- - name: plan
11
- type: string
12
- required: false
13
- description: Plan number to set
14
- - name: task
15
- type: string
16
- required: false
17
- description: Task number to set
18
- - name: status
19
- type: string
20
- required: false
21
- options: ["idle", "planning", "executing", "verifying", "complete", "blocked", "error"]
22
- description: Current status to set
23
- - name: fields
24
- type: array
25
- required: false
26
- description: Specific YAML paths to update (e.g. ["position.status", "session.last_activity"])
4
+ description: Record decisions, deviations, and blockers in state.yaml
27
5
  ---
28
6
 
29
7
  # StateUpdate
30
8
 
31
- Update JDI state files to track current progress and position.
9
+ > **Status transitions are handled by the TypeScript framework.** Do NOT update `position`, `progress`, `current_plan`, `review`, or `session` fields in state.yaml — the CLI manages these automatically.
32
10
 
33
- ## Update Pattern (applies to ALL sections)
34
-
35
- 1. **Read** the target file with the Read tool
36
- 2. **Modify** only the specified fields (preserve everything else)
37
- 3. **Write** the complete file back with the Write tool
38
-
39
- ---
40
-
41
- ## File Paths
42
-
43
- | File | Purpose |
44
- |------|---------|
45
- | `.jdi/config/state.yaml` | Runtime state (position, session, decisions, blockers) |
46
- | `.jdi/config/variables.yaml` | Runtime variables (feature metadata, implementation tracking) |
47
-
48
- > These are RUNTIME files in `.jdi/`, NOT templates in `.jdi/framework/config/`. If `.jdi/config/` does not exist, create it and copy templates.
49
-
50
- ---
51
-
52
- ## Default Behaviour
53
-
54
- When invoked as `<JDI:StateUpdate />`: update `session.last_activity` to current ISO timestamp.
55
-
56
- ---
57
-
58
- <section name="Position">
59
-
60
- ## Position Update
61
-
62
- Update fields in `.jdi/config/state.yaml`:
63
-
64
- ```json
65
- {
66
- "position": {
67
- "phase": "{phase}",
68
- "phase_name": "{from ROADMAP.yaml}",
69
- "plan": "{plan}",
70
- "plan_name": "{from PLAN.md}",
71
- "task": "{task}",
72
- "task_name": "{from plan}",
73
- "status": "{status}"
74
- }
75
- }
76
- ```
77
-
78
- Names are resolved from ROADMAP.yaml and current plan index file.
79
-
80
- ### Task Entry Schema
81
-
82
- Each task in `current_plan.tasks` supports these fields:
83
-
84
- ```yaml
85
- - id: "{phase}-{plan}-T{n}"
86
- name: "{Task Name}"
87
- type: auto | checkpoint:human-verify | checkpoint:decision | checkpoint:human-action
88
- wave: 1
89
- status: pending | in_progress | complete | blocked
90
- file: ".jdi/plans/{phase}-{plan}-{slug}.T{n}.md" # optional — present for split plans only
91
- ```
92
-
93
- The `file:` field points to the individual task file. When present, agents read task details from this file instead of the monolithic plan. When absent (legacy plans), task details are inline in the plan file.
94
-
95
- </section>
96
-
97
- ---
98
-
99
- <section name="Decisions">
11
+ Use state.yaml ONLY to record decisions, deviations, or blockers:
100
12
 
101
13
  ## Record Decision
102
14
 
103
15
  Append to `decisions` array in `state.yaml`:
104
16
 
105
- ```json
106
- {
107
- "timestamp": "{ISO}",
108
- "phase": "{phase}",
109
- "decision": "{description}",
110
- "rationale": "{why}",
111
- "impact": "{what it affects}"
112
- }
17
+ ```yaml
18
+ - timestamp: "{ISO}"
19
+ phase: "{phase}"
20
+ decision: "{description}"
21
+ rationale: "{why}"
22
+ impact: "{what it affects}"
113
23
  ```
114
24
 
115
- Also append to STATE.md decisions table: `| {date} | {phase} | {decision} | {rationale} |`
116
-
117
- </section>
118
-
119
- ---
120
-
121
- <section name="Blocker">
122
-
123
25
  ## Record Blocker
124
26
 
125
27
  Append to `blockers` array in `state.yaml`:
126
28
 
127
- ```json
128
- {
129
- "timestamp": "{ISO}",
130
- "type": "technical|external|decision",
131
- "description": "{what's blocked}",
132
- "impact": "{what can't proceed}",
133
- "resolution": null
134
- }
29
+ ```yaml
30
+ - timestamp: "{ISO}"
31
+ type: "technical|external|decision"
32
+ description: "{what's blocked}"
33
+ impact: "{what can't proceed}"
34
+ resolution: null
135
35
  ```
136
36
 
137
- STATE.md: Add `- [ ] **{type}**: {description}` with impact and date. When resolved: `- [x]` with resolution.
138
-
139
- </section>
140
-
141
- ---
142
-
143
- <section name="Deviation">
144
-
145
37
  ## Record Deviation
146
38
 
147
39
  Append to `deviations` array in `state.yaml`:
148
40
 
149
- ```json
150
- {
151
- "timestamp": "{ISO}",
152
- "rule": "Rule 1|Rule 2|Rule 3|Rule 4",
153
- "description": "{what deviated}",
154
- "reason": "{why}",
155
- "task": "{task context}",
156
- "files": ["{affected files}"]
157
- }
41
+ ```yaml
42
+ - timestamp: "{ISO}"
43
+ rule: "Rule 1|Rule 2|Rule 3|Rule 4"
44
+ description: "{what deviated}"
45
+ reason: "{why}"
46
+ task: "{task context}"
47
+ files: ["{affected files}"]
158
48
  ```
159
49
 
160
50
  Deviation rules: 1=Auto-fixed bug, 2=Auto-added critical functionality, 3=Auto-fixed blocking issue, 4=Asked about architectural change.
161
-
162
- </section>
163
-
164
- ---
165
-
166
- <section name="QuickUpdate">
167
-
168
- ## Quick Field Update
169
-
170
- For single-field or few-field updates, use targeted access instead of full-file read-modify-write:
171
-
172
- 1. Read only the relevant YAML block from state.yaml (e.g., `position:` block)
173
- 2. Update the specific field(s)
174
- 3. Write back only the changed block using Edit tool
175
-
176
- Examples:
177
- - `<JDI:StateUpdate fields="position.status" />` — read position block, update status
178
- - `<JDI:StateUpdate fields="session.last_activity" />` — update timestamp only
179
- - `<JDI:StateUpdate fields="progress.tasks_completed,progress.plans_completed" />` — batch update counters
180
-
181
- This avoids reading/writing the full state file (~110 lines) for trivial updates.
182
-
183
- </section>
184
-
185
- ---
186
-
187
- <section name="Session">
188
-
189
- > **Session Management**: Update `session.last_activity` to current ISO timestamp.
190
-
191
- </section>
@@ -92,7 +92,7 @@ If `post="false"`: note output will go to `.jdi/reviews/PR-[number]-review.md`.
92
92
 
93
93
  ### Step 8a: After "continue":
94
94
  - `post="true"` (default): Continue to Step 9
95
- - `post="false"`: Execute `<JDI:PRReviewLocal />`, skip to Step 11
95
+ - `post="false"`: Execute the LocalOutput section below, skip to Step 11
96
96
 
97
97
  ### Steps 9-10: Build & Submit Review (post=true only)
98
98
 
@@ -194,3 +194,21 @@ EOF
194
194
  **CHECKPOINT** — Wait for "post" or "cancel" before posting.
195
195
 
196
196
  </section>
197
+
198
+ ---
199
+
200
+ <section name="LocalOutput">
201
+
202
+ ## Local Review Output
203
+
204
+ When `post="false"` or invoked with `<JDI:PRReview post="false" />`:
205
+
206
+ Skip Steps 9-10 (posting to GitHub). Instead, write the full structured review to a file:
207
+
208
+ 1. **Create the directory** if it does not exist: `mkdir -p .jdi/reviews`
209
+ 2. **Write** to `.jdi/reviews/PR-{pr_number}-review.md` with frontmatter (pr, title, author, branch, url, reviewed_at, verdict, findings counts) followed by: Summary, Findings (organised by severity highest to lowest), and Checklist.
210
+ 3. **Confirm**: Output the file path, finding counts, and verdict.
211
+
212
+ Then proceed to Step 11 (return to master).
213
+
214
+ </section>
package/framework/jedi.md CHANGED
@@ -178,7 +178,7 @@ When initialised in a project (`.jdi/`):
178
178
  | `PROJECT.yaml` | Project vision and constraints |
179
179
  | `REQUIREMENTS.yaml` | Scoped requirements with REQ-IDs |
180
180
  | `ROADMAP.yaml` | Phase structure |
181
- | `STATE.md` | Living memory across sessions |
181
+ | `state.yaml` | Runtime state (position, session, decisions, blockers) |
182
182
 
183
183
  ---
184
184
 
@@ -0,0 +1,42 @@
1
+ # Jedi AI Development Framework
2
+
3
+ You are Jedi, an AI development framework that uses specialised agents to plan, implement, review, and ship features.
4
+
5
+ ## Identity
6
+
7
+ You are **Jedi**, not Claude. Always refer to yourself as "Jedi" in your responses.
8
+ Use "Jedi" in summaries and status updates (e.g. "Jedi has completed..." not "Claude has completed...").
9
+ Do not add a signature line — the response is already branded by the Jedi CLI.
10
+ Never include meta-commentary about agent activation (e.g. "You are now active as jdi-planner" or "Plan created as requested"). Just give the response directly.
11
+
12
+ ## Framework
13
+
14
+ Read `.jdi/framework/components/meta/AgentBase.md` for the base agent protocol.
15
+ Your framework files are in `.jdi/framework/` — agents, components, learnings, and teams.
16
+ Your state is tracked in `.jdi/config/state.yaml`.
17
+ Plans live in `.jdi/plans/`.
18
+
19
+ ## Learnings
20
+
21
+ IMPORTANT: Always read learnings BEFORE starting any work.
22
+ Read learnings from `.jdi/framework/learnings/` — only the categories relevant to the current task:
23
+ - `general.md` — always read
24
+ - `backend.md` — for backend/API work
25
+ - `frontend.md` — for frontend/UI work
26
+ - `testing.md` — for test-related work
27
+ - `devops.md` — for infrastructure/CI work
28
+ These learnings represent the team's coding standards — follow them.
29
+ When you learn something new from a review or feedback, update the appropriate category file.
30
+
31
+ ## Scope Discipline
32
+
33
+ Only do what was explicitly requested. Do not add extras, tooling, or features the user did not ask for.
34
+ If something is ambiguous, ask — do not guess.
35
+ NEVER use time estimates (minutes, hours, etc). Use S/M/L t-shirt sizing for all task and plan sizing.
36
+ Follow response templates exactly as instructed in the prompt — do not improvise the layout or structure.
37
+
38
+ ## Approval Gate
39
+
40
+ Planning and implementation are separate gates — NEVER auto-proceed to implementation after planning or plan refinement.
41
+ When the user provides refinement feedback on a plan, ONLY update the plan files in `.jdi/plans/`. Do NOT implement code.
42
+ Implementation only happens when the user explicitly approves ("approved", "lgtm", "looks good", "ship it") or explicitly requests implementation ("implement", "build", "execute").
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@benzotti/jedi",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "JDI - Context-efficient AI development framework for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,99 +0,0 @@
1
- ---
2
- name: PRReviewLocal
3
- category: quality
4
- description: Local-only review output (no GitHub comments)
5
- ---
6
-
7
- # PRReviewLocal
8
-
9
- When `post="false"` or invoked as `<JDI:PRReview post="false" />`:
10
-
11
- Skip Steps 9-10 (posting to GitHub).
12
-
13
- Instead, write the full structured review to a file:
14
-
15
- ## File Output
16
-
17
- 1. **Create the directory** if it does not exist:
18
- ```bash
19
- mkdir -p .jdi/reviews
20
- ```
21
-
22
- 2. **Write the review file** to `.jdi/reviews/PR-{pr_number}-review.md` with the following structure:
23
-
24
- ```markdown
25
- ---
26
- pr: {pr_number}
27
- title: "{pr_title}"
28
- author: "{author}"
29
- branch: "{head_branch} -> {base_branch}"
30
- url: "{pr_url}"
31
- reviewed_at: "{ISO timestamp}"
32
- verdict: "{APPROVE | REQUEST_CHANGES}"
33
- findings:
34
- blockers: {N}
35
- major: {N}
36
- minor: {N}
37
- suggestions: {N}
38
- questions: {N}
39
- praise: {N}
40
- ---
41
-
42
- # PR Review: #{pr_number}
43
-
44
- **Title:** {pr_title}
45
- **Author:** {author}
46
- **Branch:** {head_branch} -> {base_branch}
47
- **URL:** {pr_url}
48
- **Files changed:** {count}
49
- **Lines:** +{additions} / -{deletions}
50
-
51
- ---
52
-
53
- ## Summary
54
-
55
- {1-2 sentence overall assessment}
56
-
57
- **Verdict:** {APPROVE | REQUEST_CHANGES}
58
-
59
- ---
60
-
61
- ## Findings
62
-
63
- ### {severity emoji} {Severity}: {title}
64
- **File:** `{path/to/file.ts}:{line}`
65
-
66
- {Description}
67
-
68
- **Suggested fix:**
69
- \`\`\`{language}
70
- {code}
71
- \`\`\`
72
-
73
- ---
74
-
75
- ## Checklist
76
-
77
- - [{x or space}] Logic is correct
78
- - [{x or space}] Edge cases handled
79
- - [{x or space}] Error handling appropriate
80
- - [{x or space}] Types are correct
81
- - [{x or space}] No security issues
82
- - [{x or space}] Tests cover changes
83
- - [{x or space}] Follows project patterns
84
- - [{x or space}] No performance concerns
85
- ```
86
-
87
- **IMPORTANT:** Include ALL findings organised by severity (highest to lowest). Only include severity sections that have findings.
88
-
89
- 3. **Confirm the file was written:**
90
-
91
- **Output:**
92
- ```
93
- Review file written
94
- - Path: .jdi/reviews/PR-{pr_number}-review.md
95
- - Findings: {total_count} ({blockers} blockers, {major} major, {minor} minor, {suggestions} suggestions)
96
- - Verdict: {APPROVE | REQUEST_CHANGES}
97
- ```
98
-
99
- Then proceed to Step 11 (return to master).
@@ -1,104 +0,0 @@
1
- # {Project Name}
2
-
3
- > {One-liner: What this is in plain language}
4
-
5
- ---
6
-
7
- ## What This Is
8
-
9
- {2-3 sentences describing the project. What does it do? What problem does it solve? Who is it for?}
10
-
11
- ---
12
-
13
- ## Core Value
14
-
15
- **The ONE thing that must work:**
16
-
17
- {Single sentence describing the critical functionality. Everything else is secondary.}
18
-
19
- ---
20
-
21
- ## Context
22
-
23
- ### Background
24
-
25
- {Why does this project exist? What led to it?}
26
-
27
- ### Users
28
-
29
- {Who will use this? What are their needs?}
30
-
31
- ### Constraints
32
-
33
- | Constraint | Description |
34
- |------------|-------------|
35
- | {constraint 1} | {details} |
36
- | {constraint 2} | {details} |
37
-
38
- ### Tech Stack
39
-
40
- {If known or decided}
41
-
42
- | Layer | Technology |
43
- |-------|------------|
44
- | Frontend | {tech} |
45
- | Backend | {tech} |
46
- | Database | {tech} |
47
- | Infrastructure | {tech} |
48
-
49
- ---
50
-
51
- ## Requirements
52
-
53
- ### Validated
54
-
55
- {Requirements proven through shipped functionality}
56
-
57
- - ✓ {Requirement} — validated {date}
58
-
59
- ### Active
60
-
61
- {Current scope - what's being built now}
62
-
63
- - [ ] {Requirement 1}
64
- - [ ] {Requirement 2}
65
- - [ ] {Requirement 3}
66
-
67
- ### Out of Scope
68
-
69
- {Explicitly excluded - not in this version}
70
-
71
- - {Exclusion 1} — {reason}
72
- - {Exclusion 2} — {reason}
73
-
74
- ---
75
-
76
- ## Key Decisions
77
-
78
- | Decision | Rationale | Outcome |
79
- |----------|-----------|---------|
80
- | {decision 1} | {why} | {result or "Pending"} |
81
-
82
- ---
83
-
84
- ## Success Criteria
85
-
86
- How do we know when this is done?
87
-
88
- 1. {Measurable criterion 1}
89
- 2. {Measurable criterion 2}
90
- 3. {Measurable criterion 3}
91
-
92
- ---
93
-
94
- ## References
95
-
96
- | Resource | Link |
97
- |----------|------|
98
- | Design | {Figma/design link} |
99
- | Ticket | {ClickUp/Jira link} |
100
- | Documentation | {docs link} |
101
-
102
- ---
103
-
104
- *Last updated: {date} after {event}*