my-opencode 1.1.0 → 1.2.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 (36) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +180 -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 -53
  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 +311 -311
  13. package/opencode.json +167 -164
  14. package/package.json +48 -48
  15. package/scripts/postinstall.js +182 -182
  16. package/skills/adr/SKILL.md +91 -91
  17. package/skills/adr/references/templates.md +100 -100
  18. package/skills/adr/scripts/README.md +5 -5
  19. package/skills/dev-flow/SKILL.md +188 -188
  20. package/skills/dev-flow/references/code-phase.md +72 -72
  21. package/skills/dev-flow/references/contract-phase.md +81 -81
  22. package/skills/dev-flow/references/verify-phase.md +129 -129
  23. package/skills/dev-flow/scripts/README.md +3 -3
  24. package/skills/docs-gen/SKILL.md +162 -162
  25. package/skills/docs-gen/references/doc-styles.md +216 -216
  26. package/skills/docs-gen/scripts/README.md +5 -5
  27. package/skills/orchestrate/SKILL.md +112 -112
  28. package/skills/orchestrate/references/orchestration-patterns.md +56 -56
  29. package/skills/pr-review/SKILL.md +110 -110
  30. package/skills/pr-review/references/review-dimensions.md +117 -117
  31. package/skills/pr-review/references/security-checklist.md +122 -122
  32. package/skills/pr-review/scripts/README.md +5 -5
  33. package/skills/test-gen/SKILL.md +143 -143
  34. package/skills/test-gen/references/framework-detection.md +105 -105
  35. package/skills/test-gen/references/test-patterns.md +260 -260
  36. package/skills/test-gen/scripts/README.md +5 -5
