my-opencode 1.3.4 → 2.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 (46) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +299 -270
  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 +198 -198
  16. package/opencode.json +218 -170
  17. package/package.json +53 -51
  18. package/plugins/README.md +67 -67
  19. package/plugins/provider-profile.mjs +203 -194
  20. package/scripts/postinstall.js +202 -202
  21. package/scripts/validate-role-flow.mjs +90 -0
  22. package/skills/adr/SKILL.md +91 -91
  23. package/skills/adr/references/templates.md +100 -100
  24. package/skills/adr/scripts/README.md +5 -5
  25. package/skills/design-evidence/SKILL.md +56 -0
  26. package/skills/dev-flow/SKILL.md +126 -188
  27. package/skills/dev-flow/references/code-phase.md +35 -72
  28. package/skills/dev-flow/references/contract-phase.md +66 -81
  29. package/skills/dev-flow/references/verify-phase.md +70 -129
  30. package/skills/dev-flow/scripts/README.md +3 -3
  31. package/skills/docs-gen/SKILL.md +162 -162
  32. package/skills/docs-gen/references/doc-styles.md +216 -216
  33. package/skills/docs-gen/scripts/README.md +5 -5
  34. package/skills/orchestrate/SKILL.md +63 -112
  35. package/skills/orchestrate/references/orchestration-patterns.md +49 -56
  36. package/skills/pr-review/SKILL.md +110 -110
  37. package/skills/pr-review/references/review-dimensions.md +117 -117
  38. package/skills/pr-review/references/security-checklist.md +122 -122
  39. package/skills/pr-review/scripts/README.md +5 -5
  40. package/skills/test-gen/SKILL.md +143 -143
  41. package/skills/test-gen/references/framework-detection.md +105 -105
  42. package/skills/test-gen/references/test-patterns.md +260 -260
  43. package/skills/test-gen/scripts/README.md +5 -5
  44. package/agents/executor.md +0 -30
  45. package/agents/fullstack-dev.md +0 -57
  46. package/agents/spec-writer.md +0 -37
@@ -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
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: design-evidence
3
+ description: |
4
+ Convert Figma, screenshots, wireframes, prototypes, or other UI/UX inputs into a traceable Design Evidence Pack.
5
+ Use when a feature starts from visual or interaction design and before business or technical specifications are written.
6
+ Triggers on: "design evidence", "Figma", "screenshot", "wireframe", "prototype", "UI flow", "evidence pack"
7
+ ---
8
+
9
+ # Design Evidence
10
+
11
+ Design input is evidence, not a complete product or technical specification. Extract what is visible, separate it from interpretation, and make unresolved decisions explicit before downstream roles write requirements or code.
12
+
13
+ ## Required Output
14
+
15
+ Create `docs/specs/<feature>/evidence-pack.md` with one or more entries using this format:
16
+
17
+ ```markdown
18
+ ## EVID-001
19
+
20
+ - source: Figma node URL | screenshot path | prototype URL | wireframe reference
21
+ - type: screen | component | interaction | token | asset
22
+ - status: observed | inferred | unknown
23
+ - confidence: high | medium | low
24
+ - related_nodes: <frame/component IDs or none>
25
+ - observed: <what the source explicitly shows>
26
+ - inferred: <reasonable interpretation, or none>
27
+ - unknown: <unresolved business, technical, state, permission, or accessibility questions>
28
+ ```
29
+
30
+ Every entry MUST have a source, confidence, and at least one of `observed`, `inferred`, or `unknown`. Do not promote an inference into a requirement.
31
+
32
+ ## Evidence Inventory
33
+
34
+ Cover these dimensions when the input supports them:
35
+
36
+ - Screen and structure: route, frame, tab, modal, drawer, navigation, component, variant, props, token, and asset.
37
+ - Behavior and state: loading, empty, error, success, disabled, read-only, permission denied, validation, confirmation, retry, undo, and duplicate submission.
38
+ - Responsive and usability: viewport, breakpoint, long text, large numbers, overflow, keyboard, focus, accessible name, and contrast.
39
+
40
+ If the only input is a screenshot or wireframe, mark the feature `prototype` in `docs/specs/<feature>/README.md`. It is not ready for implementation until unknowns are resolved or explicitly accepted.
41
+
42
+ ## Handoff Rules
43
+
44
+ 1. Pass evidence IDs to `business-analyst`; do not decide business meaning here.
45
+ 2. Pass the same evidence IDs to `system-designer`; do not invent API or database behavior here.
46
+ 3. Preserve unknowns until the owning role resolves them.
47
+ 4. Use stable IDs so requirements, contracts, and verification can link back to the source.
48
+
49
+ ## Quality Gate
50
+
51
+ The pack is ready for the next phase only when:
52
+
53
+ - Every screen and interaction has a source.
54
+ - Observations, inferences, and unknowns are visibly separated.
55
+ - UI states and responsive/accessibility concerns have been inventoried or marked unknown.
56
+ - The source version and approved/prototype status are recorded.