@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,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 |
@@ -0,0 +1,336 @@
1
+ ---
2
+ description: Entry Point and Architecture for the JDI framework
3
+ model: opus
4
+ ---
5
+
6
+ # JDI Framework
7
+
8
+ **Entry Point** | Componentised prompts, Context-efficient, agent-delegated development framework.
9
+
10
+ ---
11
+
12
+ ## Core Principles
13
+
14
+ | Principle | Description |
15
+ |-----------|-------------|
16
+ | **Minimal Context** | Commands are ultra-minimal stubs (~300 tokens). Heavy specs stay out of main context. |
17
+ | **Agent Delegation** | Complex operations spawn agents via Task tool. Agents run in isolated context. |
18
+ | **External State** | All state in JSON files. No context pollution from state tracking. |
19
+ | **On-Demand Reading** | Agents read specs, components, hooks, and rules only when needed. |
20
+
21
+ ---
22
+
23
+ ## Critical Constraints
24
+
25
+ > **WARNING: Task Tool `subagent_type` Parameter**
26
+ >
27
+ > The Claude Code Task tool **ONLY accepts `subagent_type="general-purpose"`** as a valid value.
28
+ >
29
+ > **If you use any other value** (e.g., `"jdi-programmer"`, `"jdi-planner"`, or any custom type),
30
+ > the agent will fail with this error:
31
+ >
32
+ > ```
33
+ > classifyHandoffIfNeeded is not defined
34
+ > ```
35
+
36
+ ### Correct Pattern
37
+
38
+ Agent identity is passed via the **prompt parameter**, NOT the `subagent_type` parameter:
39
+
40
+ ```
41
+ Task(
42
+ prompt="You are jdi-programmer. Read .jdi/framework/agents/jdi-programmer.md for instructions. Execute: {task}",
43
+ subagent_type="general-purpose" ← MUST be "general-purpose"
44
+ )
45
+ ```
46
+
47
+ ### Incorrect Pattern (WILL FAIL)
48
+
49
+ ```
50
+ Task(
51
+ prompt="Execute the plan...",
52
+ subagent_type="jdi-programmer" ← WRONG: Causes classifyHandoffIfNeeded error
53
+ )
54
+ ```
55
+
56
+ ### Why This Matters
57
+
58
+ - The Task tool validates `subagent_type` against a fixed list
59
+ - Only `"general-purpose"` is in that list
60
+ - Any other value triggers an internal validation error
61
+ - The cryptic `classifyHandoffIfNeeded is not defined` message masks this validation failure
62
+
63
+ ---
64
+
65
+ ## How It Works
66
+
67
+ ```
68
+ ┌──────────────────────────────────────────────────────┐
69
+ │ MAIN CONTEXT │
70
+ │ │
71
+ │ User: /jdi:create-plan "Add user auth" │
72
+ │ │ │
73
+ │ ▼ │
74
+ │ ┌──────────────────────┐ │
75
+ │ │ Command Stub (~300) │ ← Minimal stub │
76
+ │ └──────────┬───────────┘ │
77
+ │ │ Task tool spawns agent │
78
+ │ ▼ │
79
+ └──────────────────────────────────────────────────────┘
80
+
81
+
82
+ ┌──────────────────────────────────────────────────────┐
83
+ │ AGENT CONTEXT (Isolated, Fresh) │
84
+ │ │
85
+ │ jdi-planner reads spec, researches, creates plan │
86
+ │ → Returns plan_path to main context │
87
+ └──────────────────────────────────────────────────────┘
88
+ ```
89
+
90
+ **create-plan:** Single planner agent (includes research as Step 0).
91
+ **implement-plan:** Complexity-routed — single agent for simple plans, Agent Teams swarm for complex plans.
92
+
93
+ ---
94
+
95
+ ## Available Commands
96
+
97
+ | Command | Type | Description |
98
+ |---------|------|-------------|
99
+ | `/jdi:init` | Direct | Initialise JDI in current project |
100
+ | `/jdi:create-plan` | Agent | Create implementation plan (single planner agent, includes research) |
101
+ | `/jdi:implement-plan` | Agent | Execute plan (single agent for simple, Agent Teams for complex) |
102
+ | `/jdi:commit` | Agent | Create conventional commit (spawns jdi-committer) |
103
+ | `/jdi:generate-pr` | Agent | Generate and create PR (spawns jdi-pr-generator) |
104
+ | `/jdi:pr-review` | Agent | Review PR (spawns reviewer) |
105
+ | `/jdi:pr-feedback` | Agent | Address PR review comments (spawns jdi-pr-feedback) |
106
+ | `/jdi:quick` | Direct | Quick focused change (no orchestration) |
107
+ | `/jdi:map-codebase` | Agent | Analyse codebase architecture and conventions (spawns jdi-codebase-mapper) |
108
+ | `/jdi:verify` | Agent | Run verification checks (spawns jdi-verifier) |
109
+
110
+ **Agent commands:** Spawn a Task agent with isolated context (~300 tokens in main)
111
+ **Direct commands:** Execute in main context (kept minimal)
112
+
113
+ ---
114
+
115
+ ## Component System
116
+
117
+ JDI uses **JSX-like component syntax** for referencing reusable markdown:
118
+
119
+ ```markdown
120
+ <JDI:Commit /> # Full component
121
+ <JDI:Commit:Message /> # Specific section
122
+ <JDI:Commit scope="task" /> # With parameters
123
+ ```
124
+
125
+ **How it works:** When agents encounter component references, they:
126
+ 1. Read the component file from `components/`
127
+ 2. Execute the instructions within
128
+ 3. Return to the calling context
129
+
130
+ Components are **loaded on-demand** by agents, not pre-embedded in commands.
131
+
132
+ ---
133
+
134
+ ## Component Resolution Protocol
135
+
136
+ **CRITICAL**: When you encounter a `<JDI:ComponentName />` tag anywhere in a spec,
137
+ command, hook, or workflow, you MUST:
138
+
139
+ 1. **Parse** the tag to extract the component name, optional section, and parameters.
140
+ - `<JDI:Commit />` -> Component: Commit, Section: (none), Params: (none)
141
+ - `<JDI:StateUpdate:Progress />` -> Component: StateUpdate, Section: Progress, Params: (none)
142
+ - `<JDI:Commit scope="task" />` -> Component: Commit, Section: (none), Params: scope=task
143
+
144
+ 2. **Locate** the component file by searching these directories in order:
145
+ - `.jdi/framework/components/execution/{ComponentName}.md`
146
+ - `.jdi/framework/components/planning/{ComponentName}.md`
147
+ - `.jdi/framework/components/quality/{ComponentName}.md`
148
+ - `.jdi/framework/components/meta/{ComponentName}.md`
149
+
150
+ 3. **Read** the component file using the Read tool.
151
+
152
+ 4. **Execute** the instructions found in the component (or the specified section).
153
+ Apply any parameters from the tag as contextual constraints.
154
+
155
+ 5. **Return** to the calling context and continue execution.
156
+
157
+ Component tags are NOT decorative markers. They are lazy-loaded instructions
158
+ that MUST be resolved and executed at the point where they appear.
159
+
160
+ ---
161
+
162
+ ## State Management
163
+
164
+ ### JSON State Files
165
+
166
+ | File | Purpose | Updates |
167
+ |------|---------|---------|
168
+ | `config/jdi-config.yaml` | Global settings | Manual |
169
+ | `config/state.yaml` | Runtime state (phase, plan, task) | Automatic |
170
+ | `config/variables.yaml` | Shareable variables | Automatic |
171
+
172
+ ### Project State Files
173
+
174
+ When initialised in a project (`.jdi/`):
175
+
176
+ | File | Purpose |
177
+ |------|---------|
178
+ | `PROJECT.yaml` | Project vision and constraints |
179
+ | `REQUIREMENTS.yaml` | Scoped requirements with REQ-IDs |
180
+ | `ROADMAP.yaml` | Phase structure |
181
+ | `state.yaml` | Runtime state (position, session, decisions, blockers) |
182
+
183
+ ---
184
+
185
+ ## Context Budget
186
+
187
+ | Scenario | Old Pattern | New Pattern | Savings |
188
+ |----------|-------------|-------------|---------|
189
+ | Single command | ~6,900 tokens | ~300 tokens | 95% |
190
+ | 5-command workflow | ~34,500 tokens | ~1,500 tokens | 96% |
191
+
192
+ **Target:** Keep main context usage minimal. Let agents do heavy work in isolated context.
193
+
194
+ ### Warning Thresholds
195
+
196
+ | Usage | Status | Action |
197
+ |-------|--------|--------|
198
+ | <50% | Green | Normal operation |
199
+ | 50-70% | Yellow | Reduce verbosity |
200
+ | 70-85% | Orange | Essential only |
201
+ | >85% | Red | Complete task and pause |
202
+
203
+ ### No Direct Fallback Rule
204
+
205
+ Agent commands MUST use agent delegation. If agent spawning fails: report error, set state to "blocked", ask user for guidance. NEVER fall back to direct implementation.
206
+
207
+ ---
208
+
209
+ ## Model Profiles
210
+
211
+ Three profiles control which model each agent uses. Set in `.jdi/config/jdi-config.yaml` under `models.profile`.
212
+
213
+ | Profile | When to Use | Opus Agents | Token Impact |
214
+ |---------|-------------|-------------|--------------|
215
+ | **quality** | Critical/complex work | planner, architect, programmer, debugger | Highest — full Opus power |
216
+ | **balanced** | Typical development (default) | planner, architect | ~40% less than quality |
217
+ | **budget** | Conserve quota | None | ~60% less than quality |
218
+
219
+ **Budget mode** routes verifier, researcher, phase_researcher, plan_checker, and quality to Haiku — these are agents where thoroughness matters less than speed. Switch mid-session by editing `models.profile` in `.jdi/config/jdi-config.yaml`.
220
+
221
+ ---
222
+
223
+ ## Quick Start
224
+
225
+ ### New Feature
226
+
227
+ ```
228
+ 1. /jdi:create-plan "Add user authentication"
229
+ → Spawns single planner agent (researches + plans)
230
+ → Creates .jdi/plans/01-01-PLAN.md
231
+
232
+ 2. /jdi:implement-plan
233
+ → Routes by complexity (single agent or Agent Teams swarm)
234
+ → Commits per task
235
+
236
+ 3. /jdi:generate-pr
237
+ → Creates PR with structured description
238
+ ```
239
+
240
+ ### Quick Commit
241
+
242
+ ```
243
+ 1. [Make changes]
244
+
245
+ 2. /jdi:commit
246
+ → Stages files individually
247
+ → Creates conventional commit
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Bootstrap
253
+
254
+ To add JDI commands to a project:
255
+
256
+ ```
257
+ /jdi:init
258
+ ```
259
+
260
+ This creates:
261
+ - `.claude/commands/jdi/` — Command stubs
262
+ - `.jdi/` — Project state directory
263
+
264
+ ---
265
+
266
+ ## Core Rules
267
+
268
+ 1. **Commands are stubs** — Just spawn instructions, not full specs
269
+ 2. **Agents read on-demand** — Load what they need in their context
270
+ 3. **State is external** — YAML files, not context pollution
271
+ 4. **Components are modular** — Reusable across agents
272
+ 5. **Atomic commits** — One commit per task, staged individually
273
+
274
+ ---
275
+
276
+ ## Prompt Cache Strategy
277
+
278
+ Agent spawn prompts MUST follow this load order to maximise Anthropic API prompt cache hits:
279
+
280
+ ```
281
+ 1. AgentBase (core) ← ALWAYS first (static, cacheable prefix ~180 tokens)
282
+ 2. AgentBase sections ← Sandbox/TeamMode if needed (still static)
283
+ 3. Agent spec ← Agent-specific instructions (semi-static)
284
+ 4. Task context ← Plan path, working directory, task details (dynamic)
285
+ ```
286
+
287
+ **Why**: The API caches prompt prefixes. By loading AgentBase as the first ~180 tokens of every agent prompt, all agents after the first get that prefix cached. Subsequent agents in the same session benefit from reduced input billing.
288
+
289
+ **Batch component loading**: If an agent's spec has `requires_components` in its frontmatter, read ALL listed components before starting execution. This batches file reads into a single turn rather than discovering components mid-execution (saves ~50-100 tokens of tool overhead per component).
290
+
291
+ ---
292
+
293
+ ## Context Longevity
294
+
295
+ ### When to Start a Fresh Conversation
296
+
297
+ | Signal | Action |
298
+ |--------|--------|
299
+ | 3+ agent spawns in one conversation | Consider fresh conversation |
300
+ | 50+ turns in conversation | Start fresh — history compounds costs |
301
+ | After `/jdi:implement-plan` completes | Fresh conversation for PR/commit (state persisted to YAML) |
302
+ | Context budget at Orange/Red | Complete current task, then fresh conversation |
303
+
304
+ **Why**: Each turn re-sends the full conversation history. Later turns cost progressively more tokens. Since JDI persists all state to YAML files, a fresh conversation loses nothing.
305
+
306
+ ---
307
+
308
+ ## Token Budget Reference
309
+
310
+ ### Per-Artefact Estimates
311
+
312
+ | Artefact | Tokens |
313
+ |----------|--------|
314
+ | AgentBase (core) | ~180 |
315
+ | AgentBase (core + sandbox) | ~320 |
316
+ | Average agent spec | ~180 |
317
+ | Component section | ~100-200 |
318
+ | Full component | ~400-600 |
319
+ | Template section | ~50-100 |
320
+ | State read | ~200 |
321
+
322
+ ### Per-Workflow Estimates
323
+
324
+ | Workflow | Main Context | Agent Context |
325
+ |----------|-------------|---------------|
326
+ | `/jdi:quick` | ~200 tokens | — (direct) |
327
+ | `/jdi:commit` | ~500 tokens | ~400 (haiku) |
328
+ | `/jdi:create-plan` | ~800 tokens | ~2,000 |
329
+ | `/jdi:implement-plan` (simple) | ~800 tokens | ~3,000 |
330
+ | `/jdi:implement-plan` (teams) | ~800 tokens | ~2,000 × N |
331
+
332
+ **If approaching limits**: Switch to `budget` model profile and use section-specific component loading (`<JDI:Component:Section />`).
333
+
334
+ ---
335
+
336
+ *JDI aka Jedi - Context-efficient development through agent delegation.*
@@ -0,0 +1,3 @@
1
+ # Backend Rules
2
+
3
+ <!-- Learnings from PR reviews will be captured here automatically -->
@@ -0,0 +1,3 @@
1
+ # DevOps Learnings
2
+
3
+ <!-- Rules extracted from PR reviews about infrastructure, CI/CD, Docker, and deployment patterns -->
@@ -0,0 +1,3 @@
1
+ # Frontend Rules
2
+
3
+ <!-- Learnings from PR reviews will be captured here automatically -->
@@ -0,0 +1,3 @@
1
+ # General Learnings
2
+
3
+ <!-- Rules extracted from PR reviews about cross-cutting concerns, process, and conventions -->
@@ -0,0 +1,3 @@
1
+ # Testing Learnings
2
+
3
+ <!-- Rules extracted from PR reviews about testing patterns, quality standards, and test conventions -->
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: commit-rules
3
+ description: Standards for creating commits within JDI workflow
4
+ ---
5
+
6
+ # Commit Rules
7
+
8
+ For full commit instructions, see `<JDI:Commit />` component at `.jdi/framework/components/execution/Commit.md`.
9
+
10
+ ---
11
+
12
+ ## Quick Reference
13
+
14
+ **Format:** `{type}({scope}): {description}` — imperative mood, no period, max 72 chars.
15
+
16
+ **Types:** `feat` | `fix` | `refactor` | `docs` | `test` | `chore` | `perf` | `style`
17
+
18
+ **Scope:** Plan tasks use `{phase}-{plan}-T{n}`. Standalone commits use feature area (e.g., `auth`, `api`).
19
+
20
+ **Staging:** Always stage files individually. NEVER use `git add .`, `git add -A`, or glob patterns.
21
+
22
+ **Atomic:** One task = one commit. Each commit must represent a shippable state.
23
+
24
+ **Pre-commit:** Verify staged files (`git diff --cached --name-only`), run quality checks before committing.