my-opencode 1.2.0 → 1.3.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 (39) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +259 -180
  3. package/agents/architect.md +30 -30
  4. package/agents/code-reviewer.md +29 -29
  5. package/agents/executor.md +30 -30
  6. package/agents/fullstack-dev.md +57 -57
  7. package/agents/spec-writer.md +37 -37
  8. package/agents/team-lead.md +60 -60
  9. package/agents/tech-writer.md +30 -30
  10. package/agents/test-engineer.md +30 -30
  11. package/agents/verifier.md +33 -33
  12. package/bin/cli.js +341 -311
  13. package/bin/moc +199 -0
  14. package/opencode.json +170 -167
  15. package/package.json +50 -48
  16. package/plugins/README.md +64 -0
  17. package/plugins/provider-profile.mjs +139 -0
  18. package/scripts/postinstall.js +202 -182
  19. package/skills/adr/SKILL.md +91 -91
  20. package/skills/adr/references/templates.md +100 -100
  21. package/skills/adr/scripts/README.md +5 -5
  22. package/skills/dev-flow/SKILL.md +188 -188
  23. package/skills/dev-flow/references/code-phase.md +72 -72
  24. package/skills/dev-flow/references/contract-phase.md +81 -81
  25. package/skills/dev-flow/references/verify-phase.md +129 -129
  26. package/skills/dev-flow/scripts/README.md +3 -3
  27. package/skills/docs-gen/SKILL.md +162 -162
  28. package/skills/docs-gen/references/doc-styles.md +216 -216
  29. package/skills/docs-gen/scripts/README.md +5 -5
  30. package/skills/orchestrate/SKILL.md +112 -112
  31. package/skills/orchestrate/references/orchestration-patterns.md +56 -56
  32. package/skills/pr-review/SKILL.md +110 -110
  33. package/skills/pr-review/references/review-dimensions.md +117 -117
  34. package/skills/pr-review/references/security-checklist.md +122 -122
  35. package/skills/pr-review/scripts/README.md +5 -5
  36. package/skills/test-gen/SKILL.md +143 -143
  37. package/skills/test-gen/references/framework-detection.md +105 -105
  38. package/skills/test-gen/references/test-patterns.md +260 -260
  39. package/skills/test-gen/scripts/README.md +5 -5
