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,105 +1,105 @@
1
- # Framework Detection — Detailed Reference
2
-
3
- ## Detection Order
4
-
5
- 1. Check project config files
6
- 2. Check for test directories (`test/`, `__tests__/`, `spec/`)
7
- 3. Check for existing test files (`*.test.*`, `*.spec.*`, `test_*`)
8
- 4. Read one existing test to confirm conventions
9
-
10
- ---
11
-
12
- ## Node.js / TypeScript
13
-
14
- ### Detection by config file
15
-
16
- Look in `package.json` `devDependencies` and `scripts`:
17
-
18
- | Pattern | Framework | Test Command |
19
- |---------|-----------|-------------|
20
- | `"vitest"` in devDeps | Vitest | `npm run test` or `npx vitest` |
21
- | `"jest"` in devDeps | Jest | `npx jest` |
22
- | `"mocha"` + `"chai"` in devDeps | Mocha + Chai | `npx mocha` |
23
- | `"ava"` in devDeps | AVA | `npx ava` |
24
- | `"test": "vitest"` in scripts | Vitest | `npm test` |
25
- | `"test": "jest"` in scripts | Jest | `npm test` |
26
-
27
- ### Vitest specifics
28
- - Config: `vitest.config.ts` or `vite.config.ts` with `test` block
29
- - File patterns: `*.test.ts`, `*.spec.ts`, `**/__tests__/*.ts`
30
- - Globals: `describe`, `it`, `expect`, `beforeEach` available without import
31
- - `vi.mock()` for mocking
32
- - Run: `npx vitest run` (single run) or `npx vitest` (watch)
33
-
34
- ### Jest specifics
35
- - Config: `jest.config.ts` or `jest.config.js`
36
- - File patterns: `*.test.ts`, `*.spec.ts`, `**/__tests__/*.ts`
37
- - `jest.mock()` for mocking
38
- - Run: `npx jest`
39
-
40
- ### File naming conventions
41
-
42
- | Convention | Example | Framework |
43
- |------------|---------|-----------|
44
- | Co-located `.test.ts` | `user.ts` → `user.test.ts` | Vitest, Jest |
45
- | Co-located `.spec.ts` | `user.ts` → `user.spec.ts` | Vitest, Jest |
46
- | `__tests__/` dir | `__tests__/user.test.ts` | Jest |
47
- | `test/` dir mirrored | `test/user.test.ts` | Mocha |
48
-
49
- ---
50
-
51
- ## Python
52
-
53
- ### Detection by config file
54
-
55
- | File | Framework |
56
- |------|-----------|
57
- | `pyproject.toml` with `[tool.pytest]` | pytest |
58
- | `pytest.ini` | pytest |
59
- | `setup.cfg` with `[tool:pytest]` | pytest |
60
-
61
- ### Pytest specifics
62
- - File patterns: `test_*.py`, `*_test.py`
63
- - Function patterns: `def test_<name>()`
64
- - Class patterns: `class Test<Name>` with `def test_<name>()`
65
- - Fixtures: `@pytest.fixture`, conftest.py
66
- - Parametrize: `@pytest.mark.parametrize`
67
- - Mock: `unittest.mock` or `pytest-mock` (`mocker` fixture)
68
- - Run: `pytest -v`, `pytest -v test_file.py`
69
-
70
- ### Unittest specifics
71
- - File patterns: `test_*.py`
72
- - Class: `class Test<Name>(unittest.TestCase)`
73
- - Setup: `setUp()` / `setUpClass()`
74
- - Assert: `self.assertEqual()`, `self.assertTrue()`, etc.
75
- - Mock: `@unittest.mock.patch()`
76
- - Run: `python -m unittest -v`
77
-
78
- ### File naming conventions
79
- | Convention | Example |
80
- |------------|---------|
81
- | `tests/` dir | `tests/test_user.py` |
82
- | Co-located | `user.py` → `test_user.py` (next to it) |
83
-
84
- ---
85
-
86
- ## Rust
87
-
88
- ### Built-in test framework
89
- - Attribute: `#[test]` on functions
90
- - File location: tests live in `tests/` (integration) or inside source files (unit)
91
- - Unit tests: `#[cfg(test)] mod tests { ... }` at bottom of source file
92
- - Integration tests: `tests/<name>.rs` files
93
- - Assert: `assert!()`, `assert_eq!()`, `assert_ne!()`
94
- - Run: `cargo test`, `cargo test <test_name>`
95
-
96
- ---
97
-
98
- ## Go
99
-
100
- ### Built-in test framework
101
- - File patterns: `*_test.go`
102
- - Function: `func Test<Name>(t *testing.T)`
103
- - Table-driven tests common: `tests := []struct{ ... }`
104
- - Assert: `t.Errorf()`, `t.Fatal()`, or `require`/`assert` from testify
105
- - Run: `go test ./...`, `go test -v ./...`
1
+ # Framework Detection — Detailed Reference
2
+
3
+ ## Detection Order
4
+
5
+ 1. Check project config files
6
+ 2. Check for test directories (`test/`, `__tests__/`, `spec/`)
7
+ 3. Check for existing test files (`*.test.*`, `*.spec.*`, `test_*`)
8
+ 4. Read one existing test to confirm conventions
9
+
10
+ ---
11
+
12
+ ## Node.js / TypeScript
13
+
14
+ ### Detection by config file
15
+
16
+ Look in `package.json` `devDependencies` and `scripts`:
17
+
18
+ | Pattern | Framework | Test Command |
19
+ |---------|-----------|-------------|
20
+ | `"vitest"` in devDeps | Vitest | `npm run test` or `npx vitest` |
21
+ | `"jest"` in devDeps | Jest | `npx jest` |
22
+ | `"mocha"` + `"chai"` in devDeps | Mocha + Chai | `npx mocha` |
23
+ | `"ava"` in devDeps | AVA | `npx ava` |
24
+ | `"test": "vitest"` in scripts | Vitest | `npm test` |
25
+ | `"test": "jest"` in scripts | Jest | `npm test` |
26
+
27
+ ### Vitest specifics
28
+ - Config: `vitest.config.ts` or `vite.config.ts` with `test` block
29
+ - File patterns: `*.test.ts`, `*.spec.ts`, `**/__tests__/*.ts`
30
+ - Globals: `describe`, `it`, `expect`, `beforeEach` available without import
31
+ - `vi.mock()` for mocking
32
+ - Run: `npx vitest run` (single run) or `npx vitest` (watch)
33
+
34
+ ### Jest specifics
35
+ - Config: `jest.config.ts` or `jest.config.js`
36
+ - File patterns: `*.test.ts`, `*.spec.ts`, `**/__tests__/*.ts`
37
+ - `jest.mock()` for mocking
38
+ - Run: `npx jest`
39
+
40
+ ### File naming conventions
41
+
42
+ | Convention | Example | Framework |
43
+ |------------|---------|-----------|
44
+ | Co-located `.test.ts` | `user.ts` → `user.test.ts` | Vitest, Jest |
45
+ | Co-located `.spec.ts` | `user.ts` → `user.spec.ts` | Vitest, Jest |
46
+ | `__tests__/` dir | `__tests__/user.test.ts` | Jest |
47
+ | `test/` dir mirrored | `test/user.test.ts` | Mocha |
48
+
49
+ ---
50
+
51
+ ## Python
52
+
53
+ ### Detection by config file
54
+
55
+ | File | Framework |
56
+ |------|-----------|
57
+ | `pyproject.toml` with `[tool.pytest]` | pytest |
58
+ | `pytest.ini` | pytest |
59
+ | `setup.cfg` with `[tool:pytest]` | pytest |
60
+
61
+ ### Pytest specifics
62
+ - File patterns: `test_*.py`, `*_test.py`
63
+ - Function patterns: `def test_<name>()`
64
+ - Class patterns: `class Test<Name>` with `def test_<name>()`
65
+ - Fixtures: `@pytest.fixture`, conftest.py
66
+ - Parametrize: `@pytest.mark.parametrize`
67
+ - Mock: `unittest.mock` or `pytest-mock` (`mocker` fixture)
68
+ - Run: `pytest -v`, `pytest -v test_file.py`
69
+
70
+ ### Unittest specifics
71
+ - File patterns: `test_*.py`
72
+ - Class: `class Test<Name>(unittest.TestCase)`
73
+ - Setup: `setUp()` / `setUpClass()`
74
+ - Assert: `self.assertEqual()`, `self.assertTrue()`, etc.
75
+ - Mock: `@unittest.mock.patch()`
76
+ - Run: `python -m unittest -v`
77
+
78
+ ### File naming conventions
79
+ | Convention | Example |
80
+ |------------|---------|
81
+ | `tests/` dir | `tests/test_user.py` |
82
+ | Co-located | `user.py` → `test_user.py` (next to it) |
83
+
84
+ ---
85
+
86
+ ## Rust
87
+
88
+ ### Built-in test framework
89
+ - Attribute: `#[test]` on functions
90
+ - File location: tests live in `tests/` (integration) or inside source files (unit)
91
+ - Unit tests: `#[cfg(test)] mod tests { ... }` at bottom of source file
92
+ - Integration tests: `tests/<name>.rs` files
93
+ - Assert: `assert!()`, `assert_eq!()`, `assert_ne!()`
94
+ - Run: `cargo test`, `cargo test <test_name>`
95
+
96
+ ---
97
+
98
+ ## Go
99
+
100
+ ### Built-in test framework
101
+ - File patterns: `*_test.go`
102
+ - Function: `func Test<Name>(t *testing.T)`
103
+ - Table-driven tests common: `tests := []struct{ ... }`
104
+ - Assert: `t.Errorf()`, `t.Fatal()`, or `require`/`assert` from testify
105
+ - Run: `go test ./...`, `go test -v ./...`