jdi-cli 0.1.1 → 0.1.3

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 (50) hide show
  1. package/README.md +6 -0
  2. package/core/agents/jdi-architect.md +19 -0
  3. package/core/agents/jdi-researcher.md +2 -1
  4. package/core/commands/jdi-add-phase.md +171 -0
  5. package/core/commands/jdi-remove-phase.md +228 -0
  6. package/core/skills/clean-architecture/SKILL.md +134 -0
  7. package/core/skills/ddd/SKILL.md +140 -0
  8. package/core/skills/hexagonal/SKILL.md +127 -0
  9. package/core/skills/onion/SKILL.md +133 -0
  10. package/core/skills/the-method/SKILL.md +139 -0
  11. package/core/skills/vertical-slice/SKILL.md +127 -0
  12. package/package.json +1 -1
  13. package/runtimes/antigravity/agents.md +4 -0
  14. package/runtimes/antigravity/skills/clean-architecture/SKILL.md +125 -0
  15. package/runtimes/antigravity/skills/ddd/SKILL.md +131 -0
  16. package/runtimes/antigravity/skills/hexagonal/SKILL.md +118 -0
  17. package/runtimes/antigravity/skills/jdi-add-phase/SKILL.md +171 -0
  18. package/runtimes/antigravity/skills/jdi-architect/SKILL.md +19 -0
  19. package/runtimes/antigravity/skills/jdi-remove-phase/SKILL.md +228 -0
  20. package/runtimes/antigravity/skills/jdi-researcher/SKILL.md +2 -1
  21. package/runtimes/antigravity/skills/onion/SKILL.md +124 -0
  22. package/runtimes/antigravity/skills/the-method/SKILL.md +130 -0
  23. package/runtimes/antigravity/skills/vertical-slice/SKILL.md +118 -0
  24. package/runtimes/claude/CLAUDE.md +4 -0
  25. package/runtimes/claude/agents/jdi-architect.md +19 -0
  26. package/runtimes/claude/agents/jdi-researcher.md +2 -1
  27. package/runtimes/claude/commands/jdi-add-phase.md +171 -0
  28. package/runtimes/claude/commands/jdi-remove-phase.md +228 -0
  29. package/runtimes/claude/skills/clean-architecture/SKILL.md +120 -0
  30. package/runtimes/claude/skills/ddd/SKILL.md +125 -0
  31. package/runtimes/claude/skills/hexagonal/SKILL.md +112 -0
  32. package/runtimes/claude/skills/onion/SKILL.md +119 -0
  33. package/runtimes/claude/skills/the-method/SKILL.md +124 -0
  34. package/runtimes/claude/skills/vertical-slice/SKILL.md +113 -0
  35. package/runtimes/copilot/agents/jdi-architect.agent.md +19 -0
  36. package/runtimes/copilot/agents/jdi-researcher.agent.md +2 -1
  37. package/runtimes/copilot/copilot-instructions.md +4 -0
  38. package/runtimes/copilot/prompts/jdi-add-phase.prompt.md +171 -0
  39. package/runtimes/copilot/prompts/jdi-remove-phase.prompt.md +228 -0
  40. package/runtimes/opencode/AGENTS.md +4 -0
  41. package/runtimes/opencode/agents/jdi-architect.md +19 -0
  42. package/runtimes/opencode/agents/jdi-researcher.md +2 -1
  43. package/runtimes/opencode/commands/jdi-add-phase.md +171 -0
  44. package/runtimes/opencode/commands/jdi-remove-phase.md +228 -0
  45. package/runtimes/opencode/skills/clean-architecture/SKILL.md +120 -0
  46. package/runtimes/opencode/skills/ddd/SKILL.md +125 -0
  47. package/runtimes/opencode/skills/hexagonal/SKILL.md +112 -0
  48. package/runtimes/opencode/skills/onion/SKILL.md +119 -0
  49. package/runtimes/opencode/skills/the-method/SKILL.md +124 -0
  50. package/runtimes/opencode/skills/vertical-slice/SKILL.md +113 -0
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: vertical-slice
3
+ description: Vertical Slice Architecture (Jimmy Bogard). Organize by feature, not by technical layer. Each feature owns its full request-to-response path with minimal sharing. Language-agnostic rigid rules. Mutually exclusive with The Method, DDD, Clean Architecture, Hexagonal, Onion.
4
+ ---
5
+
6
+ # Skill: Vertical Slice Architecture
7
+
8
+ Rigid, inviolable rules from Jimmy Bogard's Vertical Slice Architecture. The system is organized by **feature**, not by technical layer. Each slice owns the full path from external request to external response.
9
+
10
+ Vertical Slice is the ONLY allowed design when PROJECT.md `Code Design: LOCKED: Vertical Slice`. Do not impose Clean Architecture's 4-layer structure, Onion shells, Hexagonal core/ports/adapters, DDD aggregates as primary structure, or The Method's universal hierarchy on top.
11
+
12
+ ## Mandatory structure
13
+
14
+ 1. **Each feature is one slice.** A feature is a single user-facing capability (e.g., `RegisterCustomer`, `CancelOrder`, `RenewSubscription`).
15
+ 2. **A slice owns its full pipeline:** input contract, validator, handler, business logic, persistence access, output contract, and slice-specific tests.
16
+ 3. **Slices live in feature folders / packages.** The primary code organization is `features/{feature-name}/` (or equivalent in the language). Technical-layer folders (`controllers/`, `services/`, `repositories/`, `models/`) as the primary structure are forbidden.
17
+ 4. **Each feature folder is self-contained.** Inside a folder live only the artifacts that serve that feature.
18
+ 5. **No shared "Service" layer, no shared "Repository" layer, no shared "Manager" layer across slices.** Each slice has its own.
19
+
20
+ ## Slice isolation rules (inviolable)
21
+
22
+ 1. **Slices do not call each other directly.** If slice A needs work done by slice B, slice A either duplicates the minimum needed code OR they both publish/subscribe to a shared event bus. Direct invocation of slice B's handler from slice A is forbidden.
23
+ 2. **No shared mutable state across slices.** A slice never mutates state owned by another slice except through the shared persistence boundary, and never through another slice's handler.
24
+ 3. **DRY applies inside a slice, not across slices.** Two slices that look similar today are still allowed to diverge tomorrow. Forced sharing is the enemy.
25
+ 4. **Cross-slice abstractions are introduced only when 3+ slices need the exact same behavior with the exact same shape, and that behavior is stable.** Premature shared abstractions are violations.
26
+
27
+ ## Slice composition (mandatory contents)
28
+
29
+ Each slice MUST contain:
30
+
31
+ 1. **Request / Command / Query contract** — a structure describing the input.
32
+ 2. **Handler** — receives the request, executes the logic, returns the response.
33
+ 3. **Validator** (if input requires validation) — slice-local validation rules.
34
+ 4. **Response contract** — the output shape returned to the caller.
35
+ 5. **Slice-local types** — any DTOs, view models, or projections the slice needs.
36
+ 6. **Slice-local tests** — integration tests that exercise the slice end-to-end.
37
+
38
+ A slice MAY contain:
39
+
40
+ - A slice-specific persistence access path (raw query, ORM query, projection, command-side persistence).
41
+ - A slice-specific external system call.
42
+ - Slice-local pre/post processing.
43
+
44
+ A slice MUST NOT contain:
45
+
46
+ - References to another slice's handler, request, or response types.
47
+ - References to a shared "Service" abstracting multiple slices.
48
+ - A "Manager" coordinating multiple slices.
49
+
50
+ ## Cross-cutting concerns (inviolable)
51
+
52
+ 1. Cross-cutting concerns (logging, authentication, authorization, transactions, validation pipeline, error handling) are applied as **pipeline behaviors / middleware** that wrap the handler, never as shared services injected into the handler.
53
+ 2. Authentication and authorization decisions may use shared types (claims, principals) but are enforced at the pipeline level, not inside the handler.
54
+ 3. Validation runs as a pipeline step before the handler executes. The handler assumes valid input.
55
+ 4. Logging, tracing, metrics: pipeline behaviors. The handler does not invoke logging libraries for cross-cutting purposes.
56
+
57
+ ## Persistence rules
58
+
59
+ 1. **No generic repository spanning slices.** A slice that needs persistence either uses the ORM/database client directly within the slice OR has its own slice-local repository.
60
+ 2. **Reads and writes may diverge structurally.** A slice that reads may use a different model than a slice that writes; this is encouraged.
61
+ 3. **No "Domain Model" required to be shared across slices.** Each slice models the data it needs in the shape it needs.
62
+ 4. **A shared schema (database) is acceptable; a shared in-code model abstraction is not.**
63
+
64
+ ## Forbidden patterns (inviolable)
65
+
66
+ - **Technical-layer primary folders** (`controllers/`, `services/`, `repositories/`, `models/`) used as the system's primary organization.
67
+ - **A handler calling another handler.**
68
+ - **A "Service" class injected into multiple handlers** to provide their business logic.
69
+ - **A "Manager" class coordinating multiple slices.**
70
+ - **A shared "Repository" abstraction** consumed by 5+ slices.
71
+ - **Cross-slice imports of internal slice types.** Slice A importing `B.HandleQuery` or `B.RequestDto` is forbidden.
72
+ - **Slice A invoking slice B via an internal interface** instead of via the public boundary (HTTP, queue, event).
73
+ - **DRY refactoring that merges 2 slices into 1 because they share 80% of the code.** Slices stay separate until 3+ identical use cases exist with stable shape.
74
+ - **Forcing all slices through a shared base handler class** that contains business logic.
75
+ - **A shared "Domain Model" referenced by all slices** as the primary modeling element.
76
+
77
+ ## Naming conventions
78
+
79
+ - Feature folders: feature name in domain language (`RegisterCustomer/`, `CancelOrder/`, `ViewCustomerDashboard/`).
80
+ - Request types: domain operation name (`RegisterCustomerCommand`, `CancelOrderCommand`, `ViewCustomerDashboardQuery`).
81
+ - Handler types: paired with request (`RegisterCustomerHandler`).
82
+ - Validator types: paired with request (`RegisterCustomerValidator`).
83
+ - Response types: domain output name (`RegisterCustomerResponse`).
84
+ - Internal slice types: prefixed by feature name when shared inside the slice (`RegisterCustomerEmailTemplate`).
85
+
86
+ ## Reviewer enforcement (gate 5)
87
+
88
+ Reviewer rejects (BLOCKED) when:
89
+ - The codebase is primarily organized by technical layer instead of by feature.
90
+ - A handler invokes another slice's handler, request, or response type.
91
+ - A new "Service" / "Manager" / "Coordinator" class is introduced that spans multiple slices and carries business logic.
92
+ - A shared generic repository is introduced and consumed by multiple slices.
93
+ - Cross-cutting concerns are injected into handlers as shared services instead of applied as pipeline behaviors.
94
+ - Slice A imports types from slice B's internal folder.
95
+
96
+ Reviewer warns (APPROVED_WITH_WARNINGS) when:
97
+ - Two slices share an identical small helper that has been duplicated 3+ times (candidate for extraction, not required).
98
+ - A slice contains logic that appears to belong to a different slice.
99
+ - A slice handler is long enough to suggest splitting into pipeline behaviors.
100
+ - A slice references a "Domain Service" or "Aggregate" terminology that may indicate a different design creeping in.
101
+
102
+ ## Anti-patterns
103
+
104
+ - "Vertical slices" implemented inside an MVC controllers/services/repositories folder structure (the folders betray the layer-primary structure)
105
+ - A "Domain" project that all slices reference, containing entities + services + repositories — that is layered or Onion in disguise
106
+ - Cross-slice "Coordinator" classes that orchestrate two handlers
107
+ - A shared "BaseHandler" that contains transaction management AND business logic
108
+ - A slice handler that delegates 90% of its work to a shared service (the slice is hollow)
109
+ - Premature "DRY" extraction that merges slices into a generic handler with strategy patterns
110
+
111
+ ## Outputs
112
+
113
+ Does NOT produce own files. Modifies parent agent's structural decisions during code authoring and review.