opencode-sa-assistant 0.1.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 -0
- package/README.md +174 -0
- package/package.json +51 -0
- package/src/hooks/wadd-mode.ts +71 -0
- package/src/index.ts +9 -0
- package/src/prompts/gurus.ts +480 -0
- package/src/prompts/orchestrator.ts +316 -0
- package/src/prompts/specialists.ts +370 -0
- package/src/skills/docx/SKILL.md +307 -0
- package/src/skills/guru/SKILL.md +217 -0
- package/src/skills/mcp/SKILL.md +170 -0
- package/src/skills/pptx/SKILL.md +110 -0
- package/src/skills/pptx/references/sa_pptx_template.md +89 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jisan Bang
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# opencode-sa-assistant
|
|
2
|
+
|
|
3
|
+
OpenCode plugin for AWS Solutions Architect assistance with multi-agent Guru system.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This plugin activates when you use the `wadd` keyword in your messages, transforming OpenCode into an AWS Solutions Architect assistant powered by 7 specialized agents:
|
|
8
|
+
|
|
9
|
+
**4 Guru Agents** (Philosophy & Wisdom):
|
|
10
|
+
- `sa-bezos`: Customer Obsession, Day 1, Working Backwards
|
|
11
|
+
- `sa-vogels`: Distributed Systems, Design for Failure
|
|
12
|
+
- `sa-naval`: Leverage, Asymmetric Outcomes
|
|
13
|
+
- `sa-feynman`: Simplification, First Principles
|
|
14
|
+
|
|
15
|
+
**3 Specialist Agents** (Execution):
|
|
16
|
+
- `sa-explorer`: Architecture analysis, diagram interpretation
|
|
17
|
+
- `sa-researcher`: AWS service information via MCP tools
|
|
18
|
+
- `sa-reviewer`: Well-Architected Framework reviews (6 pillars)
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
β¨ **WADD Mode Activation**: Type `wadd` to activate SA mode
|
|
23
|
+
π§ **Multi-Agent System**: 4 Gurus + 3 Specialists working together
|
|
24
|
+
π **Guru_Mandate**: Automatic expert consultation based on context
|
|
25
|
+
ποΈ **Well-Architected Framework**: All 6 pillars integrated
|
|
26
|
+
π **AWS MCP Tools**: Real-time AWS documentation access
|
|
27
|
+
π°π· **Bilingual**: Korean prose + English technical terms
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# From the repository root
|
|
33
|
+
cd packages/opencode-sa-assistant
|
|
34
|
+
bun install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
### Basic Activation
|
|
40
|
+
|
|
41
|
+
In OpenCode, simply start your message with `wadd`:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
wadd μ΄ Lambda μν€ν
μ²λ₯Ό 리뷰ν΄μ€
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The plugin will:
|
|
48
|
+
1. Detect the `wadd` keyword (case-insensitive, word boundary)
|
|
49
|
+
2. Activate SA mode (sets model to "max" variant)
|
|
50
|
+
3. Inject the SA Orchestrator system prompt
|
|
51
|
+
4. Consult appropriate Gurus based on Guru_Mandate rules
|
|
52
|
+
|
|
53
|
+
### Guru_Mandate Rules
|
|
54
|
+
|
|
55
|
+
The orchestrator automatically consults Gurus based on context:
|
|
56
|
+
|
|
57
|
+
| Scenario | Gurus Consulted |
|
|
58
|
+
|----------|-----------------|
|
|
59
|
+
| Architecture design/review | vogels + bezos |
|
|
60
|
+
| Cost decisions | naval + bezos |
|
|
61
|
+
| Learning/explanation | feynman + relevant guru |
|
|
62
|
+
| System design | vogels + naval |
|
|
63
|
+
| Security/compliance | vogels + bezos |
|
|
64
|
+
| Innovation | bezos + feynman |
|
|
65
|
+
|
|
66
|
+
### Direct Agent Invocation
|
|
67
|
+
|
|
68
|
+
You can also directly request specific agents:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
wadd bezosμκ² κ³ κ° κ²½ν κ΄μ μμ μ΄ κΈ°λ₯μ νκ°ν΄λ¬λΌκ³ ν΄μ€
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Skills
|
|
75
|
+
|
|
76
|
+
The plugin includes 4 skill modules:
|
|
77
|
+
|
|
78
|
+
- **guru**: Guru consultation patterns and philosophies
|
|
79
|
+
- **mcp**: AWS MCP tools reference (search_documentation, read_documentation)
|
|
80
|
+
- **docx**: AWS Blog-style document generation guidelines
|
|
81
|
+
- **pptx**: SA presentation templates
|
|
82
|
+
|
|
83
|
+
Skills are automatically loaded when needed.
|
|
84
|
+
|
|
85
|
+
## Testing
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Run all tests
|
|
89
|
+
bun test
|
|
90
|
+
|
|
91
|
+
# Run specific test file
|
|
92
|
+
bun test src/__tests__/integration.test.ts
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Test Coverage**: 65 tests, 212 assertions, 100% pass rate
|
|
96
|
+
|
|
97
|
+
## Development
|
|
98
|
+
|
|
99
|
+
### Project Structure
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
packages/opencode-sa-assistant/
|
|
103
|
+
βββ src/
|
|
104
|
+
β βββ index.ts # Plugin entry point
|
|
105
|
+
β βββ hooks/wadd-mode.ts # WADD keyword detection
|
|
106
|
+
β βββ prompts/
|
|
107
|
+
β β βββ orchestrator.ts # SA Orchestrator
|
|
108
|
+
β β βββ gurus.ts # 4 Guru agents
|
|
109
|
+
β β βββ specialists.ts # 3 Specialist agents
|
|
110
|
+
β βββ skills/
|
|
111
|
+
β β βββ guru/SKILL.md
|
|
112
|
+
β β βββ mcp/SKILL.md
|
|
113
|
+
β β βββ docx/SKILL.md
|
|
114
|
+
β β βββ pptx/SKILL.md
|
|
115
|
+
β βββ __tests__/
|
|
116
|
+
β βββ *.test.ts # 65 tests
|
|
117
|
+
βββ package.json
|
|
118
|
+
βββ tsconfig.json
|
|
119
|
+
βββ bunfig.toml
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Tech Stack
|
|
123
|
+
|
|
124
|
+
- **Runtime**: Bun
|
|
125
|
+
- **Language**: TypeScript
|
|
126
|
+
- **Testing**: Bun test
|
|
127
|
+
- **Plugin SDK**: @opencode-ai/plugin
|
|
128
|
+
|
|
129
|
+
## Well-Architected Framework
|
|
130
|
+
|
|
131
|
+
The reviewer specialist covers all 6 pillars:
|
|
132
|
+
|
|
133
|
+
1. **μ΄μ μ°μμ±** (Operational Excellence)
|
|
134
|
+
2. **보μ** (Security)
|
|
135
|
+
3. **μμ μ±** (Reliability)
|
|
136
|
+
4. **μ±λ₯ ν¨μ¨μ±** (Performance Efficiency)
|
|
137
|
+
5. **λΉμ© μ΅μ ν** (Cost Optimization)
|
|
138
|
+
6. **μ§μ κ°λ₯μ±** (Sustainability)
|
|
139
|
+
|
|
140
|
+
## AWS MCP Integration
|
|
141
|
+
|
|
142
|
+
The plugin integrates with AWS Documentation MCP for real-time information:
|
|
143
|
+
|
|
144
|
+
- `aws-docs_search_documentation`: Search AWS documentation
|
|
145
|
+
- `aws-docs_read_documentation`: Fetch specific documentation pages
|
|
146
|
+
- `aws-docs_recommend`: Get related documentation
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
[Your License Here]
|
|
151
|
+
|
|
152
|
+
## Author
|
|
153
|
+
|
|
154
|
+
Jisan Bang (wltks2155@gmail.com)
|
|
155
|
+
|
|
156
|
+
## Contributing
|
|
157
|
+
|
|
158
|
+
Contributions are welcome! Please ensure:
|
|
159
|
+
- All tests pass (`bun test`)
|
|
160
|
+
- TDD protocol followed (RED β GREEN β REFACTOR)
|
|
161
|
+
- Korean + English bilingual content preserved
|
|
162
|
+
- Conventional commit format used
|
|
163
|
+
|
|
164
|
+
## Changelog
|
|
165
|
+
|
|
166
|
+
### v0.1.0 (2026-02-05)
|
|
167
|
+
|
|
168
|
+
- Initial release
|
|
169
|
+
- 7 agent types (4 Gurus + 3 Specialists)
|
|
170
|
+
- WADD mode activation
|
|
171
|
+
- Guru_Mandate consultation system
|
|
172
|
+
- Well-Architected Framework integration
|
|
173
|
+
- AWS MCP tools support
|
|
174
|
+
- 65 tests, 100% pass rate
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-sa-assistant",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "src/index.ts",
|
|
6
|
+
"description": "OpenCode plugin for AWS Solutions Architect assistant with multi-agent Guru system",
|
|
7
|
+
"author": "Jisan Bang <wltks2155@gmail.com>",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/onesuit/SaAssistant.git",
|
|
12
|
+
"directory": "packages/opencode-sa-assistant"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/onesuit/SaAssistant/tree/main/packages/opencode-sa-assistant#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/onesuit/SaAssistant/issues"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"opencode-plugin",
|
|
20
|
+
"aws",
|
|
21
|
+
"solutions-architect",
|
|
22
|
+
"well-architected",
|
|
23
|
+
"multi-agent",
|
|
24
|
+
"guru",
|
|
25
|
+
"architecture-review",
|
|
26
|
+
"opencode"
|
|
27
|
+
],
|
|
28
|
+
"files": [
|
|
29
|
+
"src/**/*.ts",
|
|
30
|
+
"!src/**/*.test.ts",
|
|
31
|
+
"!src/__tests__/**",
|
|
32
|
+
"src/**/*.md",
|
|
33
|
+
"README.md",
|
|
34
|
+
"LICENSE"
|
|
35
|
+
],
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"import": "./src/index.ts",
|
|
39
|
+
"types": "./src/index.ts"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@opencode-ai/plugin": "*"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/bun": "latest"
|
|
47
|
+
},
|
|
48
|
+
"engines": {
|
|
49
|
+
"bun": ">=1.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WADD Mode Activation System
|
|
3
|
+
*
|
|
4
|
+
* Detects "wadd" keyword and activates AWS Solutions Architect mode.
|
|
5
|
+
* Uses word boundary regex to prevent false positives.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { SA_ORCHESTRATOR_PROMPT } from "../prompts/orchestrator";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Regex pattern for WADD keyword detection
|
|
12
|
+
* - \b: Word boundary (prevents matching "wa", "wadding", "mywadd")
|
|
13
|
+
* - i flag: Case-insensitive matching
|
|
14
|
+
*/
|
|
15
|
+
const WADD_PATTERN = /\bwadd\b/i;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Detects if content contains the WADD keyword
|
|
19
|
+
* @param content - User message content to check
|
|
20
|
+
* @returns true if WADD keyword found, false otherwise
|
|
21
|
+
*/
|
|
22
|
+
export function detectWaddKeyword(content: string): boolean {
|
|
23
|
+
return WADD_PATTERN.test(content);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Activates SA mode by modifying message properties
|
|
28
|
+
* @param message - Message object to modify
|
|
29
|
+
*/
|
|
30
|
+
export function activateSAMode(message: any): void {
|
|
31
|
+
// Set variant to "max" for best model
|
|
32
|
+
message.variant = "max";
|
|
33
|
+
|
|
34
|
+
// Prepend SA mode activation marker
|
|
35
|
+
// (Full orchestrator prompt will be added in Task 5)
|
|
36
|
+
message.content = `[SA MODE ACTIVATED]\n\n${message.content}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Hook: chat.message
|
|
41
|
+
* Intercepts user messages to detect WADD keyword and activate SA mode
|
|
42
|
+
*/
|
|
43
|
+
export const chatMessageHook = async (input: any, output: any) => {
|
|
44
|
+
if (detectWaddKeyword(input.message.content)) {
|
|
45
|
+
activateSAMode(output.message);
|
|
46
|
+
|
|
47
|
+
// Show toast notification if API available
|
|
48
|
+
if (output.toasts) {
|
|
49
|
+
output.toasts.push({
|
|
50
|
+
type: "info",
|
|
51
|
+
title: "SA Assistant Mode",
|
|
52
|
+
message: "AWS Solutions Architect mode activated"
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Hook: experimental.chat.system.transform
|
|
60
|
+
* Injects SA orchestrator system prompt when SA mode is active
|
|
61
|
+
*/
|
|
62
|
+
export const systemTransformHook = async (input: any, output: any) => {
|
|
63
|
+
// Check if SA mode is active by scanning message history
|
|
64
|
+
const hasWadd = input.messages?.some((m: any) =>
|
|
65
|
+
m.content && detectWaddKeyword(m.content)
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
if (hasWadd) {
|
|
69
|
+
output.system = `${output.system || ""}\n\n${SA_ORCHESTRATOR_PROMPT}`;
|
|
70
|
+
}
|
|
71
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Plugin } from "@opencode-ai/plugin";
|
|
2
|
+
import { chatMessageHook, systemTransformHook } from "./hooks/wadd-mode";
|
|
3
|
+
|
|
4
|
+
export const SaAssistantPlugin: Plugin = async (ctx) => {
|
|
5
|
+
return {
|
|
6
|
+
"chat.message": chatMessageHook,
|
|
7
|
+
"experimental.chat.system.transform": systemTransformHook,
|
|
8
|
+
};
|
|
9
|
+
};
|