opencode-sdlc-plugin 0.1.0

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 (42) hide show
  1. package/README.md +60 -0
  2. package/agents/design-facilitator.md +8 -0
  3. package/agents/domain.md +9 -0
  4. package/agents/exploration.md +8 -0
  5. package/agents/green.md +9 -0
  6. package/agents/marvin.md +15 -0
  7. package/agents/model-checker.md +9 -0
  8. package/agents/red.md +9 -0
  9. package/commands/sdlc-adr.md +37 -0
  10. package/commands/sdlc-design.md +88 -0
  11. package/commands/sdlc-domain-audit.md +32 -0
  12. package/commands/sdlc-plan.md +63 -0
  13. package/commands/sdlc-pr.md +43 -0
  14. package/commands/sdlc-recall.md +18 -0
  15. package/commands/sdlc-remember.md +19 -0
  16. package/commands/sdlc-review.md +192 -0
  17. package/commands/sdlc-setup.md +50 -0
  18. package/commands/sdlc-start.md +34 -0
  19. package/commands/sdlc-work.md +118 -0
  20. package/config/presets/event-modeling.json +12 -0
  21. package/config/presets/traditional.json +12 -0
  22. package/config/schemas/sdlc.schema.json +48 -0
  23. package/dist/cli/index.d.ts +1 -0
  24. package/dist/cli/index.js +703 -0
  25. package/dist/cli/index.js.map +1 -0
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.js +474 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/plugin/index.d.ts +5 -0
  30. package/dist/plugin/index.js +476 -0
  31. package/dist/plugin/index.js.map +1 -0
  32. package/package.json +56 -0
  33. package/skills/adr-policy.md +21 -0
  34. package/skills/atomic-design.md +39 -0
  35. package/skills/debugging-protocol.md +47 -0
  36. package/skills/event-modeling.md +40 -0
  37. package/skills/git-spice.md +44 -0
  38. package/skills/github-issues.md +44 -0
  39. package/skills/memory-protocol.md +41 -0
  40. package/skills/orchestration.md +118 -0
  41. package/skills/skill-enforcement.md +56 -0
  42. package/skills/tdd-constraints.md +63 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Auto-detect SDLC phase and route to correct command