@@ -1,56 +1,56 @@
1
- # Orchestration Patterns
2
-
3
- ## Decomposition Strategies
4
-
5
- ### By Layer (frontend/backend/infra)
6
- ```
7
- Frontend (executor) ─┐
8
- Backend (executor) ├─→ Synthesis → Review
9
- Infra (executor) ┘
10
- ```
11
-
12
- ### By Phase (plan/implement/verify)
13
- ```
14
- Planner ─→ Executor ─→ Verifier
15
- (sequential pipeline)
16
- ```
17
-
18
- ### By Concern (feature A / feature B)
19
- ```
20
- Planner (feature A) ─→ Executor (A) ─→ Verifier (A) ─┐
21
- ├─→ Synthesis
22
- Planner (feature B) ─→ Executor (B) ─→ Verifier (B) ─┘
23
- ```
24
-
25
- ## Agent Dispatch Reference
26
-
27
- | Subtask Type | Agent | Max Parallel |
28
- |-------------|-------|-------------|
29
- | Architecture/planning | spec-writer | 3 |
30
- | Implementation | executor | 5 |
31
- | Code review | code-reviewer | 3 |
32
- | Test generation | test-engineer | 3 |
33
- | Verification | verifier | 1 |
34
-
35
- ## Handoff Format
36
-
37
- All handoffs in `.handoffs/orchestrate/` follow this structure:
38
-
39
- ```markdown
40
- ## Subtask: <name>
41
- **Agent:** <type>
42
- **Status:** completed / failed / skipped
43
-
44
- ### Input
45
- - <what was given to the agent>
46
-
47
- ### Output
48
- - <what the agent produced>
49
-
50
- ### Files Changed
51
- - path/to/file.ts (modified)
52
- - path/to/new.test.ts (added)
53
-
54
- ### Notes
55
- - <deviations, risks, pending items>
56
- ```
1
+ # Orchestration Patterns
2
+
3
+ ## Decomposition Strategies
4
+
5
+ ### By Layer (frontend/backend/infra)
6
+ ```
7
+ Frontend (executor) ─┐
8
+ Backend (executor) ├─→ Synthesis → Review
9
+ Infra (executor) ┘
10
+ ```
11
+
12
+ ### By Phase (plan/implement/verify)
13
+ ```
14
+ Planner ─→ Executor ─→ Verifier
15
+ (sequential pipeline)
16
+ ```
17
+
18
+ ### By Concern (feature A / feature B)
19
+ ```
20
+ Planner (feature A) ─→ Executor (A) ─→ Verifier (A) ─┐
21
+ ├─→ Synthesis
22
+ Planner (feature B) ─→ Executor (B) ─→ Verifier (B) ─┘
23
+ ```
24
+
25
+ ## Agent Dispatch Reference
26
+
27
+ | Subtask Type | Agent | Max Parallel |
28
+ |-------------|-------|-------------|
29
+ | Architecture/planning | spec-writer | 3 |
30
+ | Implementation | executor | 5 |
31
+ | Code review | code-reviewer | 3 |
32
+ | Test generation | test-engineer | 3 |
33
+ | Verification | verifier | 1 |
34
+
35
+ ## Handoff Format
36
+
37
+ All handoffs in `.handoffs/orchestrate/` follow this structure:
38
+
39
+ ```markdown
40
+ ## Subtask: <name>
41
+ **Agent:** <type>
42
+ **Status:** completed / failed / skipped
43
+
44
+ ### Input
45
+ - <what was given to the agent>
46
+
47
+ ### Output
48
+ - <what the agent produced>
49
+
50
+ ### Files Changed
51
+ - path/to/file.ts (modified)
52
+ - path/to/new.test.ts (added)
53
+
54
+ ### Notes
55
+ - <deviations, risks, pending items>
56
+ ```
@@ -1,110 +1,110 @@
1
- ---
2
- name: pr-review
3
- description: |
4
- Systematic code review for pull requests. Analyzes diff across 5 dimensions:
5
- correctness, security, quality, testing, and style.
6
- Use PROACTIVELY when reviewing PRs, analyzing code changes, or asked to "review", "audit", "check".
7
- Triggers on: "review this PR", "code review", "review changes", "audit", "check my code"
8
- ---
9
-
10
- # PR Review
11
-
12
- Systematic pull request review across 5 dimensions: Correctness, Security, Code Quality, Testing, and Style.
13
-
14
- ## When to Use
15
-
16
- - Reviewing a PR before merge
17
- - Analyzing a diff for potential issues
18
- - Preparing review comments for a colleague
19
- - Auditing code changes for security or quality
20
-
21
- ## Review Workflow
22
-
23
- ```
24
- Diff Input → 5-Dimension Analysis → Issue Classification → Review Report
25
- ```
26
-
27
- ### Step 1: Input Preparation
28
-
29
- Determine what to review:
30
-
31
- - **Branch diff:** `git diff main...HEAD` or `git diff <base>...<feature>`
32
- - **Staged changes:** `git diff --cached`
33
- - **Specific files:** `git diff <base>...<feature> -- <paths>`
34
- - **GitHub PR:** Use `gh` CLI to fetch PR details and diff
35
-
36
- Collect context:
37
- - Read commit messages for intent
38
- - Check linked issues if available
39
- - Note which files are changed (added/modified/deleted)
40
-
41
- ### Step 2: 5-Dimension Analysis
42
-
43
- Each dimension has specific checks:
44
-
45
- | Dimension | Focus | Key Questions |
46
- |-----------|-------|---------------|
47
- | **Correctness** | Logic, edge cases, contracts | Does the code do what it intends? Are edge cases handled? Are there off-by-one, race conditions, or null dereferences? |
48
- | **Security** | Vulnerabilities, hardening | Are inputs validated? Are there injection risks? Secrets exposed? Authz checks in place? |
49
- | **Code Quality** | Maintainability, patterns | Does it follow project conventions? Is it readable? Over-engineering? Dead code? Tech debt introduced? |
50
- | **Testing** | Coverage, test quality | Are new changes tested? Are tests meaningful? Edge cases covered? Test maintainability? |
51
- | **Style** | Formatting, naming | Consistent with project style? Meaningful names? No unnecessary formatting changes mixed in? |
52
-
53
- See `references/review-dimensions.md` for detailed per-dimension checklists.
54
-
55
- ### Step 3: Issue Classification
56
-
57
- Each finding is classified by severity:
58
-
59
- - **🔴 BLOCKING** — Must fix before merge (bug, security vulnerability, data loss)
60
- - **🟡 WARNING** — Should fix (code smell, missing edge case, weak test)
61
- - **🔵 SUGGESTION** — Nice to have (style preference, optional refactor)
62
- - **⚪ PRAISE** — Positive feedback (good design, clever solution, thorough tests)
63
-
64
- ### Step 4: Output Report
65
-
66
- Write review report to stdout with this structure:
67
-
68
- ```markdown
69
- ## PR Review: <brief title>
70
-
71
- ### Overview
72
- <summary of changes, files changed (+/- stats), general assessment>
73
-
74
- ### Findings
75
-
76
- #### 🔴 <issue title>
77
- - **File:** `path/to/file.ts:42`
78
- - **Severity:** blocking
79
- - **Description:** <what and why>
80
- - **Suggestion:** <how to fix>
81
-
82
- ... (more findings) ...
83
-
84
- ### Summary
85
- - 🔴 Blocking: <count>
86
- - 🟡 Warnings: <count>
87
- - 🔵 Suggestions: <count>
88
- - ⚪ Praise: <count>
89
- - **Verdict:** Approve / Changes Requested / Needs Discussion
90
- ```
91
-
92
- ## Guiding Principles
93
-
94
- 1. **Be specific** — reference exact line numbers and file paths
95
- 2. **Explain why** — don't just say "this is wrong", explain the impact
96
- 3. **Offer solutions** — suggest concrete fixes, not just problems
97
- 4. **Prioritize** — focus on correctness and security over style
98
- 5. **Be constructive** — include praise for good code
99
-
100
- ## Anti-Patterns
101
-
102
- - ❌ Nitpicking style while ignoring logic bugs
103
- - ❌ Reviewing without reading full context (imports, types, etc.)
104
- - ❌ Demanding changes without understanding tradeoffs
105
- - ❌ Only negative feedback — missing good patterns
106
- - ❌ Superficial review (LGTM without reading diff)
107
-
108
- ## Related Skills
109
-
110
- - `dev-flow` — For implementing the fixes identified in review
1
+ ---
2
+ name: pr-review
3
+ description: |
4
+ Systematic code review for pull requests. Analyzes diff across 5 dimensions:
5
+ correctness, security, quality, testing, and style.
6
+ Use PROACTIVELY when reviewing PRs, analyzing code changes, or asked to "review", "audit", "check".
7
+ Triggers on: "review this PR", "code review", "review changes", "audit", "check my code"
8
+ ---
9
+
10
+ # PR Review
11
+
12
+ Systematic pull request review across 5 dimensions: Correctness, Security, Code Quality, Testing, and Style.
13
+
14
+ ## When to Use
15
+
16
+ - Reviewing a PR before merge
17
+ - Analyzing a diff for potential issues
18
+ - Preparing review comments for a colleague
19
+ - Auditing code changes for security or quality
20
+
21
+ ## Review Workflow
22
+
23
+ ```
24
+ Diff Input → 5-Dimension Analysis → Issue Classification → Review Report
25
+ ```
26
+
27
+ ### Step 1: Input Preparation
28
+
29
+ Determine what to review:
30
+
31
+ - **Branch diff:** `git diff main...HEAD` or `git diff <base>...<feature>`
32
+ - **Staged changes:** `git diff --cached`
33
+ - **Specific files:** `git diff <base>...<feature> -- <paths>`
34
+ - **GitHub PR:** Use `gh` CLI to fetch PR details and diff
35
+
36
+ Collect context:
37
+ - Read commit messages for intent
38
+ - Check linked issues if available
39
+ - Note which files are changed (added/modified/deleted)
40
+
41
+ ### Step 2: 5-Dimension Analysis
42
+
43
+ Each dimension has specific checks:
44
+
45
+ | Dimension | Focus | Key Questions |
46
+ |-----------|-------|---------------|
47
+ | **Correctness** | Logic, edge cases, contracts | Does the code do what it intends? Are edge cases handled? Are there off-by-one, race conditions, or null dereferences? |
48
+ | **Security** | Vulnerabilities, hardening | Are inputs validated? Are there injection risks? Secrets exposed? Authz checks in place? |
49
+ | **Code Quality** | Maintainability, patterns | Does it follow project conventions? Is it readable? Over-engineering? Dead code? Tech debt introduced? |
50
+ | **Testing** | Coverage, test quality | Are new changes tested? Are tests meaningful? Edge cases covered? Test maintainability? |
51
+ | **Style** | Formatting, naming | Consistent with project style? Meaningful names? No unnecessary formatting changes mixed in? |
52
+
53
+ See `references/review-dimensions.md` for detailed per-dimension checklists.
54
+
55
+ ### Step 3: Issue Classification
56
+
57
+ Each finding is classified by severity:
58
+
59
+ - **🔴 BLOCKING** — Must fix before merge (bug, security vulnerability, data loss)
60
+ - **🟡 WARNING** — Should fix (code smell, missing edge case, weak test)
61
+ - **🔵 SUGGESTION** — Nice to have (style preference, optional refactor)
62
+ - **⚪ PRAISE** — Positive feedback (good design, clever solution, thorough tests)
63
+
64
+ ### Step 4: Output Report
65
+
66
+ Write review report to stdout with this structure:
67
+
68
+ ```markdown
69
+ ## PR Review: <brief title>
70
+
71
+ ### Overview
72
+ <summary of changes, files changed (+/- stats), general assessment>
73
+
74
+ ### Findings
75
+
76
+ #### 🔴 <issue title>
77
+ - **File:** `path/to/file.ts:42`
78
+ - **Severity:** blocking
79
+ - **Description:** <what and why>
80
+ - **Suggestion:** <how to fix>
81
+
82
+ ... (more findings) ...
83
+
84
+ ### Summary
85
+ - 🔴 Blocking: <count>
86
+ - 🟡 Warnings: <count>
87
+ - 🔵 Suggestions: <count>
88
+ - ⚪ Praise: <count>
89
+ - **Verdict:** Approve / Changes Requested / Needs Discussion
90
+ ```
91
+
92
+ ## Guiding Principles
93
+
94
+ 1. **Be specific** — reference exact line numbers and file paths
95
+ 2. **Explain why** — don't just say "this is wrong", explain the impact
96
+ 3. **Offer solutions** — suggest concrete fixes, not just problems
97
+ 4. **Prioritize** — focus on correctness and security over style
98
+ 5. **Be constructive** — include praise for good code
99
+
100
+ ## Anti-Patterns
101
+
102
+ - ❌ Nitpicking style while ignoring logic bugs
103
+ - ❌ Reviewing without reading full context (imports, types, etc.)
104
+ - ❌ Demanding changes without understanding tradeoffs
105
+ - ❌ Only negative feedback — missing good patterns
106
+ - ❌ Superficial review (LGTM without reading diff)
107
+
108
+ ## Related Skills
109
+
110
+ - `dev-flow` — For implementing the fixes identified in review
@@ -1,117 +1,117 @@
1
- # Review Dimensions — Detailed Checklists
2
-
3
- ## 1. Correctness
4
-
5
- ### Logic
6
- - [ ] Does the code correctly implement the intended behavior?
7
- - [ ] Are all branches of conditionals covered?
8
- - [ ] Are loop boundaries correct (off-by-one)?
9
- - [ ] Return values handled properly?
10
- - [ ] Error paths don't silently swallow exceptions?
11
-
12
- ### Data Flow
13
- - [ ] Data transformations preserve invariants?
14
- - [ ] No unintended mutation of inputs?
15
- - [ ] Null/undefined/optional values handled?
16
- - [ ] Type assertions safe?
17
-
18
- ### Concurrency
19
- - [ ] Shared state properly synchronized?
20
- - [ ] No deadlock or race condition risk?
21
- - [ ] Async operations have proper error handling?
22
- - [ ] Resource cleanup guaranteed (finally, dispose, defer)?
23
-
24
- ### Edge Cases
25
- - [ ] Empty collections handled?
26
- - [ ] Boundary values (max int, empty string, zero)?
27
- - [ ] Network/filesystem failures?
28
- - [ ] Unexpected input formats?
29
-
30
- ---
31
-
32
- ## 2. Security
33
-
34
- ### Input Validation
35
- - [ ] All user inputs validated (type, range, format)?
36
- - [ ] Injection prevention (SQL, command, XSS, path traversal)?
37
- - [ ] File uploads validated (type, size, content)?
38
- - [ ] URLs/redirects validated against open redirect?
39
-
40
- ### Authentication & Authorization
41
- - [ ] Auth checks on all protected endpoints?
42
- - [ ] Principle of least privilege followed?
43
- - [ ] No auth bypass paths?
44
- - [ ] Session management secure?
45
-
46
- ### Data Protection
47
- - [ ] No secrets in code, logs, or error messages?
48
- - [ ] Sensitive data encrypted at rest and in transit?
49
- - [ ] PII handled according to regulations?
50
- - [ ] Temporary files cleaned up?
51
-
52
- ### Dependencies
53
- - [ ] New dependencies necessary? Any known vulnerabilities?
54
- - [ ] Versions pinned?
55
-
56
- See `references/security-checklist.md` for language-specific security patterns.
57
-
58
- ---
59
-
60
- ## 3. Code Quality
61
-
62
- ### Design
63
- - [ ] Follows single responsibility principle?
64
- - [ ] Good separation of concerns?
65
- - [ ] Appropriate abstraction level (not over/under-engineered)?
66
- - [ ] Follows project's architectural patterns?
67
-
68
- ### Readability
69
- - [ ] Meaningful names (functions, variables, classes)?
70
- - [ ] Functions do one thing (not too long)?
71
- - [ ] Comments explain "why", not "what"?
72
- - [ ] No commented-out code?
73
-
74
- ### Maintainability
75
- - [ ] No duplicated code (DRY)?
76
- - [ ] Dependencies explicit (not hidden globals)?
77
- - [ ] Config/hardcoded values in right place?
78
- - [ ] Backward compatibility considered?
79
-
80
- ### Performance
81
- - [ ] No obvious performance issues (N+1 queries, unnecessary allocations)?
82
- - [ ] Resource cleanup (connections, file handles, memory)?
83
-
84
- ---
85
-
86
- ## 4. Testing
87
-
88
- ### Coverage
89
- - [ ] New code has corresponding tests?
90
- - [ ] Happy path tested?
91
- - [ ] Error/edge case paths tested?
92
- - [ ] Integration points tested?
93
-
94
- ### Test Quality
95
- - [ ] Tests deterministic (no flakiness)?
96
- - [ ] Tests independent (no shared mutable state)?
97
- - [ ] Test names describe behavior, not implementation?
98
- - [ ] No test logic in production code?
99
-
100
- ### Test Maintenance
101
- - [ ] Tests not too brittle (testing behavior, not implementation)?
102
- - [ ] No excessive mocking?
103
- - [ ] Test data clear and maintainable?
104
-
105
- ---
106
-
107
- ## 5. Style
108
-
109
- ### Consistency
110
- - [ ] Follows project's lint/format config?
111
- - [ ] Naming conventions consistent (camelCase, PascalCase, etc.)?
112
- - [ ] Import/style order consistent?
113
-
114
- ### Diff Hygiene
115
- - [ ] No formatting-only changes mixed with logic changes?
116
- - [ ] No unrelated files changed?
117
- - [ ] Commit messages descriptive?
1
+ # Review Dimensions — Detailed Checklists
2
+
3
+ ## 1. Correctness
4
+
5
+ ### Logic
6
+ - [ ] Does the code correctly implement the intended behavior?
7
+ - [ ] Are all branches of conditionals covered?
8
+ - [ ] Are loop boundaries correct (off-by-one)?
9
+ - [ ] Return values handled properly?
10
+ - [ ] Error paths don't silently swallow exceptions?
11
+
12
+ ### Data Flow
13
+ - [ ] Data transformations preserve invariants?
14
+ - [ ] No unintended mutation of inputs?
15
+ - [ ] Null/undefined/optional values handled?
16
+ - [ ] Type assertions safe?
17
+
18
+ ### Concurrency
19
+ - [ ] Shared state properly synchronized?
20
+ - [ ] No deadlock or race condition risk?
21
+ - [ ] Async operations have proper error handling?
22
+ - [ ] Resource cleanup guaranteed (finally, dispose, defer)?
23
+
24
+ ### Edge Cases
25
+ - [ ] Empty collections handled?
26
+ - [ ] Boundary values (max int, empty string, zero)?
27
+ - [ ] Network/filesystem failures?
28
+ - [ ] Unexpected input formats?
29
+
30
+ ---
31
+
32
+ ## 2. Security
33
+
34
+ ### Input Validation
35
+ - [ ] All user inputs validated (type, range, format)?
36
+ - [ ] Injection prevention (SQL, command, XSS, path traversal)?
37
+ - [ ] File uploads validated (type, size, content)?
38
+ - [ ] URLs/redirects validated against open redirect?
39
+
40
+ ### Authentication & Authorization
41
+ - [ ] Auth checks on all protected endpoints?
42
+ - [ ] Principle of least privilege followed?
43
+ - [ ] No auth bypass paths?
44
+ - [ ] Session management secure?
45
+
46
+ ### Data Protection
47
+ - [ ] No secrets in code, logs, or error messages?
48
+ - [ ] Sensitive data encrypted at rest and in transit?
49
+ - [ ] PII handled according to regulations?
50
+ - [ ] Temporary files cleaned up?
51
+
52
+ ### Dependencies
53
+ - [ ] New dependencies necessary? Any known vulnerabilities?
54
+ - [ ] Versions pinned?
55
+
56
+ See `references/security-checklist.md` for language-specific security patterns.
57
+
58
+ ---
59
+
60
+ ## 3. Code Quality
61
+
62
+ ### Design
63
+ - [ ] Follows single responsibility principle?
64
+ - [ ] Good separation of concerns?
65
+ - [ ] Appropriate abstraction level (not over/under-engineered)?
66
+ - [ ] Follows project's architectural patterns?
67
+
68
+ ### Readability
69
+ - [ ] Meaningful names (functions, variables, classes)?
70
+ - [ ] Functions do one thing (not too long)?
71
+ - [ ] Comments explain "why", not "what"?
72
+ - [ ] No commented-out code?
73
+
74
+ ### Maintainability
75
+ - [ ] No duplicated code (DRY)?
76
+ - [ ] Dependencies explicit (not hidden globals)?
77
+ - [ ] Config/hardcoded values in right place?
78
+ - [ ] Backward compatibility considered?
79
+
80
+ ### Performance
81
+ - [ ] No obvious performance issues (N+1 queries, unnecessary allocations)?
82
+ - [ ] Resource cleanup (connections, file handles, memory)?
83
+
84
+ ---
85
+
86
+ ## 4. Testing
87
+
88
+ ### Coverage
89
+ - [ ] New code has corresponding tests?
90
+ - [ ] Happy path tested?
91
+ - [ ] Error/edge case paths tested?
92
+ - [ ] Integration points tested?
93
+
94
+ ### Test Quality
95
+ - [ ] Tests deterministic (no flakiness)?
96
+ - [ ] Tests independent (no shared mutable state)?
97
+ - [ ] Test names describe behavior, not implementation?
98
+ - [ ] No test logic in production code?
99
+
100
+ ### Test Maintenance
101
+ - [ ] Tests not too brittle (testing behavior, not implementation)?
102
+ - [ ] No excessive mocking?
103
+ - [ ] Test data clear and maintainable?
104
+
105
+ ---
106
+
107
+ ## 5. Style
108
+
109
+ ### Consistency
110
+ - [ ] Follows project's lint/format config?
111
+ - [ ] Naming conventions consistent (camelCase, PascalCase, etc.)?
112
+ - [ ] Import/style order consistent?
113
+
114
+ ### Diff Hygiene
115
+ - [ ] No formatting-only changes mixed with logic changes?
116
+ - [ ] No unrelated files changed?
117
+ - [ ] Commit messages descriptive?