my-opencode 1.3.4 → 3.0.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 (47) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +309 -271
  3. package/agents/architect.md +30 -30
  4. package/agents/backend-dev.md +29 -0
  5. package/agents/business-analyst.md +30 -0
  6. package/agents/code-reviewer.md +29 -29
  7. package/agents/design-evidence.md +29 -0
  8. package/agents/frontend-dev.md +29 -0
  9. package/agents/system-designer.md +30 -0
  10. package/agents/team-lead.md +65 -60
  11. package/agents/tech-writer.md +30 -30
  12. package/agents/test-engineer.md +30 -30
  13. package/agents/verifier.md +38 -33
  14. package/bin/cli.js +366 -364
  15. package/bin/moc +206 -198
  16. package/bin/moc.js +9 -3
  17. package/opencode.json +240 -170
  18. package/package.json +53 -51
  19. package/plugins/README.md +74 -67
  20. package/plugins/provider-profile.mjs +238 -194
  21. package/scripts/postinstall.js +202 -202
  22. package/scripts/validate-role-flow.mjs +90 -0
  23. package/skills/adr/SKILL.md +91 -91
  24. package/skills/adr/references/templates.md +100 -100
  25. package/skills/adr/scripts/README.md +5 -5
  26. package/skills/design-evidence/SKILL.md +56 -0
  27. package/skills/dev-flow/SKILL.md +126 -188
  28. package/skills/dev-flow/references/code-phase.md +35 -72
  29. package/skills/dev-flow/references/contract-phase.md +66 -81
  30. package/skills/dev-flow/references/verify-phase.md +70 -129
  31. package/skills/dev-flow/scripts/README.md +3 -3
  32. package/skills/docs-gen/SKILL.md +162 -162
  33. package/skills/docs-gen/references/doc-styles.md +216 -216
  34. package/skills/docs-gen/scripts/README.md +5 -5
  35. package/skills/orchestrate/SKILL.md +63 -112
  36. package/skills/orchestrate/references/orchestration-patterns.md +49 -56
  37. package/skills/pr-review/SKILL.md +110 -110
  38. package/skills/pr-review/references/review-dimensions.md +117 -117
  39. package/skills/pr-review/references/security-checklist.md +122 -122
  40. package/skills/pr-review/scripts/README.md +5 -5
  41. package/skills/test-gen/SKILL.md +143 -143
  42. package/skills/test-gen/references/framework-detection.md +105 -105
  43. package/skills/test-gen/references/test-patterns.md +260 -260
  44. package/skills/test-gen/scripts/README.md +5 -5
  45. package/agents/executor.md +0 -30
  46. package/agents/fullstack-dev.md +0 -57
  47. package/agents/spec-writer.md +0 -37
@@ -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 ./...`