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.
- package/LICENSE +21 -21
- package/README.md +259 -180
- package/agents/architect.md +30 -30
- package/agents/code-reviewer.md +29 -29
- package/agents/executor.md +30 -30
- package/agents/fullstack-dev.md +57 -57
- package/agents/spec-writer.md +37 -37
- package/agents/team-lead.md +60 -60
- package/agents/tech-writer.md +30 -30
- package/agents/test-engineer.md +30 -30
- package/agents/verifier.md +33 -33
- package/bin/cli.js +341 -311
- package/bin/moc +199 -0
- package/opencode.json +170 -167
- package/package.json +50 -48
- package/plugins/README.md +64 -0
- package/plugins/provider-profile.mjs +139 -0
- package/scripts/postinstall.js +202 -182
- package/skills/adr/SKILL.md +91 -91
- package/skills/adr/references/templates.md +100 -100
- package/skills/adr/scripts/README.md +5 -5
- package/skills/dev-flow/SKILL.md +188 -188
- package/skills/dev-flow/references/code-phase.md +72 -72
- package/skills/dev-flow/references/contract-phase.md +81 -81
- package/skills/dev-flow/references/verify-phase.md +129 -129
- package/skills/dev-flow/scripts/README.md +3 -3
- package/skills/docs-gen/SKILL.md +162 -162
- package/skills/docs-gen/references/doc-styles.md +216 -216
- package/skills/docs-gen/scripts/README.md +5 -5
- package/skills/orchestrate/SKILL.md +112 -112
- package/skills/orchestrate/references/orchestration-patterns.md +56 -56
- package/skills/pr-review/SKILL.md +110 -110
- package/skills/pr-review/references/review-dimensions.md +117 -117
- package/skills/pr-review/references/security-checklist.md +122 -122
- package/skills/pr-review/scripts/README.md +5 -5
- package/skills/test-gen/SKILL.md +143 -143
- package/skills/test-gen/references/framework-detection.md +105 -105
- package/skills/test-gen/references/test-patterns.md +260 -260
- package/skills/test-gen/scripts/README.md +5 -5
package/skills/adr/SKILL.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: adr
|
|
3
|
-
description: |
|
|
4
|
-
Capture architecture decisions as lightweight ADR documents.
|
|
5
|
-
Use when making design choices that affect project structure, technology selection,
|
|
6
|
-
or architectural direction. Also use during code review when spotting implicit decisions.
|
|
7
|
-
Triggers on: "adr", "architecture decision", "design decision", "why did we", "decision log"
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Architecture Decision Records
|
|
11
|
-
|
|
12
|
-
Capture, manage, and maintain architecture decisions using Michael Nygard's lightweight ADR format.
|
|
13
|
-
|
|
14
|
-
## When to Use
|
|
15
|
-
|
|
16
|
-
- Choosing a technology, framework, or library
|
|
17
|
-
- Defining project structure or module boundaries
|
|
18
|
-
- Making API design decisions (REST vs GraphQL, versioning strategy)
|
|
19
|
-
- Selecting database, cache, or infrastructure
|
|
20
|
-
- Changing existing architecture decisions
|
|
21
|
-
- During code review — if a PR introduces an architectural change without an ADR, flag it
|
|
22
|
-
|
|
23
|
-
## ADR Lifecycle
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
Proposed → Accepted → Deprecated → Superseded by ADR-NNN
|
|
27
|
-
↘ Reinstated
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
| Status | Meaning |
|
|
31
|
-
|--------|---------|
|
|
32
|
-
| Proposed | Decision suggested, under review |
|
|
33
|
-
| Accepted | Decision adopted, implementation follows |
|
|
34
|
-
| Deprecated | No longer recommended, existing usage OK |
|
|
35
|
-
| Superseded | Replaced by another ADR (link to it) |
|
|
36
|
-
| Reinstated | Previously deprecated decision revived |
|
|
37
|
-
|
|
38
|
-
## Workflow
|
|
39
|
-
|
|
40
|
-
### Step 1: Detect Decision Moment
|
|
41
|
-
|
|
42
|
-
An ADR is needed when:
|
|
43
|
-
- A decision has long-term impact on the codebase
|
|
44
|
-
- Multiple alternatives exist with meaningful tradeoffs
|
|
45
|
-
- The decision affects how other teams/modules will work
|
|
46
|
-
- You find yourself explaining "why we chose X" more than once
|
|
47
|
-
|
|
48
|
-
### Step 2: Write ADR
|
|
49
|
-
|
|
50
|
-
Use the template from `references/templates.md`. Save to `docs/adr/NNNN-title.md`.
|
|
51
|
-
|
|
52
|
-
Number sequentially: check existing files in `docs/adr/` and increment.
|
|
53
|
-
|
|
54
|
-
### Step 3: Review
|
|
55
|
-
|
|
56
|
-
Share with team for feedback. ADRs benefit from:
|
|
57
|
-
- Architecture review
|
|
58
|
-
- Cross-team input (if decision affects others)
|
|
59
|
-
- At least one other person reading it
|
|
60
|
-
|
|
61
|
-
### Step 4: Update Status
|
|
62
|
-
|
|
63
|
-
As decisions evolve:
|
|
64
|
-
- Mark `Accepted` when implementation starts
|
|
65
|
-
- Mark `Deprecated` when better alternatives emerge
|
|
66
|
-
- Mark `Superseded by ADR-NNN` when replaced
|
|
67
|
-
- Link related ADRs in both directions
|
|
68
|
-
|
|
69
|
-
## ADR Location
|
|
70
|
-
|
|
71
|
-
All ADRs live in `docs/adr/` with an index:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
docs/adr/
|
|
75
|
-
├── README.md # Index of all ADRs
|
|
76
|
-
├── 001-use-postgres.md
|
|
77
|
-
├── 002-api-versioning.md
|
|
78
|
-
└── 003-monorepo-structure.md
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Keeping ADRs Alive
|
|
82
|
-
|
|
83
|
-
- **PR review hook:** If a PR changes architecture without a corresponding ADR, flag it
|
|
84
|
-
- **Regular index updates:** When superseding, update the old ADR's status and link
|
|
85
|
-
- **Not everything needs an ADR:** Bug fixes, routine feature additions, style choices → skip
|
|
86
|
-
- **But when in doubt, write one:** A 5-minute ADR saves hours of future confusion
|
|
87
|
-
|
|
88
|
-
## Related Skills
|
|
89
|
-
|
|
90
|
-
- `dev-flow` — Contract phase should reference ADRs for architectural context
|
|
91
|
-
- `pr-review` — Code review checks for missing ADRs on architectural changes
|
|
1
|
+
---
|
|
2
|
+
name: adr
|
|
3
|
+
description: |
|
|
4
|
+
Capture architecture decisions as lightweight ADR documents.
|
|
5
|
+
Use when making design choices that affect project structure, technology selection,
|
|
6
|
+
or architectural direction. Also use during code review when spotting implicit decisions.
|
|
7
|
+
Triggers on: "adr", "architecture decision", "design decision", "why did we", "decision log"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Architecture Decision Records
|
|
11
|
+
|
|
12
|
+
Capture, manage, and maintain architecture decisions using Michael Nygard's lightweight ADR format.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- Choosing a technology, framework, or library
|
|
17
|
+
- Defining project structure or module boundaries
|
|
18
|
+
- Making API design decisions (REST vs GraphQL, versioning strategy)
|
|
19
|
+
- Selecting database, cache, or infrastructure
|
|
20
|
+
- Changing existing architecture decisions
|
|
21
|
+
- During code review — if a PR introduces an architectural change without an ADR, flag it
|
|
22
|
+
|
|
23
|
+
## ADR Lifecycle
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Proposed → Accepted → Deprecated → Superseded by ADR-NNN
|
|
27
|
+
↘ Reinstated
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Status | Meaning |
|
|
31
|
+
|--------|---------|
|
|
32
|
+
| Proposed | Decision suggested, under review |
|
|
33
|
+
| Accepted | Decision adopted, implementation follows |
|
|
34
|
+
| Deprecated | No longer recommended, existing usage OK |
|
|
35
|
+
| Superseded | Replaced by another ADR (link to it) |
|
|
36
|
+
| Reinstated | Previously deprecated decision revived |
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
### Step 1: Detect Decision Moment
|
|
41
|
+
|
|
42
|
+
An ADR is needed when:
|
|
43
|
+
- A decision has long-term impact on the codebase
|
|
44
|
+
- Multiple alternatives exist with meaningful tradeoffs
|
|
45
|
+
- The decision affects how other teams/modules will work
|
|
46
|
+
- You find yourself explaining "why we chose X" more than once
|
|
47
|
+
|
|
48
|
+
### Step 2: Write ADR
|
|
49
|
+
|
|
50
|
+
Use the template from `references/templates.md`. Save to `docs/adr/NNNN-title.md`.
|
|
51
|
+
|
|
52
|
+
Number sequentially: check existing files in `docs/adr/` and increment.
|
|
53
|
+
|
|
54
|
+
### Step 3: Review
|
|
55
|
+
|
|
56
|
+
Share with team for feedback. ADRs benefit from:
|
|
57
|
+
- Architecture review
|
|
58
|
+
- Cross-team input (if decision affects others)
|
|
59
|
+
- At least one other person reading it
|
|
60
|
+
|
|
61
|
+
### Step 4: Update Status
|
|
62
|
+
|
|
63
|
+
As decisions evolve:
|
|
64
|
+
- Mark `Accepted` when implementation starts
|
|
65
|
+
- Mark `Deprecated` when better alternatives emerge
|
|
66
|
+
- Mark `Superseded by ADR-NNN` when replaced
|
|
67
|
+
- Link related ADRs in both directions
|
|
68
|
+
|
|
69
|
+
## ADR Location
|
|
70
|
+
|
|
71
|
+
All ADRs live in `docs/adr/` with an index:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
docs/adr/
|
|
75
|
+
├── README.md # Index of all ADRs
|
|
76
|
+
├── 001-use-postgres.md
|
|
77
|
+
├── 002-api-versioning.md
|
|
78
|
+
└── 003-monorepo-structure.md
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Keeping ADRs Alive
|
|
82
|
+
|
|
83
|
+
- **PR review hook:** If a PR changes architecture without a corresponding ADR, flag it
|
|
84
|
+
- **Regular index updates:** When superseding, update the old ADR's status and link
|
|
85
|
+
- **Not everything needs an ADR:** Bug fixes, routine feature additions, style choices → skip
|
|
86
|
+
- **But when in doubt, write one:** A 5-minute ADR saves hours of future confusion
|
|
87
|
+
|
|
88
|
+
## Related Skills
|
|
89
|
+
|
|
90
|
+
- `dev-flow` — Contract phase should reference ADRs for architectural context
|
|
91
|
+
- `pr-review` — Code review checks for missing ADRs on architectural changes
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
# ADR Templates
|
|
2
|
-
|
|
3
|
-
## Standard (Michael Nygard)
|
|
4
|
-
|
|
5
|
-
```markdown
|
|
6
|
-
# ADR-NNN: <short title>
|
|
7
|
-
|
|
8
|
-
**Date:** YYYY-MM-DD
|
|
9
|
-
**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-NNN
|
|
10
|
-
|
|
11
|
-
## Context
|
|
12
|
-
<What is the issue motivating this decision?
|
|
13
|
-
What forces are at play (technical, political, social)?
|
|
14
|
-
Mention specific constraints, requirements, or tradeoffs.>
|
|
15
|
-
|
|
16
|
-
## Decision
|
|
17
|
-
<What is the change being proposed or made?
|
|
18
|
-
Be specific — technology name, version, pattern.>
|
|
19
|
-
|
|
20
|
-
## Consequences
|
|
21
|
-
<What becomes easier or harder?
|
|
22
|
-
List positive and negative outcomes.>
|
|
23
|
-
|
|
24
|
-
## Alternatives
|
|
25
|
-
<What other options were considered, and why were they rejected?
|
|
26
|
-
Keep brief — 1-2 sentences per alternative.>
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## MADR (Markdown ADR) — More Structured
|
|
32
|
-
|
|
33
|
-
```markdown
|
|
34
|
-
# ADR-NNN: <short title>
|
|
35
|
-
|
|
36
|
-
**Date:** YYYY-MM-DD
|
|
37
|
-
**Status:** Proposed
|
|
38
|
-
|
|
39
|
-
## Context and Problem Statement
|
|
40
|
-
<Describe the problem in 2-3 sentences.>
|
|
41
|
-
|
|
42
|
-
## Decision Drivers
|
|
43
|
-
- <driver 1>
|
|
44
|
-
- <driver 2>
|
|
45
|
-
|
|
46
|
-
## Considered Options
|
|
47
|
-
- Option A: <summary>
|
|
48
|
-
- Option B: <summary>
|
|
49
|
-
- Option C: <summary>
|
|
50
|
-
|
|
51
|
-
## Decision Outcome
|
|
52
|
-
Chosen option: <option>, because <justification>.
|
|
53
|
-
|
|
54
|
-
## Pros and Cons of Options
|
|
55
|
-
|
|
56
|
-
### Option A
|
|
57
|
-
- Good: <point>
|
|
58
|
-
- Bad: <point>
|
|
59
|
-
|
|
60
|
-
### Option B
|
|
61
|
-
- Good: <point>
|
|
62
|
-
- Bad: <point>
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Lightweight (for quick decisions, 5 min write)
|
|
68
|
-
|
|
69
|
-
```markdown
|
|
70
|
-
# ADR-NNN: <short title>
|
|
71
|
-
|
|
72
|
-
We chose **<decision>** over **<alternatives>** because
|
|
73
|
-
<primary reason>.
|
|
74
|
-
|
|
75
|
-
## Context
|
|
76
|
-
<1-2 sentences>
|
|
77
|
-
|
|
78
|
-
## Consequences
|
|
79
|
-
<bullet points>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## ADR Index (`docs/adr/README.md`)
|
|
85
|
-
|
|
86
|
-
```markdown
|
|
87
|
-
# Architecture Decision Records
|
|
88
|
-
|
|
89
|
-
| ADR | Title | Status | Date |
|
|
90
|
-
|-----|-------|--------|------|
|
|
91
|
-
| 001 | Use PostgreSQL for primary DB | Accepted | 2026-05-01 |
|
|
92
|
-
| 002 | API versioning via URL prefix | Proposed | 2026-05-15 |
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
When superseding, update the old ADR's status and add the link:
|
|
96
|
-
|
|
97
|
-
```markdown
|
|
98
|
-
## Status
|
|
99
|
-
Superseded by [ADR-005: New Caching Strategy](005-new-caching.md)
|
|
100
|
-
```
|
|
1
|
+
# ADR Templates
|
|
2
|
+
|
|
3
|
+
## Standard (Michael Nygard)
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# ADR-NNN: <short title>
|
|
7
|
+
|
|
8
|
+
**Date:** YYYY-MM-DD
|
|
9
|
+
**Status:** Proposed | Accepted | Deprecated | Superseded by ADR-NNN
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
<What is the issue motivating this decision?
|
|
13
|
+
What forces are at play (technical, political, social)?
|
|
14
|
+
Mention specific constraints, requirements, or tradeoffs.>
|
|
15
|
+
|
|
16
|
+
## Decision
|
|
17
|
+
<What is the change being proposed or made?
|
|
18
|
+
Be specific — technology name, version, pattern.>
|
|
19
|
+
|
|
20
|
+
## Consequences
|
|
21
|
+
<What becomes easier or harder?
|
|
22
|
+
List positive and negative outcomes.>
|
|
23
|
+
|
|
24
|
+
## Alternatives
|
|
25
|
+
<What other options were considered, and why were they rejected?
|
|
26
|
+
Keep brief — 1-2 sentences per alternative.>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## MADR (Markdown ADR) — More Structured
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
# ADR-NNN: <short title>
|
|
35
|
+
|
|
36
|
+
**Date:** YYYY-MM-DD
|
|
37
|
+
**Status:** Proposed
|
|
38
|
+
|
|
39
|
+
## Context and Problem Statement
|
|
40
|
+
<Describe the problem in 2-3 sentences.>
|
|
41
|
+
|
|
42
|
+
## Decision Drivers
|
|
43
|
+
- <driver 1>
|
|
44
|
+
- <driver 2>
|
|
45
|
+
|
|
46
|
+
## Considered Options
|
|
47
|
+
- Option A: <summary>
|
|
48
|
+
- Option B: <summary>
|
|
49
|
+
- Option C: <summary>
|
|
50
|
+
|
|
51
|
+
## Decision Outcome
|
|
52
|
+
Chosen option: <option>, because <justification>.
|
|
53
|
+
|
|
54
|
+
## Pros and Cons of Options
|
|
55
|
+
|
|
56
|
+
### Option A
|
|
57
|
+
- Good: <point>
|
|
58
|
+
- Bad: <point>
|
|
59
|
+
|
|
60
|
+
### Option B
|
|
61
|
+
- Good: <point>
|
|
62
|
+
- Bad: <point>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Lightweight (for quick decisions, 5 min write)
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
# ADR-NNN: <short title>
|
|
71
|
+
|
|
72
|
+
We chose **<decision>** over **<alternatives>** because
|
|
73
|
+
<primary reason>.
|
|
74
|
+
|
|
75
|
+
## Context
|
|
76
|
+
<1-2 sentences>
|
|
77
|
+
|
|
78
|
+
## Consequences
|
|
79
|
+
<bullet points>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## ADR Index (`docs/adr/README.md`)
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
# Architecture Decision Records
|
|
88
|
+
|
|
89
|
+
| ADR | Title | Status | Date |
|
|
90
|
+
|-----|-------|--------|------|
|
|
91
|
+
| 001 | Use PostgreSQL for primary DB | Accepted | 2026-05-01 |
|
|
92
|
+
| 002 | API versioning via URL prefix | Proposed | 2026-05-15 |
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
When superseding, update the old ADR's status and add the link:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
## Status
|
|
99
|
+
Superseded by [ADR-005: New Caching Strategy](005-new-caching.md)
|
|
100
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# adr Scripts
|
|
2
|
-
|
|
3
|
-
Placeholder for ADR utility scripts. Future candidates:
|
|
4
|
-
- `adr-init.py` — Initialize `docs/adr/` with README index
|
|
5
|
-
- `adr-list.py` — List all ADRs with status
|
|
1
|
+
# adr Scripts
|
|
2
|
+
|
|
3
|
+
Placeholder for ADR utility scripts. Future candidates:
|
|
4
|
+
- `adr-init.py` — Initialize `docs/adr/` with README index
|
|
5
|
+
- `adr-list.py` — List all ADRs with status
|