@benzotti/jdi 0.1.46

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.
Files changed (89) hide show
  1. package/README.md +431 -0
  2. package/action/action.yml +116 -0
  3. package/action/workflow-template.yml +242 -0
  4. package/dist/index.js +12860 -0
  5. package/framework/adapters/generic.yaml +23 -0
  6. package/framework/adapters/laravel.yaml +46 -0
  7. package/framework/adapters/nextjs.yaml +36 -0
  8. package/framework/adapters/node.yaml +29 -0
  9. package/framework/agents/jdi-architect.md +147 -0
  10. package/framework/agents/jdi-backend.md +79 -0
  11. package/framework/agents/jdi-codebase-mapper.md +59 -0
  12. package/framework/agents/jdi-committer.md +83 -0
  13. package/framework/agents/jdi-debugger.md +73 -0
  14. package/framework/agents/jdi-devops.md +78 -0
  15. package/framework/agents/jdi-feedback-learner.md +93 -0
  16. package/framework/agents/jdi-frontend.md +78 -0
  17. package/framework/agents/jdi-head-engineering.md +30 -0
  18. package/framework/agents/jdi-perf-analyst.md +116 -0
  19. package/framework/agents/jdi-phase-researcher.md +59 -0
  20. package/framework/agents/jdi-plan-checker.md +80 -0
  21. package/framework/agents/jdi-planner.md +271 -0
  22. package/framework/agents/jdi-pr-feedback.md +120 -0
  23. package/framework/agents/jdi-pr-generator.md +100 -0
  24. package/framework/agents/jdi-producer.md +196 -0
  25. package/framework/agents/jdi-product-lead.md +44 -0
  26. package/framework/agents/jdi-programmer.md +104 -0
  27. package/framework/agents/jdi-qa-tester.md +113 -0
  28. package/framework/agents/jdi-quality.md +106 -0
  29. package/framework/agents/jdi-researcher.md +70 -0
  30. package/framework/agents/jdi-security.md +118 -0
  31. package/framework/agents/jdi-ux-designer.md +78 -0
  32. package/framework/agents/jdi-verifier.md +80 -0
  33. package/framework/commands/build.md +148 -0
  34. package/framework/commands/commit.md +71 -0
  35. package/framework/commands/create-plan.md +192 -0
  36. package/framework/commands/generate-pr.md +91 -0
  37. package/framework/commands/implement-plan.md +218 -0
  38. package/framework/commands/init.md +65 -0
  39. package/framework/commands/pr-feedback.md +75 -0
  40. package/framework/commands/pr-review.md +92 -0
  41. package/framework/commands/quick.md +124 -0
  42. package/framework/commands/status.md +13 -0
  43. package/framework/commands/worktree-remove.md +32 -0
  44. package/framework/commands/worktree.md +52 -0
  45. package/framework/components/execution/CodebaseContext.md +36 -0
  46. package/framework/components/execution/Commit.md +121 -0
  47. package/framework/components/execution/Verify.md +140 -0
  48. package/framework/components/execution/VerifyAdvanced.md +43 -0
  49. package/framework/components/meta/AgentBase.md +121 -0
  50. package/framework/components/meta/AgentRouter.md +318 -0
  51. package/framework/components/meta/AgentTeamsOrchestration.md +115 -0
  52. package/framework/components/meta/ComplexityRouter.md +116 -0
  53. package/framework/components/meta/SilentDiscovery.md +79 -0
  54. package/framework/components/meta/StateUpdate.md +56 -0
  55. package/framework/components/meta/StrictnessProtocol.md +60 -0
  56. package/framework/components/meta/TeamRouter.md +86 -0
  57. package/framework/components/planning/TaskBreakdown.md +95 -0
  58. package/framework/components/planning/WaveComputation.md +59 -0
  59. package/framework/components/quality/PRReview.md +225 -0
  60. package/framework/config/jdi-config.yaml +159 -0
  61. package/framework/config/state.yaml +72 -0
  62. package/framework/config/variables.yaml +43 -0
  63. package/framework/hooks/checkpoint.md +196 -0
  64. package/framework/hooks/jdi-worktree-cleanup.md +123 -0
  65. package/framework/hooks/lint-fix-frontend.md +59 -0
  66. package/framework/hooks/on-pause.md +213 -0
  67. package/framework/hooks/pre-commit.md +143 -0
  68. package/framework/jdi.md +336 -0
  69. package/framework/learnings/backend.md +3 -0
  70. package/framework/learnings/devops.md +3 -0
  71. package/framework/learnings/frontend.md +3 -0
  72. package/framework/learnings/general.md +3 -0
  73. package/framework/learnings/testing.md +3 -0
  74. package/framework/rules/commit-rules.md +24 -0
  75. package/framework/rules/deviation-rules.md +221 -0
  76. package/framework/teams/devops.md +26 -0
  77. package/framework/teams/engineering.md +29 -0
  78. package/framework/teams/micro-management.md +26 -0
  79. package/framework/teams/product-research.md +29 -0
  80. package/framework/teams/quality-assurance.md +27 -0
  81. package/framework/templates/CLAUDE-SHARED.md +60 -0
  82. package/framework/templates/PLAN-TASK.md +35 -0
  83. package/framework/templates/PLAN.md +158 -0
  84. package/framework/templates/PROJECT.yaml +16 -0
  85. package/framework/templates/REQUIREMENTS.yaml +27 -0
  86. package/framework/templates/ROADMAP.yaml +24 -0
  87. package/framework/templates/SUMMARY.md +201 -0
  88. package/framework/workflows/README.md +87 -0
  89. package/package.json +40 -0
