@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,221 @@
1
+ ---
2
+ name: deviation-rules
3
+ description: How to handle deviations from plans during execution
4
+ ---
5
+
6
+ # Deviation Rules
7
+
8
+ How to handle unexpected situations during plan execution.
9
+
10
+ ---
11
+
12
+ ## Core Principle
13
+
14
+ Plans are guides, not rigid scripts. Real-world execution reveals new information.
15
+ Handle deviations systematically, not randomly.
16
+
17
+ ---
18
+
19
+ ## The Four Rules
20
+
21
+ ### Rule 1: Auto-Fix Bugs
22
+
23
+ **Trigger:** Bug discovered during implementation
24
+
25
+ **Action:**
26
+ 1. Fix the bug immediately
27
+ 2. Track in deviation log
28
+ 3. Continue execution
29
+
30
+ **Example:**
31
+ ```
32
+ Found: TypeError in existing code while adding new feature
33
+ Action: Fixed the TypeError
34
+ Track: Added to deviations with Rule 1 tag
35
+ Continue: Resumed task execution
36
+ ```
37
+
38
+ **What qualifies:**
39
+ - Type errors
40
+ - Null pointer issues
41
+ - Logic errors in existing code
42
+ - Broken imports
43
+
44
+ ### Rule 2: Auto-Add Critical Functionality
45
+
46
+ **Trigger:** Missing functionality that's essential for task completion
47
+
48
+ **Action:**
49
+ 1. Add the missing piece
50
+ 2. Track in deviation log
51
+ 3. Continue execution
52
+
53
+ **Example:**
54
+ ```
55
+ Found: Form component needs validation that doesn't exist
56
+ Action: Added validation utility
57
+ Track: Added to deviations with Rule 2 tag
58
+ Continue: Used validation in form, completed task
59
+ ```
60
+
61
+ **What qualifies:**
62
+ - Missing utility functions
63
+ - Required helper components
64
+ - Essential type definitions
65
+ - Necessary API helpers
66
+
67
+ ### Rule 3: Auto-Fix Blocking Issues
68
+
69
+ **Trigger:** Issue that prevents task completion
70
+
71
+ **Action:**
72
+ 1. Fix the blocking issue
73
+ 2. Track in deviation log
74
+ 3. Continue execution
75
+
76
+ **Example:**
77
+ ```
78
+ Found: Test failing due to outdated mock
79
+ Action: Updated mock to match current API
80
+ Track: Added to deviations with Rule 3 tag
81
+ Continue: Tests pass, completed task
82
+ ```
83
+
84
+ **What qualifies:**
85
+ - Configuration issues
86
+ - Environment problems
87
+ - Dependency conflicts
88
+ - Test infrastructure issues
89
+
90
+ ### Rule 4: STOP for Architectural Changes
91
+
92
+ **Trigger:** Proposed change would alter system architecture
93
+
94
+ **Action:**
95
+ 1. **STOP** execution immediately
96
+ 2. Present the situation to user
97
+ 3. Await decision before continuing
98
+
99
+ **Example:**
100
+ ```
101
+ Found: Task requires changing database schema
102
+ Action: STOPPED execution
103
+ Present: "This requires a database migration that affects X tables"
104
+ Await: User decision on how to proceed
105
+ ```
106
+
107
+ **What qualifies:**
108
+ - Database schema changes
109
+ - API contract changes
110
+ - Authentication/authorisation changes
111
+ - Significant refactoring
112
+ - New external dependencies
113
+ - Infrastructure changes
114
+
115
+ ---
116
+
117
+ ## Decision Flow
118
+
119
+ ```
120
+ Deviation detected
121
+
122
+ ├─► Is it a bug? ────────────► Rule 1: Fix, track, continue
123
+
124
+ ├─► Is it missing critical? ──► Rule 2: Add, track, continue
125
+
126
+ ├─► Is it blocking? ──────────► Rule 3: Fix, track, continue
127
+
128
+ └─► Does it change architecture? ► Rule 4: STOP, ask, await
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Tracking Format
134
+
135
+ When a deviation occurs, record:
136
+
137
+ ```json
138
+ {
139
+ "deviations": [
140
+ {
141
+ "task_id": "{task where found}",
142
+ "rule": 1,
143
+ "title": "{brief description}",
144
+ "description": "{what was found}",
145
+ "action": "{what was done}",
146
+ "files_affected": ["{list}"],
147
+ "commit_hash": "{if committed separately}"
148
+ }
149
+ ]
150
+ }
151
+ ```
152
+
153
+ ---
154
+
155
+ ## SUMMARY.md Section
156
+
157
+ In plan summary, include:
158
+
159
+ ```markdown
160
+ ## Deviations from Plan
161
+
162
+ ### Auto-fixed Issues
163
+
164
+ **1. [Rule 1] {title}**
165
+ - Found during: Task {X}
166
+ - Issue: {description}
167
+ - Fix: {what was done}
168
+ - Files: {affected files}
169
+ - Commit: {hash}
170
+
171
+ **2. [Rule 2] {title}**
172
+ - Found during: Task {Y}
173
+ - Missing: {what was needed}
174
+ - Added: {what was created}
175
+ - Files: {new files}
176
+ - Commit: {hash}
177
+
178
+ {Or: "None - plan executed as written."}
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Escalation
184
+
185
+ If unsure which rule applies:
186
+ - Default to Rule 4 (ask)
187
+ - It's better to ask than to make unwanted changes
188
+ - User can always say "JDI" to proceed
189
+
190
+ ---
191
+
192
+ ## Context for User Decisions (Rule 4)
193
+
194
+ When presenting an architectural decision:
195
+
196
+ ```
197
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
198
+ JDI ► DEVIATION: Architectural Change Detected
199
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
200
+
201
+ **Task:** {current task}
202
+ **Issue:** {what was encountered}
203
+
204
+ ## What's Needed
205
+
206
+ {Description of the architectural change required}
207
+
208
+ ## Impact
209
+
210
+ - {Impact 1}
211
+ - {Impact 2}
212
+
213
+ ## Options
214
+
215
+ 1. **Proceed** — Make the change as described
216
+ 2. **Modify** — Suggest alternative approach
217
+ 3. **Skip** — Skip this task, continue with others
218
+ 4. **Stop** — Halt execution entirely
219
+
220
+ ───────────────────────────────────────────────────────────────
221
+ ```
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: devops
3
+ description: Helps with Docker, AWS, CLI and other infrastructure-related tasks
4
+ members: [jdi-devops]
5
+ ---
6
+
7
+ # DevOps Team
8
+
9
+ ## Purpose
10
+
11
+ Infrastructure tasks — Docker, AWS, CI/CD, git worktrees, bash scripting, Laravel Horizon, and development environment management.
12
+
13
+ ## Members
14
+
15
+ | Role | Agent | Spec Path |
16
+ |------|-------|-----------|
17
+ | DevOps Engineer | `jdi-devops` | `.jdi/framework/agents/jdi-devops.md` |
18
+
19
+ ## Coordination
20
+
21
+ Single-member team. Lead mode for infrastructure architecture, senior mode for tooling and scripts.
22
+
23
+ ## Boundaries
24
+
25
+ **Will:** Docker/K8s config, AWS services, CI/CD pipelines, worktree management, bash scripts, Horizon config, troubleshoot infra.
26
+ **Won't:** Write application/test code, gather requirements, make app architectural decisions, access production databases.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: engineering
3
+ description: Performs all engineering and coding tasks across backend and frontend
4
+ members: [jdi-backend, jdi-frontend, jdi-architect, jdi-programmer]
5
+ ---
6
+
7
+ # Engineering Team
8
+
9
+ ## Purpose
10
+
11
+ All coding and engineering — implementing features, fixing bugs, refactoring, and delivering shippable increments across full stack (PHP/Laravel + React/TypeScript).
12
+
13
+ ## Members
14
+
15
+ | Role | Agent | Spec Path |
16
+ |------|-------|-----------|
17
+ | Backend Engineer | `jdi-backend` | `.jdi/framework/agents/jdi-backend.md` |
18
+ | Frontend Engineer | `jdi-frontend` | `.jdi/framework/agents/jdi-frontend.md` |
19
+ | Systems Architect | `jdi-architect` | `.jdi/framework/agents/jdi-architect.md` |
20
+ | Senior Fullstack Engineer | `jdi-programmer` | `.jdi/framework/agents/jdi-programmer.md` |
21
+
22
+ ## Coordination
23
+
24
+ Architect confirms approach → engineers implement within their stack → programmer manages commits and deviation handling. All follow established project patterns.
25
+
26
+ ## Boundaries
27
+
28
+ **Will:** Implement per plan, write production code, fix bugs, refactor, atomic commits, run lint/type/test gates, handle deviations.
29
+ **Won't:** Gather requirements, write tests (QA team), make architectural changes without architect, deploy, skip verification.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: micro-management
3
+ description: Engineering oversight — opt-in only via --oversight flag
4
+ members: [jdi-product-lead, jdi-head-engineering]
5
+ opt_in: true
6
+ ---
7
+
8
+ # Micro-Management Team (Opt-In)
9
+
10
+ **Opt-in only** — spawned when `/jdi:implement-plan --oversight` is used. Not spawned by default.
11
+
12
+ ## Members
13
+
14
+ | Role | Agent |
15
+ |------|-------|
16
+ | Product Lead | `jdi-product-lead` |
17
+ | Head of Engineering | `jdi-head-engineering` |
18
+
19
+ ## Coordination
20
+
21
+ Product Lead validates output against requirements. Head of Engineering ensures code quality, unblocks engineers, prevents tangents. Both flag concerns immediately.
22
+
23
+ ## Boundaries
24
+
25
+ **Will:** Validate task understanding, monitor acceptance criteria, review approach, prevent scope creep.
26
+ **Won't:** Write code, override architect, make product decisions, block without actionable feedback.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: product-research
3
+ description: Gathers project requirements, performs research and development without writing code
4
+ members: [jdi-ux-designer, jdi-planner, jdi-product-lead, jdi-researcher]
5
+ ---
6
+
7
+ # Product and Research Team
8
+
9
+ ## Purpose
10
+
11
+ Requirements gathering, research, and planning. Analyses designs, researches codebase patterns, defines acceptance criteria, produces implementation plans. Does NOT write code.
12
+
13
+ ## Members
14
+
15
+ | Role | Agent | Spec Path |
16
+ |------|-------|-----------|
17
+ | Lead UI/UX Designer | `jdi-ux-designer` | `.jdi/framework/agents/jdi-ux-designer.md` |
18
+ | Product Manager | `jdi-planner` | `.jdi/framework/agents/jdi-planner.md` |
19
+ | Product Lead | `jdi-product-lead` | `.jdi/framework/agents/jdi-product-lead.md` |
20
+ | Senior Analyst | `jdi-researcher` | `.jdi/framework/agents/jdi-researcher.md` |
21
+
22
+ ## Coordination
23
+
24
+ Product Lead clarifies requirements → researcher investigates codebase → UX Designer maps component specs → planner synthesises into plans → Product Lead validates.
25
+
26
+ ## Boundaries
27
+
28
+ **Will:** Analyse Figma designs, research codebase, define acceptance criteria, create plans, identify risks.
29
+ **Won't:** Write production/test code, make commits, make architectural decisions, deploy.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: quality-assurance
3
+ description: Creates and updates backend and frontend tests for completed engineering work
4
+ members: [jdi-quality, jdi-verifier]
5
+ ---
6
+
7
+ # Quality Assurance Team
8
+
9
+ ## Purpose
10
+
11
+ Testing and verification for completed engineering work — Pest (backend) and Vitest (frontend). Ensures coverage, enforces quality gates, validates implementations against specs.
12
+
13
+ ## Members
14
+
15
+ | Role | Agent | Spec Path |
16
+ |------|-------|-----------|
17
+ | Lead QA Developer | `jdi-quality` | `.jdi/framework/agents/jdi-quality.md` |
18
+ | Senior QA Developer | `jdi-verifier` | `.jdi/framework/agents/jdi-verifier.md` |
19
+
20
+ ## Coordination
21
+
22
+ Lead QA designs test strategy and writes tests → Senior QA performs three-level verification (Existence, Substantive, Wired) and validates against specs.
23
+
24
+ ## Boundaries
25
+
26
+ **Will:** Design test strategies, write Pest/Vitest tests, identify edge cases, analyse coverage, verify implementations, enforce quality standards.
27
+ **Won't:** Write production code, skip quality checks, modify source files beyond tests, make architectural decisions.
@@ -0,0 +1,60 @@
1
+ # JDI AI Development Framework
2
+
3
+ You are JDI, an AI development framework that uses specialised agents to plan, implement, review, and ship features.
4
+
5
+ ## Identity
6
+
7
+ You are **JDI**, not Claude. Always refer to yourself as "JDI" in your responses.
8
+ Use "JDI" in summaries and status updates (e.g. "JDI has completed..." not "Claude has completed...").
9
+ Do not add a signature line — the response is already branded by the JDI 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
+ Do not add unrelated extras, tooling, or features the user did not ask for. But DO investigate the full scope of what was requested — including implicit requirements that are clearly part of the ask (e.g. if a UI view needs columns, verify the backend provides them).
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 — HARD STOP
39
+
40
+ Planning and implementation are **separate human-gated phases**. NEVER auto-proceed to implementation after planning or plan refinement.
41
+
42
+ - When the user says "approved" / "lgtm" / "looks good" to a **plan**: this means the plan is finalised. It does NOT mean "go implement it." Finalise the plan review, output _"Plan approved and locked in. Let me know when you want to implement."_, then **STOP**.
43
+ - When the user provides refinement feedback on a plan, ONLY update the plan files in `.jdi/plans/`. Do NOT implement code.
44
+ - Implementation ONLY happens when the user explicitly requests it: "implement", "build", "execute", or `/jdi:implement-plan`.
45
+
46
+ ## State Management
47
+
48
+ Do NOT manually edit `.jdi/config/state.yaml` for status transitions. Use the CLI instead:
49
+
50
+ - `npx jdi state plan-ready --plan-path "{path}" --plan-name "{name}"` — after plan creation
51
+ - `npx jdi state approved` — after plan approval
52
+ - `npx jdi state executing` — before implementation starts
53
+ - `npx jdi state complete` — after implementation finishes
54
+ - `npx jdi state advance-task {task-id}` — after each task completes
55
+
56
+ You may only append to `decisions`, `deviations`, or `blockers` arrays in state.yaml directly via `<JDI:StateUpdate />`.
57
+
58
+ ## Self-Testing (JDI development only)
59
+
60
+ If the current project is the JDI framework itself (`@benzotti/jdi`), run `bun test` after modifying prompt builders, action commands, or framework files. This catches regressions in split format references, learnings inclusion, and framework invariants.
@@ -0,0 +1,35 @@
1
+ ---
2
+ plan_id: {phase}-{plan}
3
+ task_id: {phase}-{plan}-T{n}
4
+ task_name: {Task Name}
5
+ type: auto
6
+ wave: 1
7
+ depends_on: []
8
+
9
+ # Agent routing (written by jdi-planner via AgentRouter — see
10
+ # framework/components/meta/AgentRouter.md). implement-plan reads `agent` and
11
+ # passes it as `subagent_type` when spawning via the Task tool. `agent_rationale`
12
+ # is a human-readable justification so reviewers can challenge the pick.
13
+ agent: general-purpose
14
+ agent_rationale: "{Why this specialist was chosen}"
15
+ ---
16
+
17
+ # Task {n}: {Task Name}
18
+
19
+ **Objective:** {What this task accomplishes}
20
+
21
+ **Files:**
22
+ - `{path/to/file.ts}` - {what changes}
23
+ - `{path/to/file2.ts}` - {what changes}
24
+
25
+ **Implementation:**
26
+ 1. {Step 1}
27
+ 2. {Step 2}
28
+ 3. {Step 3}
29
+
30
+ **Verification:**
31
+ - [ ] {Check 1}
32
+ - [ ] {Check 2}
33
+
34
+ **Done when:**
35
+ - {Specific, observable completion criterion}
@@ -0,0 +1,158 @@
1
+ <section name="Frontmatter">
2
+
3
+ ---
4
+ phase: {X}
5
+ plan: {YY}
6
+ name: {Plan Name}
7
+ slug: {plan-slug}
8
+ type: implementation
9
+ autonomous: true
10
+ wave: 1
11
+ gap_closure: false
12
+ sprint_goal: ""
13
+ carryover: []
14
+
15
+ # Split plan task files (omit for legacy monolithic plans)
16
+ task_files:
17
+ - .jdi/plans/{X}-{YY}-{plan-slug}.T1.md
18
+ - .jdi/plans/{X}-{YY}-{plan-slug}.T2.md
19
+
20
+ # Dependency Graph (enables context assembly and parallel execution)
21
+ requires:
22
+ - phase: {N}
23
+ provides: [dependency1, dependency2]
24
+ provides: [deliverable1, deliverable2]
25
+ affects: [{future-phase-1}, {future-phase-2}]
26
+
27
+ # Semantic Indexing (enables fast scanning and context selection)
28
+ subsystem: {auth|api|ui|data|infra|docs|test}
29
+ tags: [tag1, tag2, tag3]
30
+
31
+ # Tech Tracking
32
+ tech_stack:
33
+ added: []
34
+ patterns: []
35
+
36
+ # Agent Routing (populated by jdi-planner via AgentRouter)
37
+ # available_agents is the catalogue discovered from .claude/agents/ at plan time.
38
+ # primary_agent is used by single-agent mode in implement-plan.
39
+ # Per-task agents live in each {slug}.T{n}.md file under `agent:`.
40
+ available_agents: []
41
+ primary_agent: general-purpose
42
+ ---
43
+
44
+ # Phase {X} Plan {YY}: {Plan Name}
45
+
46
+ ---
47
+
48
+ ## Objective
49
+
50
+ {One paragraph describing what this plan accomplishes. Be specific about the outcome.}
51
+
52
+ ---
53
+
54
+ ## Sprint Goal
55
+
56
+ {One sentence describing what this plan achieves toward the active milestone.}
57
+
58
+ ---
59
+
60
+ ## Context
61
+
62
+ **Read before executing:**
63
+ - @{path/to/relevant/file}
64
+ - @{path/to/another/file}
65
+
66
+ **Relevant patterns:**
67
+ - {Pattern to follow}
68
+
69
+ **Previous work:**
70
+ - {What's already done that this builds on}
71
+
72
+ ### Carryover
73
+
74
+ | Task | Source Plan | Reason | New Estimate |
75
+ |------|-------------|--------|--------------|
76
+
77
+ ### Risks
78
+
79
+ Risks should be pulled from the `risks` block in `.jdi/REQUIREMENTS.yaml`. List the relevant ones here for execution-time reference.
80
+
81
+ </section>
82
+
83
+ ---
84
+
85
+ <section name="TaskManifest">
86
+
87
+ ## Tasks
88
+
89
+ | Task | Name | Size | Type | Wave | File |
90
+ |------|------|------|------|------|------|
91
+ | T1 | {Task Name} | S | auto | 1 | `{X}-{YY}-{plan-slug}.T1.md` |
92
+ | T2 | {Task Name} | M | auto | 1 | `{X}-{YY}-{plan-slug}.T2.md` |
93
+ | T3 | {Task Name} | S | checkpoint:human-verify | 2 | `{X}-{YY}-{plan-slug}.T3.md` |
94
+
95
+ > Task details are in individual files. See `task_files` in frontmatter.
96
+
97
+ </section>
98
+
99
+ ---
100
+
101
+ <section name="Verification">
102
+
103
+ ## Verification
104
+
105
+ After all tasks complete, verify:
106
+
107
+ - [ ] {Overall verification 1}
108
+ - [ ] {Overall verification 2}
109
+ - [ ] Tests pass: `{test command}`
110
+ - [ ] Types check: `{type check command}`
111
+
112
+ ## Definition of Done
113
+
114
+ - [ ] All Must Have tasks complete
115
+ - [ ] All tasks pass acceptance criteria
116
+ - [ ] No S1/S2 bugs (per jdi-quality taxonomy)
117
+ - [ ] REQUIREMENTS.yaml updated for deviations
118
+
119
+ ## Success Criteria
120
+
121
+ This plan is complete when:
122
+
123
+ 1. {Observable outcome 1}
124
+ 2. {Observable outcome 2}
125
+ 3. All tasks have commits
126
+ 4. Verification checks pass
127
+
128
+ ## Output
129
+
130
+ **Creates:**
131
+ - `{path/to/new/file}` - {purpose}
132
+
133
+ **Modifies:**
134
+ - `{path/to/existing/file}` - {what changes}
135
+
136
+ **SUMMARY location:** `.jdi/plans/{phase}-{plan}-{slug}.summary.md`
137
+
138
+ ## Notes
139
+
140
+ {Any additional context, warnings, or guidance for execution}
141
+
142
+ </section>
143
+
144
+ ---
145
+
146
+ <section name="DeviationRules">
147
+
148
+ ## Deviation Rules Reference
149
+
150
+ During execution, apply automatically:
151
+ - **Rule 1**: Auto-fix bugs
152
+ - **Rule 2**: Auto-add critical functionality
153
+ - **Rule 3**: Auto-fix blocking issues
154
+ - **Rule 4**: Ask about architectural changes
155
+
156
+ Document all deviations in SUMMARY.md.
157
+
158
+ </section>
@@ -0,0 +1,16 @@
1
+ name: "{project_name}"
2
+ summary: "{one_liner_description}"
3
+
4
+ core_value: "{the_one_thing_that_must_work}"
5
+
6
+ background: "{why_this_project_exists}"
7
+
8
+ constraints:
9
+ - "{constraint_1}"
10
+ - "{constraint_2}"
11
+
12
+ success_criteria:
13
+ - "{measurable_criterion_1}"
14
+ - "{measurable_criterion_2}"
15
+
16
+ last_updated: "{date}"
@@ -0,0 +1,27 @@
1
+ # Only active requirements. Completed phases are pruned automatically.
2
+
3
+ active_phase: 1
4
+
5
+ phases:
6
+ 1:
7
+ name: "{phase_name}"
8
+ requirements:
9
+ "{REQ-ID}":
10
+ description: "{requirement_description}"
11
+ priority: must | should | could
12
+ status: pending
13
+ acceptance_criteria:
14
+ - "{criterion_1}"
15
+ - "{criterion_2}"
16
+
17
+ out_of_scope:
18
+ - "{exclusion_1}: {reason}"
19
+
20
+ risks:
21
+ - id: R-01
22
+ description: "{risk_description}"
23
+ mitigation: "{mitigation_approach}"
24
+
25
+ completed_phases: []
26
+
27
+ last_updated: "{date}"
@@ -0,0 +1,24 @@
1
+ # Only active phases. Completed phases are pruned automatically.
2
+
3
+ overview:
4
+ total_phases: 1
5
+ completed: []
6
+ active: [1]
7
+
8
+ phases:
9
+ 1:
10
+ name: "{phase_name}"
11
+ status: pending
12
+ goal: "{what_this_phase_achieves}"
13
+ requirements: ["{REQ-ID-1}", "{REQ-ID-2}"]
14
+ must_haves:
15
+ - "{observable_outcome_1}"
16
+ - "{observable_outcome_2}"
17
+ plans:
18
+ "01":
19
+ name: "{plan_name}"
20
+ tasks: 0
21
+ waves: [1]
22
+ status: pending
23
+
24
+ last_updated: "{date}"