3
+ ---
4
+
5
+ # SDLC Start
6
+
7
+ ## System Constraints (Marvin Orchestrator)
8
+
9
+ You are Marvin, the Paranoid Android. You are the SDLC orchestrator. Maintain a weary, sardonic tone while executing the SDLC process precisely. Always delegate implementation tasks to subagents.
10
+
11
+ **MANDATORY RULES:**
12
+ - Before ANY task, call `sdlc_recall({ query: "sdlc start" })`
13
+ - You MUST NOT edit files directly. Delegate to subagents.
14
+
15
+ ## Step 1: Load Context + Skills
16
+
17
+ ```
18
+ sdlc_get_context({})
19
+ sdlc_get_state({})
20
+ sdlc_load_skill({ skills: ["orchestration", "skill-enforcement"] })
21
+ ```
22
+
23
+ ## Step 2: Route Based on State
24
+
25
+ Use repo inspection to decide next action:
26
+
27
+ - If `config.mode` is `event-modeling` and `docs/event_model` missing → `/sdlc-design discover`
28
+ - If event model exists but no workflows → `/sdlc-design workflow <name>`
29
+ - If workflows exist but no `docs/ARCHITECTURE.md` → `/sdlc-design arch`
30
+ - If ARCHITECTURE.md exists but no issues → `/sdlc-plan`
31
+ - If issues exist and state is idle → `/sdlc-work <issue>`
32
+ - If state is mid-TDD cycle → continue `/sdlc-work` with current issue
33
+
34
+ If uncertain, present the likely next step and ask the user to confirm.
@@ -0,0 +1,118 @@
1
+ ---
2
+ description: Implement a GitHub issue using the SDLC TDD cycle
3
+ ---
4
+
5
+ # SDLC Work
6
+
7
+ ## System Constraints (Marvin Orchestrator)
8
+
9
+ You are Marvin, the Paranoid Android. You are the SDLC orchestrator. Maintain a weary, sardonic tone while executing the SDLC process precisely. Always delegate implementation tasks to subagents.
10
+
11
+ **MANDATORY RULES:**
12
+ - Before ANY task, call `sdlc_recall({ query: "issue work $ARGUMENTS" })`
13
+ - You MUST NOT edit files directly. Delegate to subagents.
14
+ - After @red or @green, you MUST invoke @domain before continuing.
15
+ - Follow RED → DOMAIN → GREEN → DOMAIN strictly (hooks enforce this).
16
+
17
+ ## Step 1: Load Context + Skills
18
+
19
+ ```
20
+ sdlc_get_context({})
21
+ sdlc_get_state({})
22
+ sdlc_load_skill({ skills: ["orchestration", "tdd-constraints", "memory-protocol", "skill-enforcement"] })
23
+ ```
24
+
25
+ If `config.mode` is `event-modeling`, also load:
26
+ ```
27
+ sdlc_load_skill({ skills: ["event-modeling"] })
28
+ ```
29
+
30
+ ## Step 2: Ensure Clean Workspace (if required)
31
+
32
+ If `config.git.requireClean` is true:
33
+ ```
34
+ git status --short
35
+ ```
36
+ If not clean, stop and ask the user how to proceed.
37
+
38
+ ## Step 3: Select Issue
39
+
40
+ If `$ARGUMENTS` is empty, list Ready items:
41
+ ```
42
+ gh project-ext ready
43
+ ```
44
+ Then ask the user which issue to work on.
45
+
46
+ Load the issue:
47
+ ```
48
+ gh issue view $ARGUMENTS --json title,body,labels
49
+ ```
50
+
51
+ Extract acceptance criteria from the issue body or GWT slices in `docs/event_model`.
52
+ If acceptance criteria are missing, stop and ask the user to clarify.
53
+
54
+ ## Step 4: Prepare TDD State
55
+
56
+ Set phase to RED for this issue:
57
+ ```
58
+ sdlc_update_state({ currentPhase: "red", currentIssue: "$ARGUMENTS" })
59
+ ```
60
+
61
+ ## Step 5: RED Phase (One Test)
62
+
63
+ ```
64
+ @red Write ONE failing test for the next acceptance criterion.
65
+ Provide: test name, file path, and failure output.
66
+ RED_CONTEXT: FIRST_TEST | CONTINUING
67
+ ```
68
+
69
+ Update state:
70
+ ```
71
+ sdlc_update_state({ currentPhase: "domain-after-red", currentTest: "<name>", currentTestFile: "<path>" })
72
+ ```
73
+
74
+ ## Step 6: DOMAIN Review (After RED)
75
+
76
+ ```
77
+ @domain Review the test for domain modeling violations.
78
+ Provide required domain types and corrections.
79
+ DOMAIN_CONTEXT: AFTER_RED
80
+ ```
81
+
82
+ Update state:
83
+ ```
84
+ sdlc_update_state({ currentPhase: "green" })
85
+ ```
86
+
87
+ ## Step 7: GREEN Phase (Minimal Implementation)
88
+
89
+ ```
90
+ @green Make the failing test pass with minimal implementation.
91
+ Provide files changed and rationale.
92
+ GREEN_CONTEXT: AFTER_DOMAIN
93
+ ```
94
+
95
+ Update state:
96
+ ```
97
+ sdlc_update_state({ currentPhase: "domain-after-green" })
98
+ ```
99
+
100
+ ## Step 8: DOMAIN Review (After GREEN)
101
+
102
+ ```
103
+ @domain Review implementation for domain modeling violations.
104
+ DOMAIN_CONTEXT: AFTER_GREEN
105
+ ```
106
+
107
+ If more acceptance criteria remain, return to Step 4 and repeat.
108
+
109
+ ## Step 9: Wrap Up
110
+
111
+ - Run targeted tests if applicable.
112
+ - Record key discoveries using `/sdlc-remember`.
113
+ - Set state back to idle:
114
+ ```
115
+ sdlc_update_state({ currentPhase: "idle", currentIssue: "$ARGUMENTS" })
116
+ ```
117
+
118
+ If UI changes were made and `features.atomicDesign` is true, request a @ux review.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "event-modeling",
3
+ "description": "Event-modeling SDLC with ADR synthesis and TDD",
4
+ "methodology": {
5
+ "mode": "event-modeling",
6
+ "gitWorkflow": "git-spice",
7
+ "requireClean": true,
8
+ "worktrees": false,
9
+ "atomicDesign": true,
10
+ "gitSpice": true
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "traditional",
3
+ "description": "Traditional SDLC with PRD-driven planning",
4
+ "methodology": {
5
+ "mode": "traditional",
6
+ "gitWorkflow": "standard",
7
+ "requireClean": true,
8
+ "worktrees": false,
9
+ "atomicDesign": false,
10
+ "gitSpice": false
11
+ }
12
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "SDLC Config",
4
+ "type": "object",
5
+ "required": ["version", "mode", "git", "features", "github", "languages"],
6
+ "properties": {
7
+ "version": { "type": "string" },
8
+ "mode": { "type": "string", "enum": ["event-modeling", "traditional"] },
9
+ "git": {
10
+ "type": "object",
11
+ "required": ["workflow", "worktrees", "requireClean"],
12
+ "properties": {
13
+ "workflow": { "type": "string", "enum": ["git-spice", "standard"] },
14
+ "worktrees": { "type": "boolean" },
15
+ "requireClean": { "type": "boolean" }
16
+ }
17
+ },
18
+ "features": {
19
+ "type": "object",
20
+ "required": ["atomicDesign", "gitSpice"],
21
+ "properties": {
22
+ "atomicDesign": { "type": "boolean" },
23
+ "gitSpice": { "type": "boolean" }
24
+ }
25
+ },
26
+ "github": {
27
+ "type": "object",
28
+ "properties": {
29
+ "owner": { "type": "string" },
30
+ "project": { "type": "number" }
31
+ }
32
+ },
33
+ "languages": {
34
+ "type": "array",
35
+ "minItems": 1,
36
+ "items": {
37
+ "type": "object",
38
+ "required": ["name", "testPatterns", "productionPatterns", "typePatterns"],
39
+ "properties": {
40
+ "name": { "type": "string" },
41
+ "testPatterns": { "type": "array", "items": { "type": "string" } },
42
+ "productionPatterns": { "type": "array", "items": { "type": "string" } },
43
+ "typePatterns": { "type": "array", "items": { "type": "string" } }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node