@@ -0,0 +1,60 @@
1
+ # StrictnessProtocol Component
2
+
3
+ The discipline every JDI skill follows. Referenced by user-invocable commands to enforce deterministic, auditable behaviour on every invocation.
4
+
5
+ When a command references `<JDI:StrictnessProtocol />`, these rules apply to the command's orchestration. They are **not suggestions** — they are the contract Claude honours for that skill.
6
+
7
+ ---
8
+
9
+ ## The Five Rules
10
+
11
+ 1. **Ask before assuming.** Never infer user intent from silence. If the skill requires information not visible on disk or in frontmatter, stop and ask. A missing answer is not permission to guess.
12
+
13
+ 2. **Present options, not mandates.** When multiple paths are valid, surface them as labelled choices (A / B / C) with the trade-off for each. The user picks — you do not pick for them and narrate.
14
+
15
+ 3. **The user decides strategy; you execute tactics.** Architecture, scope, priority, and verdict calls belong to the user. Naming, file placement, and code conventions belong to you. When in doubt which category a decision falls into, ask.
16
+
17
+ 4. **Never auto-run the next skill.** A skill's job ends when the user has a clear next action. Do not invoke downstream commands, spawn implementers after a plan approval, or chain skills silently. Each skill boundary is a human gate.
18
+
19
+ 5. **Adapt when the template doesn't fit.** The numbered workflow in each skill is the default path, not a prison. If the user's situation doesn't match any option, listen and adjust — but do so explicitly ("this doesn't fit option A/B/C/D — let me adapt…"), not by quietly drifting off-script.
20
+
21
+ ---
22
+
23
+ ## Inline Blocker Sentences
24
+
25
+ Skills that reference this component will include explicit waiting sentences between steps, such as:
26
+
27
+ - "Wait for the user's answer. Do not proceed until they respond."
28
+ - "Store findings internally. Do NOT print them to the user yet."
29
+ - "Stop here. Do not advance state until the user says `approved`."
30
+
31
+ These are hard gates. Treat them as you would a `return` statement in code: execution stops until the condition is met.
32
+
33
+ ---
34
+
35
+ ## Silent Discovery Discipline
36
+
37
+ Skills that also reference `<JDI:SilentDiscovery />` gather context from disk before asking questions. The two components compose:
38
+
39
+ - `SilentDiscovery` defines **what** to read and how to store it
40
+ - `StrictnessProtocol` defines **how** that discovered state shapes the conversation (never re-ask what's already on disk; surface findings only when relevant to the current step)
41
+
42
+ ---
43
+
44
+ ## Deviation Handling
45
+
46
+ If you need to deviate from a skill's numbered workflow — because the user's situation doesn't fit, because a required file is missing, or because an edge case isn't covered — announce the deviation explicitly:
47
+
48
+ > "This situation doesn't match the standard flow: {reason}. I'm going to {adapted approach} instead. Is that okay?"
49
+
50
+ Then wait for confirmation. Silent deviation is the failure mode this protocol exists to prevent.
51
+
52
+ ---
53
+
54
+ ## Usage
55
+
56
+ ```
57
+ <JDI:StrictnessProtocol />
58
+ ```
59
+
60
+ Referenced in the footer of user-invocable commands (`/jdi:build`, `/jdi:create-plan`, `/jdi:implement-plan`, etc.) as the final reassertion of the non-negotiables before the HARD STOP gate.
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: TeamRouter
3
+ category: meta
4
+ description: Resolve which team(s) to spawn for a given command
5
+ params:
6
+ - { name: command, type: string, required: false, description: "Command to route (e.g. create-plan, implement-plan)" }
7
+ ---
8
+
9
+ # TeamRouter
10
+
11
+ ## Routing Table
12
+
13
+ | Command | Primary Team | Supporting | Pattern | Agent Loop |
14
+ |---------|-------------|------------|---------|------------|
15
+ | `create-plan` | Product & Research | — | Sequential | Yes |
16
+ | `implement-plan` | Engineering | Micro-Management | Parallel (oversight) | Yes |
17
+ | `research-phase` | Product & Research | — | Sequential | Yes |
18
+ | `pr-feedback` | Engineering | — | Sequential | Yes |
19
+ | `pr-review` | QA | Engineering | Parallel (context) | Yes |
20
+ | `commit` | Engineering | — | Direct | No |
21
+ | `generate-pr` | Engineering | — | Direct | No |
22
+ | `map-codebase` | Product & Research | — | Sequential | Yes |
23
+ | `resume` | (from state) | (from state) | Resumes previous | Yes |
24
+
25
+ ## Team Specs
26
+
27
+ | Team | Path |
28
+ |------|------|
29
+ | Engineering | `.jdi/framework/teams/engineering.md` |
30
+ | Product & Research | `.jdi/framework/teams/product-research.md` |
31
+ | Quality Assurance | `.jdi/framework/teams/quality-assurance.md` |
32
+ | DevOps | `.jdi/framework/teams/devops.md` |
33
+ | Micro-Management | `.jdi/framework/teams/micro-management.md` |
34
+
35
+ ## Resolution Algorithm
36
+
37
+ 1. Strip `/jdi:` prefix, normalise command
38
+ 2. Look up in routing table (skill names map to same command)
39
+ 3. Resolve primary + supporting team specs
40
+ 4. Determine collaboration pattern and agent loop flag
41
+ 5. Activate members based on task context
42
+
43
+ ---
44
+
45
+ <section name="MemberActivation">
46
+
47
+ ## Member Activation
48
+
49
+ Activate members based on file types in the task:
50
+
51
+ | Context | Detection | Active Members |
52
+ |---------|-----------|----------------|
53
+ | Backend | `.php` files | jdi-backend |
54
+ | Frontend | `.tsx`/`.ts` files | jdi-frontend |
55
+ | Full-stack | Both PHP + TS | jdi-backend, jdi-frontend, jdi-programmer |
56
+ | Commit | Any | jdi-committer |
57
+ | PR generation | Any | jdi-pr-generator |
58
+ | Plan creation | — | jdi-planner, jdi-product-lead |
59
+ | Research | — | jdi-researcher, jdi-planner |
60
+ | PR review | — | jdi-quality, jdi-verifier |
61
+ | Oversight | During implementation | jdi-head-engineering, jdi-product-lead |
62
+
63
+ </section>
64
+
65
+ <section name="ResumeRouting">
66
+
67
+ ## Resume Routing
68
+
69
+ 1. Read `.jdi/config/state.yaml`
70
+ 2. Map status: planning→create-plan, executing→implement-plan, verifying→pr-review
71
+ 3. Route as resolved command with `resume=true, resume_from_task={position.task}`
72
+
73
+ </section>
74
+
75
+ <section name="CollaborationPatterns">
76
+
77
+ ## Collaboration Patterns
78
+
79
+ | Pattern | Used By | Description |
80
+ |---------|---------|-------------|
81
+ | Sequential | create-plan, research-phase, pr-feedback, map-codebase | Primary team executes, writes state, next team reads state to continue |
82
+ | Parallel (Oversight) | implement-plan | Engineering executes tasks; Micro-Management monitors state.yaml, flags concerns |
83
+ | Parallel (Context) | pr-review | QA reviews code; Engineering provides context and addresses findings |
84
+ | Direct | commit, generate-pr | Single agent, single Task invocation, no team coordination |
85
+
86
+ </section>
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: TaskBreakdown
3
+ category: planning
4
+ description: Break requirements or features into executable tasks
5
+ params:
6
+ - name: source
7
+ type: string
8
+ options: ["requirements", "feature", "ticket", "freeform"]
9
+ default: "freeform"
10
+ - name: depth
11
+ type: string
12
+ options: ["shallow", "standard", "deep"]
13
+ default: "standard"
14
+ - name: mode
15
+ type: string
16
+ options: ["default", "dependencies"]
17
+ default: "default"
18
+ ---
19
+
20
+ # TaskBreakdown
21
+
22
+ ## Default Behaviour
23
+
24
+ 1. **Understand the input** — what is being built, acceptance criteria, constraints
25
+ 2. **Identify components** — subsystems involved, files to touch, dependencies
26
+ 3. **Create task list** — each task is atomic (one commit), verifiable, ordered by dependency
27
+ 4. **Output structured tasks** using the format below
28
+
29
+ ---
30
+
31
+ ## Task Format
32
+
33
+ ```markdown
34
+ <task id="{N}" type="auto|checkpoint:*" tdd="true|false" wave="{W}" priority="must|should|nice">
35
+
36
+ ## Task {N}: {Name}
37
+
38
+ **Priority:** must | should | nice
39
+
40
+ **Objective:** {What this task accomplishes}
41
+
42
+ **Files:**
43
+ - `path/to/file1.ts` - {what changes}
44
+
45
+ **Implementation:**
46
+ 1. {Step 1}
47
+ 2. {Step 2}
48
+
49
+ **Verification:**
50
+ - [ ] {Verification check}
51
+
52
+ **Done when:**
53
+ - {Specific, observable completion criteria}
54
+
55
+ </task>
56
+ ```
57
+
58
+ Task types: `auto` (execute without stopping), `checkpoint:human-verify`, `checkpoint:decision`, `checkpoint:human-action`
59
+
60
+ ---
61
+
62
+ ## Dependency Analysis (mode="dependencies")
63
+
64
+ For each task, identify:
65
+ - **Hard dependencies**: Must complete in order (e.g., types needed by implementation)
66
+ - **Soft dependencies**: Prefer order but can parallelise
67
+ - **External dependencies**: May require checkpoint
68
+
69
+ ### Wave Assignment
70
+
71
+ Tasks with no dependencies → Wave 1. Tasks depending on Wave N → Wave N+1.
72
+
73
+ ---
74
+
75
+ ## From Requirements (source="requirements")
76
+
77
+ When breaking down from REQUIREMENTS.yaml: map REQ-IDs to tasks, track which tasks satisfy which requirements, ensure every in-scope requirement has at least one task.
78
+
79
+ ---
80
+
81
+ ## Granularity
82
+
83
+ - **shallow**: 4-6 high-level tasks per feature
84
+ - **standard**: 6-10 balanced tasks (default)
85
+ - **deep**: 10-20 fine-grained tasks for complex/unfamiliar work
86
+
87
+ ---
88
+
89
+ ## Priority Bands
90
+
91
+ Every task MUST be tagged with one of three priority bands:
92
+
93
+ - **Must Have** (critical path — plan fails if not delivered)
94
+ - **Should Have** (planned but droppable under pressure)
95
+ - **Nice to Have** (delivered only with surplus capacity)
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: WaveComputation
3
+ category: planning
4
+ description: Compute execution waves for parallel plan processing
5
+ params:
6
+ - name: plans
7
+ type: array
8
+ required: true
9
+ - name: output
10
+ type: string
11
+ default: inline
12
+ description: Output format (inline|json)
13
+ ---
14
+
15
+ # Wave Computation
16
+
17
+ Analyses plan dependencies and groups plans into execution waves for parallel processing.
18
+
19
+ ## Algorithm
20
+
21
+ ```
22
+ 1. Build dependency graph:
23
+ For each plan P, for each requirement R in P.requires:
24
+ Find plan Q where Q.provides contains R → edge Q → P
25
+
26
+ 2. Topological sort with wave assignment:
27
+ Wave 1: Plans with no dependencies
28
+ Wave N: Plans whose dependencies are all in waves < N
29
+
30
+ 3. Output wave assignments
31
+ ```
32
+
33
+ ## Execution
34
+
35
+ ### Step 1: Extract Frontmatter
36
+
37
+ For each plan file, parse `requires`, `provides`, and current `wave` from YAML frontmatter.
38
+
39
+ ### Step 2: Build Dependency Graph
40
+
41
+ Map which plans depend on which based on requires/provides matching.
42
+
43
+ ### Step 3: Compute Waves
44
+
45
+ Assign waves based on dependency resolution. Plans in the same wave can execute in parallel.
46
+
47
+ ### Step 4: Output
48
+
49
+ **Inline**: Update each plan's frontmatter `wave` field.
50
+ **JSON**: Return wave structure for programmer with wave number, plan IDs, and parallelism flag.
51
+
52
+ ## Cross-Phase Dependencies
53
+
54
+ Dependencies from previous phases (`requires.phase < current`) are assumed satisfied if that phase is complete. Verify via `.jdi/phases/{required-phase}/VERIFICATION.md`.
55
+
56
+ ## Error Handling
57
+
58
+ - **Circular dependencies**: Report error with cycle path, suggest splitting a plan
59
+ - **Missing provides**: Check if cross-phase; if not, report and suggest adding plan
@@ -0,0 +1,225 @@
1
+ ---
2
+ name: PRReview
3
+ category: quality
4
+ description: Review pull request changes and post line comments to GitHub
5
+ params:
6
+ - name: pr_number
7
+ type: string
8
+ required: false
9
+ description: PR number to review (auto-detected if not provided)
10
+ - name: context
11
+ type: string
12
+ required: false
13
+ description: Extra context - ClickUp URL, focus areas, or specific instructions
14
+ - name: depth
15
+ type: string
16
+ required: false
17
+ options: ["quick", "standard", "thorough"]
18
+ default: "standard"
19
+ description: How deeply to analyse the changes
20
+ - name: post
21
+ type: boolean
22
+ required: false
23
+ default: true
24
+ description: Whether to post comments to GitHub (false = local review only)
25
+ ---
26
+
27
+ # PRReview
28
+
29
+ Review pull request changes with structured analysis and post line comments to GitHub.
30
+
31
+ ## Default Behaviour
32
+
33
+ When invoked as `<JDI:PRReview />`, execute steps in order:
34
+
35
+ ### Step 1: Identify PR (REQUIRED)
36
+
37
+ If PR number provided, use it. Otherwise detect:
38
+
39
+ ```bash
40
+ gh pr view --json number,url,title,headRefName,baseRefName,author --jq '.'
41
+ ```
42
+
43
+ If no PR found: report and **STOP completely**.
44
+
45
+ ### Step 2: Checkout PR Branch (REQUIRED)
46
+
47
+ ```bash
48
+ git fetch origin
49
+ gh pr checkout [pr_number]
50
+ git branch --show-current
51
+ ```
52
+
53
+ ### Step 3: Gather PR Context
54
+
55
+ ```bash
56
+ gh pr view [pr_number] --json title,body,additions,deletions,changedFiles,commits,labels
57
+ gh pr view [pr_number] --json files --jq '.files[].path'
58
+ gh pr diff [pr_number]
59
+ gh pr view [pr_number] --json commits --jq '.commits[-1].oid'
60
+ ```
61
+
62
+ ### Step 4: Understand PR Intent
63
+
64
+ 1. Read PR description — what problem is being solved?
65
+ 2. Read commit messages — what approach was taken?
66
+ 3. Identify scope — what should/shouldn't be reviewed?
67
+
68
+ If context provided:
69
+ - ClickUp URL (`app.clickup.com`): Note for requirements checking
70
+ - Focus keywords: Prioritise these areas
71
+ - Instructions: Follow during review
72
+
73
+ ### Step 5: Read Changed Files FULLY
74
+
75
+ Read each changed file in its entirety (not just the diff). **NEVER** use limit/offset.
76
+
77
+ ### Step 5b: Cross-Reference Learnings (MANDATORY)
78
+
79
+ If learnings files were loaded (via the command stub or agent prompt), cross-reference every changed file against the team's learnings:
80
+
81
+ 1. For each finding from the review checklist, check if a learning exists that addresses it — cite the learning in your comment.
82
+ 2. Flag any code that **violates** a documented learning (e.g. a learning says "always use path aliases" but the PR uses relative imports).
83
+ 3. **Praise** code that follows learnings the team has documented — this reinforces good patterns.
84
+ 4. If no learnings were loaded, skip this step (but note it in your review summary as a gap).
85
+
86
+ Learnings-based findings should use the same severity classification as other findings. A violation of a documented team convention is at minimum a **minor** finding.
87
+
88
+ ### Step 6: Perform Code Review
89
+
90
+ Apply <JDI:PRReview:Checklist /> to analyse each change. Include learnings violations alongside standard checklist findings.
91
+
92
+ ### Step 7: Categorise Findings (Internal)
93
+
94
+ Categorise using <JDI:PRReview:SeverityGuide />. Build internal list with: file path, line number, severity, title, explanation, suggested fix. Do NOT output detailed findings yet.
95
+
96
+ ### Step 8: Review Checkpoint
97
+
98
+ Output finding counts by severity, total line comments, and review state (APPROVE | REQUEST_CHANGES).
99
+
100
+ If `post="false"`: note output will go to `.jdi/reviews/PR-[number]-review.md`.
101
+
102
+ **CHECKPOINT** — Wait for user: "continue" | "list" | "cancel"
103
+
104
+ ### Step 8a: After "continue":
105
+ - `post="true"` (default): Continue to Step 9
106
+ - `post="false"`: Execute the LocalOutput section below, skip to Step 11
107
+
108
+ ### Steps 9-10: Build & Submit Review (post=true only)
109
+
110
+ Use <JDI:PRReview:PostComments /> to build and submit the atomic review.
111
+
112
+ ### Step 11: Cleanup (MANDATORY)
113
+
114
+ ```bash
115
+ git checkout master && git branch --show-current
116
+ ```
117
+
118
+ Verify on `master`. Output: PR number, title, state, line comment count, URL, confirmed branch. If not on master, retry.
119
+
120
+ ---
121
+
122
+ <section name="Checklist">
123
+
124
+ ## Review Checklist
125
+
126
+ Apply during Step 6.
127
+
128
+ | Category | Checks |
129
+ |----------|--------|
130
+ | **Correctness** | Logic sound, edge cases handled, error handling, type safety, null/undefined, async |
131
+ | **Security** | No hardcoded secrets, input validated, injection prevented, XSS prevented, auth checks, no sensitive data logged |
132
+ | **Performance** | No N+1 queries, large datasets efficient, no unnecessary re-renders, caching considered, no memory leaks |
133
+ | **Architecture** | Follows patterns, separation of concerns, no circular deps, consistent APIs, appropriate scope |
134
+ | **Style** | Clear naming, readable, no dead code, comments explain "why", consistent formatting |
135
+ | **Testing** | New functionality tested, edge cases tested, meaningful tests, no flaky tests |
136
+ | **Type Safety** | Types defined, no unnecessary `any`, null/undefined typed, generics appropriate |
137
+
138
+ </section>
139
+
140
+ ---
141
+
142
+ <section name="SeverityGuide">
143
+
144
+ ## Severity Classification
145
+
146
+ Use during Step 7.
147
+
148
+ | Emoji | Severity | Description | Action |
149
+ |-------|----------|-------------|--------|
150
+ | blocker | **Blocker** | Bugs, security issues, data loss risk | Must fix before merge |
151
+ | major | **Major** | Significant issues, performance problems | Should fix before merge |
152
+ | minor | **Minor** | Code quality, maintainability | Should fix, not blocking |
153
+ | suggestion | **Suggestion** | Optional improvements | Consider for future |
154
+ | question | **Question** | Clarification needed | Needs response |
155
+ | praise | **Praise** | Good patterns worth highlighting | Positive feedback |
156
+
157
+ ### Event Logic
158
+
159
+ - Any blockers, major, or minor findings: `REQUEST_CHANGES`
160
+ - Suggestions only or no issues: `APPROVE`
161
+
162
+ </section>
163
+
164
+ ---
165
+
166
+ <section name="PostComments">
167
+
168
+ ## Post Comments to GitHub
169
+
170
+ Use during Steps 9-10.
171
+
172
+ > **CRITICAL**: Each finding MUST be a separate object in the `comments` array. The `body` field is ONLY for the summary table. All code-specific feedback goes in `comments` with exact `path` and `line`. Verify `comments` array has one entry per finding (excluding praise, which goes in summary body).
173
+
174
+ ### Get Repository Info
175
+
176
+ ```bash
177
+ gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
178
+ ```
179
+
180
+ ### Comment Object Format
181
+
182
+ ```json
183
+ {
184
+ "path": "[exact_file_path]",
185
+ "line": [line_number],
186
+ "side": "RIGHT",
187
+ "body": "[severity emoji] **[title]**\n\n[explanation]\n\n**Suggested fix:**\n```[language]\n[code]\n```\n\n- AI Ben"
188
+ }
189
+ ```
190
+
191
+ ### Submit Review (SINGLE ATOMIC POST)
192
+
193
+ ```bash
194
+ gh api repos/[owner]/[repo]/pulls/[pr_number]/reviews \
195
+ --input - <<'EOF'
196
+ {
197
+ "commit_id": "[latest_commit_sha]",
198
+ "event": "[APPROVE|REQUEST_CHANGES]",
199
+ "body": "## Review Summary\n\n[assessment]\n\n| Category | Count |\n|----------|-------|\n| Blockers | [N] |\n| Major | [N] |\n| Minor | [N] |\n| Suggestions | [N] |\n\n**[N] line comments below.**\n\n- AI Ben",
200
+ "comments": [ ...comment objects... ]
201
+ }
202
+ EOF
203
+ ```
204
+
205
+ **CHECKPOINT** — Wait for "post" or "cancel" before posting.
206
+
207
+ </section>
208
+
209
+ ---
210
+
211
+ <section name="LocalOutput">
212
+
213
+ ## Local Review Output
214
+
215
+ When `post="false"` or invoked with `<JDI:PRReview post="false" />`:
216
+
217
+ Skip Steps 9-10 (posting to GitHub). Instead, write the full structured review to a file:
218
+
219
+ 1. **Create the directory** if it does not exist: `mkdir -p .jdi/reviews`
220
+ 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.
221
+ 3. **Confirm**: Output the file path, finding counts, and verdict.
222
+
223
+ Then proceed to Step 11 (return to master).
224
+
225
+ </section>
@@ -0,0 +1,159 @@
1
+ # JDI Global Configuration
2
+ # Edit these settings to customise JDI behaviour
3
+
4
+ version: "1.0.0"
5
+
6
+ # ─────────────────────────────────────────────────────────────────────────────
7
+ # Workflow Settings
8
+ # ─────────────────────────────────────────────────────────────────────────────
9
+ workflow:
10
+ # Mode: yolo (autonomous) | interactive (confirm gates) | strict (all confirmations)
11
+ mode: yolo
12
+
13
+ # Depth: shallow | standard | deep (affects task granularity)
14
+ depth: standard
15
+
16
+ # Enable parallel plan execution within waves
17
+ parallelisation: true
18
+
19
+ # Commit planning docs to git
20
+ commit_docs: true
21
+
22
+ # ─────────────────────────────────────────────────────────────────────────────
23
+ # Agent Toggles
24
+ # ─────────────────────────────────────────────────────────────────────────────
25
+ agents:
26
+ # Run research phase before planning
27
+ research: true
28
+
29
+ # Validate plans before execution
30
+ plan_check: true
31
+
32
+ # Verify outcomes after execution
33
+ verifier: true
34
+
35
+ # ─────────────────────────────────────────────────────────────────────────────
36
+ # Model Routing
37
+ # ─────────────────────────────────────────────────────────────────────────────
38
+ models:
39
+ # Active profile: quality | balanced | budget
40
+ profile: balanced
41
+
42
+ # Profile definitions (agent -> model mapping)
43
+ profiles:
44
+ # Maximum reasoning power, use for critical work (~100% token baseline)
45
+ quality:
46
+ planner: opus
47
+ architect: opus
48
+ programmer: opus
49
+ verifier: sonnet
50
+ researcher: sonnet
51
+ phase_researcher: sonnet
52
+ plan_checker: sonnet
53
+ debugger: opus
54
+ quality: sonnet
55
+
56
+ # Smart allocation for typical development (~40% less than quality)
57
+ balanced:
58
+ planner: opus
59
+ architect: opus
60
+ programmer: sonnet
61
+ verifier: sonnet
62
+ researcher: sonnet
63
+ phase_researcher: sonnet
64
+ plan_checker: sonnet
65
+ debugger: sonnet
66
+ quality: sonnet
67
+
68
+ # Minimal opus usage, conserve quota (~60% less than quality)
69
+ budget:
70
+ planner: sonnet
71
+ architect: sonnet
72
+ programmer: sonnet
73
+ verifier: haiku
74
+ researcher: haiku
75
+ phase_researcher: haiku
76
+ plan_checker: haiku
77
+ debugger: sonnet
78
+ quality: haiku
79
+
80
+ # Override specific agents (null = use profile default)
81
+ overrides:
82
+ planner: null
83
+ programmer: null
84
+ verifier: null
85
+ researcher: null
86
+
87
+ # ─────────────────────────────────────────────────────────────────────────────
88
+ # Default Paths and Values
89
+ # ─────────────────────────────────────────────────────────────────────────────
90
+ defaults:
91
+ branch_prefix: "feature/"
92
+ commit_types:
93
+ - feat
94
+ - fix
95
+ - refactor
96
+ - docs
97
+ - test
98
+ - chore
99
+ - perf
100
+ - style
101
+ plan_location: .jdi/plans
102
+ state_location: .jdi
103
+ thoughts_location: .jdi/thoughts
104
+
105
+ # ─────────────────────────────────────────────────────────────────────────────
106
+ # Git Settings
107
+ # ─────────────────────────────────────────────────────────────────────────────
108
+ git:
109
+ # Automatically stage changes before commit
110
+ auto_stage: false
111
+
112
+ # Require clean worktree before operations
113
+ require_clean_worktree: false
114
+
115
+ # Branches that cannot be directly modified
116
+ protected_branches:
117
+ - main
118
+ - master
119
+ - develop
120
+
121
+ # ─────────────────────────────────────────────────────────────────────────────
122
+ # Quality Gates
123
+ # ─────────────────────────────────────────────────────────────────────────────
124
+ quality:
125
+ # Run linter before each commit
126
+ run_lint_before_commit: true
127
+
128
+ # Run tests before creating PR
129
+ run_tests_before_pr: true
130
+
131
+ # Require verification pass before marking complete
132
+ require_verification: true
133
+
134
+ # ─────────────────────────────────────────────────────────────────────────────
135
+ # Context Management
136
+ # ─────────────────────────────────────────────────────────────────────────────
137
+ context:
138
+ # Maximum files to include per task context
139
+ max_files_per_task: 5
140
+
141
+ # Number of tasks before recommending split
142
+ split_threshold_tasks: 3
143
+
144
+ # Context budget thresholds (0.0 - 1.0)
145
+ context_budget_warning: 0.5 # Yellow zone
146
+ context_budget_critical: 0.7 # Red zone
147
+
148
+ # ─────────────────────────────────────────────────────────────────────────────
149
+ # UI Settings
150
+ # ─────────────────────────────────────────────────────────────────────────────
151
+ ui:
152
+ # Show progress banners during execution
153
+ show_progress_banners: true
154
+
155
+ # Enable verbose output
156
+ verbose_mode: false
157
+
158
+ # Use emoji in output (disabled for cleaner logs)
159
+ emoji_enabled: false