@@ -1,81 +1,81 @@
1
- # Contract Phase — Detailed Workflow
2
-
3
- The Contract phase replaces the old Plan phase. It produces **persistent, committed** specification documents instead of temporary handoffs.
4
-
5
- ## Entry Conditions
6
-
7
- - User request received (feature, bug, refactor)
8
- - Dev-flow skill activated
9
- - Optional: ADRs exist in `docs/adr/` that constrain this feature
10
-
11
- ## Analysis Process
12
-
13
- ### 1. Understand the Request
14
- - Read the user's request carefully
15
- - Ask clarifying questions if ambiguous (one at a time, with rationale)
16
- - Identify the core goal, not just the surface request
17
-
18
- ### 2. Check Existing ADRs
19
- - Read `docs/adr/README.md` for index
20
- - Identify relevant ADRs that constrain or inform this feature
21
- - Reference ADR numbers in the contract document
22
-
23
- ### 3. Explore the Codebase
24
- - Read relevant files to understand current state
25
- - Use Grep/Glob to find related code
26
- - Identify patterns and conventions
27
-
28
- ### 4. Specify the Contract
29
-
30
- Write to `docs/specs/<feature>/README.md`:
31
-
32
- ```markdown
33
- # Feature: <title>
34
-
35
- ## Requirements
36
- FR-1: System MUST <behavior>
37
- FR-2: System SHOULD <behavior>
38
- FR-3: System MAY <behavior>
39
-
40
- ## Acceptance Criteria
41
- - GIVEN <context> WHEN <action> THEN <expected result>
42
-
43
- ## API Contract
44
- - POST /api/xxx
45
- Request: { field: type }
46
- Response: { field: type }
47
-
48
- ## Data Model
49
- | Entity | Field | Type | Constraints |
50
-
51
- ## Out of Scope
52
- - <explicit exclusions>
53
-
54
- ## Architecture References
55
- - ADR-001: <title>
56
- - ADR-003: <title>
57
- ```
58
-
59
- ### 5. User Review
60
- - Present contract to user
61
- - Ask: "Does this contract look correct? Ready to implement?"
62
- - Wait for approval before proceeding to Code phase
63
-
64
- ## Key Differences from Old Plan Phase
65
-
66
- | Aspect | Old Plan (handoff) | New Contract (persistent) |
67
- |--------|-------------------|--------------------------|
68
- | Location | `.handoffs/dev-flow/plan.md` | `docs/specs/<feature>/README.md` |
69
- | Persistence | Temporary (gitignored) | Committed to repo |
70
- | Audience | Next phase only | All current and future developers |
71
- | Granularity | Implementation steps | Requirements + ACs + API |
72
- | Parallel work | Not supported | Frontend/backend can work in parallel |
73
- | ADR integration | None | Explicit reference |
74
-
75
- ## Anti-Patterns
76
-
77
- - ❌ Writing contracts in `.handoffs/` instead of `docs/specs/`
78
- - ❌ Over-specifying implementation details (that's for Code phase)
79
- - ❌ Ignoring existing ADRs
80
- - ❌ Writing contracts in a different doc per code phase (update the single contract)
81
- - ❌ Skipping user review for complex features
1
+ # Contract Phase — Detailed Workflow
2
+
3
+ The Contract phase replaces the old Plan phase. It produces **persistent, committed** specification documents instead of temporary handoffs.
4
+
5
+ ## Entry Conditions
6
+
7
+ - User request received (feature, bug, refactor)
8
+ - Dev-flow skill activated
9
+ - Optional: ADRs exist in `docs/adr/` that constrain this feature
10
+
11
+ ## Analysis Process
12
+
13
+ ### 1. Understand the Request
14
+ - Read the user's request carefully
15
+ - Ask clarifying questions if ambiguous (one at a time, with rationale)
16
+ - Identify the core goal, not just the surface request
17
+
18
+ ### 2. Check Existing ADRs
19
+ - Read `docs/adr/README.md` for index
20
+ - Identify relevant ADRs that constrain or inform this feature
21
+ - Reference ADR numbers in the contract document
22
+
23
+ ### 3. Explore the Codebase
24
+ - Read relevant files to understand current state
25
+ - Use Grep/Glob to find related code
26
+ - Identify patterns and conventions
27
+
28
+ ### 4. Specify the Contract
29
+
30
+ Write to `docs/specs/<feature>/README.md`:
31
+
32
+ ```markdown
33
+ # Feature: <title>
34
+
35
+ ## Requirements
36
+ FR-1: System MUST <behavior>
37
+ FR-2: System SHOULD <behavior>
38
+ FR-3: System MAY <behavior>
39
+
40
+ ## Acceptance Criteria
41
+ - GIVEN <context> WHEN <action> THEN <expected result>
42
+
43
+ ## API Contract
44
+ - POST /api/xxx
45
+ Request: { field: type }
46
+ Response: { field: type }
47
+
48
+ ## Data Model
49
+ | Entity | Field | Type | Constraints |
50
+
51
+ ## Out of Scope
52
+ - <explicit exclusions>
53
+
54
+ ## Architecture References
55
+ - ADR-001: <title>
56
+ - ADR-003: <title>
57
+ ```
58
+
59
+ ### 5. User Review
60
+ - Present contract to user
61
+ - Ask: "Does this contract look correct? Ready to implement?"
62
+ - Wait for approval before proceeding to Code phase
63
+
64
+ ## Key Differences from Old Plan Phase
65
+
66
+ | Aspect | Old Plan (handoff) | New Contract (persistent) |
67
+ |--------|-------------------|--------------------------|
68
+ | Location | `.handoffs/dev-flow/plan.md` | `docs/specs/<feature>/README.md` |
69
+ | Persistence | Temporary (gitignored) | Committed to repo |
70
+ | Audience | Next phase only | All current and future developers |
71
+ | Granularity | Implementation steps | Requirements + ACs + API |
72
+ | Parallel work | Not supported | Frontend/backend can work in parallel |
73
+ | ADR integration | None | Explicit reference |
74
+
75
+ ## Anti-Patterns
76
+
77
+ - ❌ Writing contracts in `.handoffs/` instead of `docs/specs/`
78
+ - ❌ Over-specifying implementation details (that's for Code phase)
79
+ - ❌ Ignoring existing ADRs
80
+ - ❌ Writing contracts in a different doc per code phase (update the single contract)
81
+ - ❌ Skipping user review for complex features
@@ -1,129 +1,129 @@
1
- # Verify Phase — Detailed Workflow
2
-
3
- ## Entry Conditions
4
-
5
- - Code handoff exists at `.handoffs/dev-flow/code.md`
6
- - Code changes have been implemented
7
-
8
- ## Process
9
-
10
- Run verification steps in order. Stop at first failure and report.
11
-
12
- ### 1. Detect Project Type
13
- - Look for `package.json` → Node.js project
14
- - Look for `Cargo.toml` → Rust project
15
- - Look for `pyproject.toml` / `requirements.txt` → Python project
16
- - Look for `go.mod` → Go project
17
- - Use `ls` on project root to detect
18
-
19
- ### 2. Run Lint
20
- ```
21
- # Node
22
- npm run lint # or yarn lint, pnpm lint
23
-
24
- # Rust
25
- cargo clippy
26
-
27
- # Python
28
- ruff check . # or flake8, pylint
29
-
30
- # Go
31
- go vet ./...
32
- ```
33
-
34
- **Pass condition:** Exit code 0, no errors.
35
- **Fail:** Record lint errors in handoff.
36
-
37
- ### 3. Run Typecheck (if applicable)
38
- ```
39
- # TypeScript
40
- npx tsc --noEmit # or npm run typecheck
41
-
42
- # Rust
43
- cargo check
44
-
45
- # Python (pyright/mypy)
46
- pyright .
47
- mypy .
48
- ```
49
-
50
- **Pass condition:** Exit code 0, no type errors.
51
-
52
- ### 4. Run Tests
53
- ```
54
- # Find test command from package.json scripts or common conventions
55
-
56
- # Node
57
- npm test # or npm run test
58
-
59
- # Rust
60
- cargo test
61
-
62
- # Python
63
- pytest # or python -m pytest
64
-
65
- # Go
66
- go test ./...
67
- ```
68
-
69
- **Pass condition:** All tests pass.
70
- **Fail:** Record which tests failed and their output.
71
-
72
- ### 5. Run Build (if applicable)
73
- ```
74
- # Node
75
- npm run build # or npm run build:prod
76
-
77
- # Rust
78
- cargo build
79
-
80
- # Go
81
- go build ./...
82
- ```
83
-
84
- **Pass condition:** Exit code 0, build succeeds.
85
-
86
- ### 6. Output Handoff
87
-
88
- Write to `.handoffs/dev-flow/verify.md`:
89
-
90
- ```markdown
91
- # Verification: <title>
92
-
93
- ## Results
94
-
95
- | Check | Status | Details |
96
- |-------|--------|---------|
97
- | Lint | ✅ Pass / ❌ Fail | <details> |
98
- | Typecheck | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
99
- | Tests | ✅ Pass / ❌ Fail | <details> |
100
- | Build | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
101
-
102
- ## Overall Verdict
103
-
104
- **PASS** — All checks passed. Changes are ready.
105
-
106
- or
107
-
108
- **NEEDS FIX** — <summary of failures, max 3 bullet points>
109
-
110
- ## Fix Loop Info
111
- - Attempt: <1/3, 2/3, 3/3>
112
- - Previous failures: <list>
113
- ```
114
-
115
- ## Fix Loop
116
-
117
- If verification fails:
118
- 1. Read `verify.md` to understand failures
119
- 2. Return to Code phase to fix
120
- 3. Re-verify after fixes
121
- 4. Max 3 fix attempts total
122
-
123
- ## Anti-Patterns
124
-
125
- - ❌ Skipping verification for "trivial" changes
126
- - ❌ Not running the actual test command (guessing)
127
- - ❌ Ignoring test failures that seem unrelated
128
- - ❌ Exceeding max fix loops without asking user
129
- - ❌ Not detecting the correct project type
1
+ # Verify Phase — Detailed Workflow
2
+
3
+ ## Entry Conditions
4
+
5
+ - Code handoff exists at `.handoffs/dev-flow/code.md`
6
+ - Code changes have been implemented
7
+
8
+ ## Process
9
+
10
+ Run verification steps in order. Stop at first failure and report.
11
+
12
+ ### 1. Detect Project Type
13
+ - Look for `package.json` → Node.js project
14
+ - Look for `Cargo.toml` → Rust project
15
+ - Look for `pyproject.toml` / `requirements.txt` → Python project
16
+ - Look for `go.mod` → Go project
17
+ - Use `ls` on project root to detect
18
+
19
+ ### 2. Run Lint
20
+ ```
21
+ # Node
22
+ npm run lint # or yarn lint, pnpm lint
23
+
24
+ # Rust
25
+ cargo clippy
26
+
27
+ # Python
28
+ ruff check . # or flake8, pylint
29
+
30
+ # Go
31
+ go vet ./...
32
+ ```
33
+
34
+ **Pass condition:** Exit code 0, no errors.
35
+ **Fail:** Record lint errors in handoff.
36
+
37
+ ### 3. Run Typecheck (if applicable)
38
+ ```
39
+ # TypeScript
40
+ npx tsc --noEmit # or npm run typecheck
41
+
42
+ # Rust
43
+ cargo check
44
+
45
+ # Python (pyright/mypy)
46
+ pyright .
47
+ mypy .
48
+ ```
49
+
50
+ **Pass condition:** Exit code 0, no type errors.
51
+
52
+ ### 4. Run Tests
53
+ ```
54
+ # Find test command from package.json scripts or common conventions
55
+
56
+ # Node
57
+ npm test # or npm run test
58
+
59
+ # Rust
60
+ cargo test
61
+
62
+ # Python
63
+ pytest # or python -m pytest
64
+
65
+ # Go
66
+ go test ./...
67
+ ```
68
+
69
+ **Pass condition:** All tests pass.
70
+ **Fail:** Record which tests failed and their output.
71
+
72
+ ### 5. Run Build (if applicable)
73
+ ```
74
+ # Node
75
+ npm run build # or npm run build:prod
76
+
77
+ # Rust
78
+ cargo build
79
+
80
+ # Go
81
+ go build ./...
82
+ ```
83
+
84
+ **Pass condition:** Exit code 0, build succeeds.
85
+
86
+ ### 6. Output Handoff
87
+
88
+ Write to `.handoffs/dev-flow/verify.md`:
89
+
90
+ ```markdown
91
+ # Verification: <title>
92
+
93
+ ## Results
94
+
95
+ | Check | Status | Details |
96
+ |-------|--------|---------|
97
+ | Lint | ✅ Pass / ❌ Fail | <details> |
98
+ | Typecheck | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
99
+ | Tests | ✅ Pass / ❌ Fail | <details> |
100
+ | Build | ✅ Pass / ❌ Fail / ⏭ Skip | <details> |
101
+
102
+ ## Overall Verdict
103
+
104
+ **PASS** — All checks passed. Changes are ready.
105
+
106
+ or
107
+
108
+ **NEEDS FIX** — <summary of failures, max 3 bullet points>
109
+
110
+ ## Fix Loop Info
111
+ - Attempt: <1/3, 2/3, 3/3>
112
+ - Previous failures: <list>
113
+ ```
114
+
115
+ ## Fix Loop
116
+
117
+ If verification fails:
118
+ 1. Read `verify.md` to understand failures
119
+ 2. Return to Code phase to fix
120
+ 3. Re-verify after fixes
121
+ 4. Max 3 fix attempts total
122
+
123
+ ## Anti-Patterns
124
+
125
+ - ❌ Skipping verification for "trivial" changes
126
+ - ❌ Not running the actual test command (guessing)
127
+ - ❌ Ignoring test failures that seem unrelated
128
+ - ❌ Exceeding max fix loops without asking user
129
+ - ❌ Not detecting the correct project type
@@ -1,3 +1,3 @@
1
- # dev-flow Scripts
2
-
3
- Utility scripts for the dev-flow skill. Currently empty — scripts will be added as needed (e.g., handoff management, project type detection).
1
+ # dev-flow Scripts
2
+
3
+ Utility scripts for the dev-flow skill. Currently empty — scripts will be added as needed (e.g., handoff management, project type detection).