@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.
Files changed (91) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.claude-plugin/plugin.json +20 -0
  3. package/.codex-plugin/plugin.json +48 -0
  4. package/.cursor-plugin/plugin.json +23 -0
  5. package/.kimi-plugin/plugin.json +38 -0
  6. package/.opencode/INSTALL.md +115 -0
  7. package/.opencode/plugins/spark.js +139 -0
  8. package/.pi/extensions/spark.ts +121 -0
  9. package/.version-bump.json +21 -0
  10. package/CLAUDE.md +115 -0
  11. package/CODE_OF_CONDUCT.md +128 -0
  12. package/GEMINI.md +2 -0
  13. package/LICENSE +21 -0
  14. package/README.md +282 -0
  15. package/RELEASE-NOTES.md +1299 -0
  16. package/assets/app-icon.png +0 -0
  17. package/assets/spark-small.svg +1 -0
  18. package/bin/spark.js +7 -0
  19. package/docs/README.kimi.md +94 -0
  20. package/docs/README.opencode.md +170 -0
  21. package/docs/porting-to-a-new-harness.md +830 -0
  22. package/gemini-extension.json +6 -0
  23. package/hooks/hooks-codex.json +16 -0
  24. package/hooks/hooks-cursor.json +10 -0
  25. package/hooks/hooks.json +16 -0
  26. package/hooks/run-hook.cmd +46 -0
  27. package/hooks/session-start +49 -0
  28. package/hooks/session-start-codex +26 -0
  29. package/package.json +52 -0
  30. package/skills/brainstorming/SKILL.md +159 -0
  31. package/skills/brainstorming/scripts/frame-template.html +213 -0
  32. package/skills/brainstorming/scripts/helper.js +167 -0
  33. package/skills/brainstorming/scripts/server.cjs +722 -0
  34. package/skills/brainstorming/scripts/start-server.sh +209 -0
  35. package/skills/brainstorming/scripts/stop-server.sh +120 -0
  36. package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  37. package/skills/brainstorming/visual-companion.md +298 -0
  38. package/skills/dispatching-parallel-agents/SKILL.md +185 -0
  39. package/skills/executing-plans/SKILL.md +70 -0
  40. package/skills/finishing-a-development-branch/SKILL.md +241 -0
  41. package/skills/receiving-code-review/SKILL.md +213 -0
  42. package/skills/requesting-code-review/SKILL.md +103 -0
  43. package/skills/requesting-code-review/code-reviewer.md +172 -0
  44. package/skills/subagent-driven-development/SKILL.md +418 -0
  45. package/skills/subagent-driven-development/implementer-prompt.md +139 -0
  46. package/skills/subagent-driven-development/scripts/review-package +44 -0
  47. package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
  48. package/skills/subagent-driven-development/scripts/task-brief +40 -0
  49. package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
  50. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  51. package/skills/systematic-debugging/SKILL.md +296 -0
  52. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  53. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  54. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  55. package/skills/systematic-debugging/find-polluter.sh +63 -0
  56. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  57. package/skills/systematic-debugging/test-academic.md +14 -0
  58. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  59. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  60. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  61. package/skills/test-driven-development/SKILL.md +371 -0
  62. package/skills/test-driven-development/testing-anti-patterns.md +299 -0
  63. package/skills/using-git-worktrees/SKILL.md +202 -0
  64. package/skills/using-spark/SKILL.md +121 -0
  65. package/skills/using-spark/references/antigravity-tools.md +96 -0
  66. package/skills/using-spark/references/claude-code-tools.md +50 -0
  67. package/skills/using-spark/references/codex-tools.md +72 -0
  68. package/skills/using-spark/references/copilot-tools.md +49 -0
  69. package/skills/using-spark/references/gemini-tools.md +63 -0
  70. package/skills/using-spark/references/pi-tools.md +28 -0
  71. package/skills/verification-before-completion/SKILL.md +139 -0
  72. package/skills/writing-plans/SKILL.md +174 -0
  73. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  74. package/skills/writing-skills/SKILL.md +689 -0
  75. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  76. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  77. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  78. package/skills/writing-skills/persuasion-principles.md +187 -0
  79. package/skills/writing-skills/render-graphs.js +168 -0
  80. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  81. package/src/cli/index.js +26 -0
  82. package/src/cli/install.js +47 -0
  83. package/src/cli/output.js +11 -0
  84. package/src/cli/parse-args.js +46 -0
  85. package/src/cli/prompt.js +10 -0
  86. package/src/installer/adapters/common.js +59 -0
  87. package/src/installer/adapters/extension-style.js +67 -0
  88. package/src/installer/adapters/shell-hook.js +57 -0
  89. package/src/installer/detect.js +168 -0
  90. package/src/installer/errors.js +7 -0
  91. 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,7 @@
1
+ #!/usr/bin/env node
2
+ import { run } from '../src/cli/index.js';
3
+
4
+ run(process.argv.slice(2), process.env).catch((error) => {
5
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
6
+ process.exitCode = 1;
7
+ });
@@ -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/