my-opencode 1.2.1 → 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,162 +1,162 @@
1
- ---
2
- name: docs-gen
3
- description: |
4
- Generate and update project documentation — README, API docs, code comments, ADRs, and CHANGELOG.
5
- Detects existing documentation conventions and matches project style.
6
- Use PROACTIVELY when asked to "document", "write docs", "add comments", "update README", "generate API docs".
7
- Triggers on: "document", "docs", "readme", "comment", "api docs", "changelog", "adr"
8
- ---
9
-
10
- # Documentation Generator
11
-
12
- Analyze code and project structure to generate meaningful, well-structured documentation.
13
-
14
- ## When to Use
15
-
16
- - Adding API documentation for endpoints
17
- - Generating JSDoc/docstring comments for code
18
- - Creating or updating README
19
- - Writing Architecture Decision Records (ADRs)
20
- - Updating CHANGELOG for a release
21
- - Documenting configuration, environment variables, or setup steps
22
-
23
- ## Workflow
24
-
25
- ```
26
- Code/Feature Input → Convention Detection → Doc Type Selection → Generation → Placement
27
- ```
28
-
29
- ### Step 1: Convention Detection
30
-
31
- Detect the project's documentation conventions:
32
-
33
- #### Comment Style
34
- | Detected | Style | File Clues |
35
- |----------|-------|------------|
36
- | JSDoc | `/** @param {string} name */` | `*.ts`, `*.js`, TypeScript project |
37
- | TSDoc | `/** @param name - description */` | `*.ts`, TypeScript project |
38
- | Docstring (reST) | `"""Summary.\n:param name:"""` | `*.py`, Sphinx project |
39
- | Docstring (Google) | `"""Summary.\nArgs:\n name:"""` | `*.py`, Google style |
40
- | Docstring (NumPy) | `"""Summary.\nParameters\n----------\nname: type"""` | `*.py`, NumPy style |
41
- | rustdoc | `/// Summary\n/// \n/// # Arguments` | `*.rs` |
42
- | Godoc | `// Summary` | `*.go` |
43
-
44
- #### README Style
45
- Look at existing `README.md` — what sections does it have? What's the tone?
46
-
47
- #### ADR Format
48
- Check for `docs/adr/` or `docs/architecture/` directory.
49
-
50
- #### CHANGELOG Format
51
- Check for `CHANGELOG.md` — Keep a Changelog? Conventional Commits? Custom?
52
-
53
- ### Step 2: Doc Type Selection
54
-
55
- | Task | Output | Key Sections |
56
- |------|--------|-------------|
57
- | API docs | Endpoint reference | Path, method, request/response schemas, auth, errors |
58
- | Code comments | Inline annotations | Purpose, params, returns, throws, examples |
59
- | README | Project README | Title, description, install, usage, API, config, contributing |
60
- | ADR | ADR file | Context, decision, consequences, alternatives |
61
- | CHANGELOG | Changelog entry | Added/Changed/Deprecated/Removed/Fixed/Security |
62
- | Environment docs | `.env.example` | Variable name, description, required/optional, default |
63
-
64
- ### Step 3: Generation
65
-
66
- #### API Documentation Template
67
- ```markdown
68
- ### `POST /api/users`
69
-
70
- Create a new user.
71
-
72
- **Auth:** Requires `admin` role token in `Authorization` header.
73
-
74
- **Request Body:**
75
- ```json
76
- {
77
- "name": "string (required)",
78
- "email": "string (required)",
79
- "role": "string (optional, default: 'user')"
80
- }
81
- ```
82
-
83
- **Response `201`:**
84
- ```json
85
- {
86
- "id": "string",
87
- "name": "string"
88
- }
89
- ```
90
-
91
- **Errors:**
92
- - `400` — Validation error (missing fields, invalid email)
93
- - `409` — Email already exists
94
- - `401` — Missing or invalid auth token
95
- ```
96
- ```
97
-
98
- #### Code Comment Template
99
- Detected style → generate matching format. Follow existing convention exactly.
100
-
101
- #### README Template
102
- ```
103
- # Project Name
104
-
105
- <one-line description>
106
-
107
- ## Installation
108
-
109
- <install instructions>
110
-
111
- ## Usage
112
-
113
- <quick start example>
114
-
115
- ## API
116
-
117
- <generated from source>
118
-
119
- ## Configuration
120
-
121
- | Variable | Required | Default | Description |
122
- |----------|----------|---------|-------------|
123
- | `PORT` | No | `3000` | Server port |
124
-
125
- ## Development
126
-
127
- <setup, test, build commands>
128
-
129
- ## Contributing
130
-
131
- <guidelines or link to CONTRIBUTING.md>
132
- ```
133
-
134
- ### Step 4: Placement
135
-
136
- - **Code comments:** Added inline, near the documented code
137
- - **API docs:** `docs/api/` or `README.md` section
138
- - **README:** Project root `README.md`
139
- - **ADRs:** `docs/adr/NNNN-title.md` (sequential numbering)
140
- - **CHANGELOG:** `CHANGELOG.md` (insert at top)
141
- - **Environment:** `.env.example` at project root
142
-
143
- ## Guiding Principles
144
-
145
- 1. **Document why, not what** — code says what, comments say why
146
- 2. **Keep docs near code** — inline comments > separate docs
147
- 3. **Match existing style** — consistency > personal preference
148
- 4. **Update docs with code** — doc changes in same PR as code changes
149
- 5. **Examples > descriptions** — a code example is worth a paragraph
150
-
151
- ## Anti-Patterns
152
-
153
- - ❌ Obvious comments (`// increment i` for `i++`)
154
- - ❌ Outdated documentation (docs that don't match code)
155
- - ❌ Documenting internal implementation in public API docs
156
- - ❌ No examples in API documentation
157
- - ❌ Mixed documentation styles in same project
158
-
159
- ## Related Skills
160
-
161
- - `pr-review` — Review doc quality alongside code
162
- - `dev-flow` — Include doc updates in the plan phase
1
+ ---
2
+ name: docs-gen
3
+ description: |
4
+ Generate and update project documentation — README, API docs, code comments, ADRs, and CHANGELOG.
5
+ Detects existing documentation conventions and matches project style.
6
+ Use PROACTIVELY when asked to "document", "write docs", "add comments", "update README", "generate API docs".
7
+ Triggers on: "document", "docs", "readme", "comment", "api docs", "changelog", "adr"
8
+ ---
9
+
10
+ # Documentation Generator
11
+
12
+ Analyze code and project structure to generate meaningful, well-structured documentation.
13
+
14
+ ## When to Use
15
+
16
+ - Adding API documentation for endpoints
17
+ - Generating JSDoc/docstring comments for code
18
+ - Creating or updating README
19
+ - Writing Architecture Decision Records (ADRs)
20
+ - Updating CHANGELOG for a release
21
+ - Documenting configuration, environment variables, or setup steps
22
+
23
+ ## Workflow
24
+
25
+ ```
26
+ Code/Feature Input → Convention Detection → Doc Type Selection → Generation → Placement
27
+ ```
28
+
29
+ ### Step 1: Convention Detection
30
+
31
+ Detect the project's documentation conventions:
32
+
33
+ #### Comment Style
34
+ | Detected | Style | File Clues |
35
+ |----------|-------|------------|
36
+ | JSDoc | `/** @param {string} name */` | `*.ts`, `*.js`, TypeScript project |
37
+ | TSDoc | `/** @param name - description */` | `*.ts`, TypeScript project |
38
+ | Docstring (reST) | `"""Summary.\n:param name:"""` | `*.py`, Sphinx project |
39
+ | Docstring (Google) | `"""Summary.\nArgs:\n name:"""` | `*.py`, Google style |
40
+ | Docstring (NumPy) | `"""Summary.\nParameters\n----------\nname: type"""` | `*.py`, NumPy style |
41
+ | rustdoc | `/// Summary\n/// \n/// # Arguments` | `*.rs` |
42
+ | Godoc | `// Summary` | `*.go` |
43
+
44
+ #### README Style
45
+ Look at existing `README.md` — what sections does it have? What's the tone?
46
+
47
+ #### ADR Format
48
+ Check for `docs/adr/` or `docs/architecture/` directory.
49
+
50
+ #### CHANGELOG Format
51
+ Check for `CHANGELOG.md` — Keep a Changelog? Conventional Commits? Custom?
52
+
53
+ ### Step 2: Doc Type Selection
54
+
55
+ | Task | Output | Key Sections |
56
+ |------|--------|-------------|
57
+ | API docs | Endpoint reference | Path, method, request/response schemas, auth, errors |
58
+ | Code comments | Inline annotations | Purpose, params, returns, throws, examples |
59
+ | README | Project README | Title, description, install, usage, API, config, contributing |
60
+ | ADR | ADR file | Context, decision, consequences, alternatives |
61
+ | CHANGELOG | Changelog entry | Added/Changed/Deprecated/Removed/Fixed/Security |
62
+ | Environment docs | `.env.example` | Variable name, description, required/optional, default |
63
+
64
+ ### Step 3: Generation
65
+
66
+ #### API Documentation Template
67
+ ```markdown
68
+ ### `POST /api/users`
69
+
70
+ Create a new user.
71
+
72
+ **Auth:** Requires `admin` role token in `Authorization` header.
73
+
74
+ **Request Body:**
75
+ ```json
76
+ {
77
+ "name": "string (required)",
78
+ "email": "string (required)",
79
+ "role": "string (optional, default: 'user')"
80
+ }
81
+ ```
82
+
83
+ **Response `201`:**
84
+ ```json
85
+ {
86
+ "id": "string",
87
+ "name": "string"
88
+ }
89
+ ```
90
+
91
+ **Errors:**
92
+ - `400` — Validation error (missing fields, invalid email)
93
+ - `409` — Email already exists
94
+ - `401` — Missing or invalid auth token
95
+ ```
96
+ ```
97
+
98
+ #### Code Comment Template
99
+ Detected style → generate matching format. Follow existing convention exactly.
100
+
101
+ #### README Template
102
+ ```
103
+ # Project Name
104
+
105
+ <one-line description>
106
+
107
+ ## Installation
108
+
109
+ <install instructions>
110
+
111
+ ## Usage
112
+
113
+ <quick start example>
114
+
115
+ ## API
116
+
117
+ <generated from source>
118
+
119
+ ## Configuration
120
+
121
+ | Variable | Required | Default | Description |
122
+ |----------|----------|---------|-------------|
123
+ | `PORT` | No | `3000` | Server port |
124
+
125
+ ## Development
126
+
127
+ <setup, test, build commands>
128
+
129
+ ## Contributing
130
+
131
+ <guidelines or link to CONTRIBUTING.md>
132
+ ```
133
+
134
+ ### Step 4: Placement
135
+
136
+ - **Code comments:** Added inline, near the documented code
137
+ - **API docs:** `docs/api/` or `README.md` section
138
+ - **README:** Project root `README.md`
139
+ - **ADRs:** `docs/adr/NNNN-title.md` (sequential numbering)
140
+ - **CHANGELOG:** `CHANGELOG.md` (insert at top)
141
+ - **Environment:** `.env.example` at project root
142
+
143
+ ## Guiding Principles
144
+
145
+ 1. **Document why, not what** — code says what, comments say why
146
+ 2. **Keep docs near code** — inline comments > separate docs
147
+ 3. **Match existing style** — consistency > personal preference
148
+ 4. **Update docs with code** — doc changes in same PR as code changes
149
+ 5. **Examples > descriptions** — a code example is worth a paragraph
150
+
151
+ ## Anti-Patterns
152
+
153
+ - ❌ Obvious comments (`// increment i` for `i++`)
154
+ - ❌ Outdated documentation (docs that don't match code)
155
+ - ❌ Documenting internal implementation in public API docs
156
+ - ❌ No examples in API documentation
157
+ - ❌ Mixed documentation styles in same project
158
+
159
+ ## Related Skills
160
+
161
+ - `pr-review` — Review doc quality alongside code
162
+ - `dev-flow` — Include doc updates in the plan phase