@adityaaria/spark 6.0.3
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/.claude-plugin/marketplace.json +20 -0
- package/.claude-plugin/plugin.json +20 -0
- package/.codex-plugin/plugin.json +48 -0
- package/.cursor-plugin/plugin.json +23 -0
- package/.kimi-plugin/plugin.json +38 -0
- package/.opencode/INSTALL.md +115 -0
- package/.opencode/plugins/spark.js +139 -0
- package/.pi/extensions/spark.ts +121 -0
- package/.version-bump.json +21 -0
- package/CLAUDE.md +115 -0
- package/CODE_OF_CONDUCT.md +128 -0
- package/GEMINI.md +2 -0
- package/LICENSE +21 -0
- package/README.md +282 -0
- package/RELEASE-NOTES.md +1299 -0
- package/assets/app-icon.png +0 -0
- package/assets/spark-small.svg +1 -0
- package/bin/spark.js +7 -0
- package/docs/README.kimi.md +94 -0
- package/docs/README.opencode.md +170 -0
- package/docs/porting-to-a-new-harness.md +830 -0
- package/gemini-extension.json +6 -0
- package/hooks/hooks-codex.json +16 -0
- package/hooks/hooks-cursor.json +10 -0
- package/hooks/hooks.json +16 -0
- package/hooks/run-hook.cmd +46 -0
- package/hooks/session-start +49 -0
- package/hooks/session-start-codex +26 -0
- package/package.json +52 -0
- package/skills/brainstorming/SKILL.md +159 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +722 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +298 -0
- package/skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/SKILL.md +241 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/SKILL.md +103 -0
- package/skills/requesting-code-review/code-reviewer.md +172 -0
- package/skills/subagent-driven-development/SKILL.md +418 -0
- package/skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/skills/subagent-driven-development/scripts/review-package +44 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/skills/subagent-driven-development/scripts/task-brief +40 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/using-git-worktrees/SKILL.md +202 -0
- package/skills/using-spark/SKILL.md +121 -0
- package/skills/using-spark/references/antigravity-tools.md +96 -0
- package/skills/using-spark/references/claude-code-tools.md +50 -0
- package/skills/using-spark/references/codex-tools.md +72 -0
- package/skills/using-spark/references/copilot-tools.md +49 -0
- package/skills/using-spark/references/gemini-tools.md +63 -0
- package/skills/using-spark/references/pi-tools.md +28 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/writing-plans/SKILL.md +174 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/writing-skills/SKILL.md +689 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/writing-skills/render-graphs.js +168 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/src/cli/index.js +26 -0
- package/src/cli/install.js +47 -0
- package/src/cli/output.js +11 -0
- package/src/cli/parse-args.js +46 -0
- package/src/cli/prompt.js +10 -0
- package/src/installer/adapters/common.js +59 -0
- package/src/installer/adapters/extension-style.js +67 -0
- package/src/installer/adapters/shell-hook.js +57 -0
- package/src/installer/detect.js +168 -0
- package/src/installer/errors.js +7 -0
- package/src/installer/registry.js +35 -0
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="Calque_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M394.28,207.8c.81,2.41,1.39,4.78,1.8,7.07,1.61,9.03-.93,17.78-5.99,21.74-22.6,17.7-49.85,29.35-75.34,38.6-.59.22-1.09.28-1.4.34-2.22.47-4.95,1.04-7.25,0-1.46-.66-2.25-1.74-2.66-2.3-1.56-2.1-1.59-4.31-1.56-5.13.1-2.67-.01-4.69,0-4.82.45-3.52.91-10.66,1.41-21.28.6-3.87,2.16-9.63,6.94-13.96,4.01-3.62,8.33-4.6,14.59-5.87,10.76-2.19,37.21-8.22,47.42-16.56,1.63-1.33,2.97-2.65,4.19-3.96,3.72-3.99,6.39-7.92,7.93-10.36,3.22,3.22,7.25,8.48,9.92,16.47Z"/><path d="M428.67,185.28c-2.33,11.99-8.91,22.32-15.88,30.38.27-5.5-.05-12.11-1.86-19.08-5.04-19.36-19.74-34.7-37.78-37.78-32.21-9.74-70.59,3.79-99.08,18.29-3.87,1.95-9.52-2.77-11.84-8.16-3.32-7.71-1.63-6.28,2.61-8.49,38.31-20.03,82.01-39.61,123.91-29.7,8.26,1.95,15.96,5.26,23.48,10.54,11.32,7.96,20.21,24.74,16.44,44Z"/><path d="M117.72,304.2c-.81-2.41-1.39-4.78-1.8-7.07-1.61-9.03.93-17.78,5.99-21.74,22.6-17.7,49.85-29.35,75.34-38.6.59-.22,1.09-.28,1.4-.34,2.22-.47,4.95-1.04,7.25,0,1.46.66,2.25,1.74,2.66,2.3,1.56,2.1,1.59,4.31,1.56,5.13-.1,2.67.01,4.69,0,4.82-.45,3.52-.91,10.66-1.41,21.28-.6,3.87-2.16,9.63-6.94,13.96-4.01,3.62-8.33,4.6-14.59,5.87-10.76,2.19-37.21,8.22-47.42,16.56-1.63,1.33-2.97,2.65-4.19,3.96-3.72,3.99-6.39,7.92-7.93,10.36-3.22-3.22-7.25-8.48-9.92-16.47Z"/><path d="M83.33,326.72c2.33-11.99,8.91-22.32,15.88-30.38-.27,5.5.05,12.11,1.86,19.08,5.04,19.36,19.74,34.7,37.78,37.78,32.21,9.74,70.59-3.79,99.08-18.29,3.87-1.95,9.52,2.77,11.84,8.16,3.32,7.71,1.63,6.28-2.61,8.49-38.31,20.03-82.01,39.61-123.91,29.7-8.26-1.95-15.96-5.26-23.48-10.54-11.32-7.96-20.21-24.74-16.44-44Z"/><ellipse cx="255.16" cy="258.86" rx="28.95" ry="28.76"/></svg>
|
package/bin/spark.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# SPARK for Kimi Code
|
|
2
|
+
|
|
3
|
+
Complete guide for using SPARK with [Kimi Code](https://github.com/MoonshotAI/kimi-code).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
SPARK is available in Kimi Code's plugin marketplace.
|
|
8
|
+
|
|
9
|
+
Open the plugin manager:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
/plugins
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Go to `Marketplace` > `SPARK` and install it.
|
|
16
|
+
|
|
17
|
+
If you prefer the new npm front door, you can also run:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
npx @adityaaria/spark install --harness kimi
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
You can also install from this repository:
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
/plugins install https://github.com/adityaaria/SPARK
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For unreleased validation against `dev`, pin the branch explicitly:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
/plugins install https://github.com/adityaaria/SPARK/tree/dev
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Kimi Code applies plugin changes to new sessions. After installing, updating, enabling, disabling, or reloading a plugin, start a fresh session with `/new`.
|
|
36
|
+
|
|
37
|
+
## How It Works
|
|
38
|
+
|
|
39
|
+
The Kimi plugin manifest lives at `.kimi-plugin/plugin.json`.
|
|
40
|
+
|
|
41
|
+
The manifest does three things:
|
|
42
|
+
|
|
43
|
+
1. Points Kimi Code at the existing `skills/` directory.
|
|
44
|
+
2. Loads `using-spark` at session start through `sessionStart.skill`.
|
|
45
|
+
3. Provides Kimi-specific tool mapping through `skillInstructions`.
|
|
46
|
+
|
|
47
|
+
Kimi Code reads SPARK skills from this repository. There are no copied skills, symlinks, hooks, or extra runtime dependencies.
|
|
48
|
+
|
|
49
|
+
## Tool Mapping
|
|
50
|
+
|
|
51
|
+
Skills describe actions instead of hard-coding one runtime's tool names. On Kimi Code these resolve to:
|
|
52
|
+
|
|
53
|
+
- "Ask the user" / "ask clarifying questions" -> `AskUserQuestion`
|
|
54
|
+
- "Create a todo" / "mark complete in todo list" -> `TodoList`
|
|
55
|
+
- "Dispatch a subagent" -> `Agent`
|
|
56
|
+
- "Invoke a skill" -> Kimi Code's native `Skill` tool
|
|
57
|
+
- "Read a file" / "write a file" / "edit a file" -> `Read`, `Write`, `Edit`
|
|
58
|
+
- "Run a shell command" -> `Bash`
|
|
59
|
+
- "Search file contents" -> `Grep`
|
|
60
|
+
- "Find files by path or pattern" -> `Glob`
|
|
61
|
+
- "Fetch a URL" -> `FetchURL`
|
|
62
|
+
- "Search the web" -> `WebSearch`
|
|
63
|
+
|
|
64
|
+
## Updating
|
|
65
|
+
|
|
66
|
+
Use Kimi Code's plugin manager:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
/plugins
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Select SPARK and update it from there. Start a fresh session with `/new` after updating.
|
|
73
|
+
|
|
74
|
+
## Troubleshooting
|
|
75
|
+
|
|
76
|
+
### Plugin not loading
|
|
77
|
+
|
|
78
|
+
1. Run `/plugins info spark` and check diagnostics.
|
|
79
|
+
2. Make sure the plugin is enabled.
|
|
80
|
+
3. Start a fresh session with `/new` after install or update.
|
|
81
|
+
|
|
82
|
+
### Direct GitHub install used an old release
|
|
83
|
+
|
|
84
|
+
Kimi Code installs the latest GitHub release for a bare repository URL when one exists. To test unreleased changes before the next SPARK release, install the branch explicitly:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
/plugins install https://github.com/adityaaria/SPARK/tree/dev
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Skills not triggering
|
|
91
|
+
|
|
92
|
+
1. Confirm `/plugins info spark` shows the plugin enabled.
|
|
93
|
+
2. Start a fresh session with `/new`.
|
|
94
|
+
3. Try the acceptance prompt: `Let's make a react todo list`. A working install should load `brainstorming` before writing code.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# SPARK for OpenCode
|
|
2
|
+
|
|
3
|
+
Complete guide for using SPARK with [OpenCode.ai](https://opencode.ai).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add spark to the `plugin` array in your `opencode.json` (global or project-level):
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
{
|
|
11
|
+
"plugin": ["spark@git+https://github.com/adityaaria/SPARK.git"]
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Restart OpenCode. The plugin installs through OpenCode's plugin manager and
|
|
16
|
+
registers all skills.
|
|
17
|
+
|
|
18
|
+
If you want a single front door that can detect or ask for the harness before
|
|
19
|
+
installing, run:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @adityaaria/spark install --harness opencode
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Verify by asking: "Tell me about your spark"
|
|
26
|
+
|
|
27
|
+
OpenCode uses its own plugin install. If you also use Claude Code, Codex, or
|
|
28
|
+
another harness, install SPARK separately for each one.
|
|
29
|
+
|
|
30
|
+
### Migrating from the old symlink-based install
|
|
31
|
+
|
|
32
|
+
If you previously installed spark using `git clone` and symlinks, remove the old setup:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Remove old symlinks
|
|
36
|
+
rm -f ~/.config/opencode/plugins/spark.js
|
|
37
|
+
rm -rf ~/.config/opencode/skills/spark
|
|
38
|
+
|
|
39
|
+
# Optionally remove the cloned repo
|
|
40
|
+
rm -rf ~/.config/opencode/spark
|
|
41
|
+
|
|
42
|
+
# Remove skills.paths from opencode.json if you added one for spark
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then follow the installation steps above.
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
### Finding Skills
|
|
50
|
+
|
|
51
|
+
Use OpenCode's native `skill` tool to list all available skills:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
use skill tool to list skills
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Loading a Skill
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
use skill tool to load brainstorming
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Personal Skills
|
|
64
|
+
|
|
65
|
+
Create your own skills in `~/.config/opencode/skills/`:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
mkdir -p ~/.config/opencode/skills/my-skill
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Create `~/.config/opencode/skills/my-skill/SKILL.md`:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
---
|
|
75
|
+
name: my-skill
|
|
76
|
+
description: Use when [condition] - [what it does]
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
# My Skill
|
|
80
|
+
|
|
81
|
+
[Your skill content here]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Project Skills
|
|
85
|
+
|
|
86
|
+
Create project-specific skills in `.opencode/skills/` within your project.
|
|
87
|
+
|
|
88
|
+
**Skill Priority:** Project skills > Personal skills > SPARK skills
|
|
89
|
+
|
|
90
|
+
## Updating
|
|
91
|
+
|
|
92
|
+
OpenCode installs SPARK through a git-backed package spec. Some OpenCode
|
|
93
|
+
and Bun versions pin that resolved git dependency in a lockfile or cache, so a
|
|
94
|
+
restart may not pick up the newest SPARK commit. If updates do not appear,
|
|
95
|
+
clear OpenCode's package cache or reinstall the plugin.
|
|
96
|
+
|
|
97
|
+
To pin a specific version, use a branch or tag:
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"plugin": ["spark@git+https://github.com/adityaaria/SPARK.git#v5.0.3"]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## How It Works
|
|
106
|
+
|
|
107
|
+
The plugin does two things:
|
|
108
|
+
|
|
109
|
+
1. **Injects bootstrap context** via the `experimental.chat.messages.transform` hook, adding spark awareness to every conversation.
|
|
110
|
+
2. **Registers the skills directory** via the `config` hook, so OpenCode discovers all spark skills without symlinks or manual config.
|
|
111
|
+
|
|
112
|
+
### Tool Mapping
|
|
113
|
+
|
|
114
|
+
Skills speak in actions rather than naming any one runtime's tools. On OpenCode these resolve to:
|
|
115
|
+
|
|
116
|
+
- "Create a todo" / "mark complete in todo list" → `todowrite`
|
|
117
|
+
- `Subagent (general-purpose):` template → OpenCode's `task` tool with `subagent_type: "general"` (or `"explore"` for codebase exploration)
|
|
118
|
+
- "Invoke a skill" → OpenCode's native `skill` tool
|
|
119
|
+
- "Read a file" → `read`
|
|
120
|
+
- "Create a file" / "edit a file" / "delete a file" → `apply_patch`
|
|
121
|
+
- "Run a shell command" → `bash`
|
|
122
|
+
- "Search file contents" / "find files by name" → `grep`, `glob`
|
|
123
|
+
- "Fetch a URL" → `webfetch`
|
|
124
|
+
|
|
125
|
+
(Verified against the installed OpenCode CLI's tool inventory.)
|
|
126
|
+
|
|
127
|
+
## Troubleshooting
|
|
128
|
+
|
|
129
|
+
### Plugin not loading
|
|
130
|
+
|
|
131
|
+
1. Check OpenCode logs: `opencode run --print-logs "hello" 2>&1 | grep -i spark`
|
|
132
|
+
2. Verify the plugin line in your `opencode.json` is correct
|
|
133
|
+
3. Make sure you're running a recent version of OpenCode
|
|
134
|
+
|
|
135
|
+
### Windows install issues
|
|
136
|
+
|
|
137
|
+
Some Windows OpenCode builds have upstream installer issues with git-backed
|
|
138
|
+
plugin specs, including cache paths for `git+https` URLs and Bun not finding
|
|
139
|
+
`git.exe` even when it works in a normal terminal. If OpenCode cannot install
|
|
140
|
+
the plugin, try installing with system npm and pointing OpenCode at the local
|
|
141
|
+
package:
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
npm install spark@git+https://github.com/adityaaria/SPARK.git --prefix "$HOME\.config\opencode"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Then use the installed package path in `opencode.json`:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"plugin": ["~/.config/opencode/node_modules/spark"]
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Skills not found
|
|
156
|
+
|
|
157
|
+
1. Use OpenCode's `skill` tool to list available skills
|
|
158
|
+
2. Check that the plugin is loading (see above)
|
|
159
|
+
3. Each skill needs a `SKILL.md` file with valid YAML frontmatter
|
|
160
|
+
|
|
161
|
+
### Bootstrap not appearing
|
|
162
|
+
|
|
163
|
+
1. Check OpenCode version supports `experimental.chat.messages.transform` hook
|
|
164
|
+
2. Restart OpenCode after config changes
|
|
165
|
+
|
|
166
|
+
## Getting Help
|
|
167
|
+
|
|
168
|
+
- Report issues: https://github.com/adityaaria/SPARK/issues
|
|
169
|
+
- Main documentation: https://github.com/adityaaria/SPARK
|
|
170
|
+
- OpenCode docs: https://opencode.ai/docs/
|