sparkecoder 0.1.130 → 0.1.132
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/README.md +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1480 -638
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +2281 -808
- package/dist/cli.js.map +1 -1
- package/dist/db/index.d.ts +2 -2
- package/dist/db/index.js.map +1 -1
- package/dist/{index-Bcz0aCAR.d.ts → index-BM99kjgq.d.ts} +177 -103
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2215 -780
- package/dist/index.js.map +1 -1
- package/dist/{schema-BWbWmfDQ.d.ts → schema-Dz-wABVY.d.ts} +27 -4
- package/dist/{search-DOzC4ojH.d.ts → search-CVVfuBPZ.d.ts} +4 -4
- package/dist/server/index.js +2215 -780
- package/dist/server/index.js.map +1 -1
- package/dist/skills/default/build-context-and-solve-issue.md +74 -0
- package/dist/skills/default/doublecheck.md +95 -0
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.js +11 -2
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
- package/src/skills/default/build-context-and-solve-issue.md +74 -0
- package/src/skills/default/doublecheck.md +95 -0
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/server/app/(main)/agents/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/agents/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/settings/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/agents.html +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/agents.segments/_full.segment.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/agents.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/agents.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/agents.segments/_tree.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/api/config/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/api/health/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.html +4 -4
- package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +20 -21
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools/page/next-font-manifest.json +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.html +3 -3
- package/web/.next/standalone/web/.next/server/app/docs.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/settings.html +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/settings.segments/_full.segment.rsc +6 -6
- package/web/.next/standalone/web/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/settings.segments/_index.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/app/settings.segments/_tree.segment.rsc +3 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__36edac7c._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__397fadd4._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__70cecda8._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__be5e2967._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_layout_tsx_453f6492._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_page_tsx_5ac4794b._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_settings_page_tsx_eb320e07._.js +2 -2
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +9 -9
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/chunks/185f69f6478ba713.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/20ca4e35e9bb3e94.js +3 -0
- package/web/.next/standalone/web/.next/static/chunks/{a7d5d0791c8c6223.css → 34d933785a17edf3.css} +1 -1
- package/web/.next/standalone/web/.next/static/chunks/7549a5b7c7f6786e.js +1 -0
- package/web/.next/standalone/web/.next/static/{static/chunks/c5dd884b71007965.js → chunks/a839c83078c56476.js} +1 -1
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/chunks/185f69f6478ba713.js +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/20ca4e35e9bb3e94.js +3 -0
- package/web/.next/standalone/web/.next/static/static/chunks/{a7d5d0791c8c6223.css → 34d933785a17edf3.css} +1 -1
- package/web/.next/standalone/web/.next/static/static/chunks/7549a5b7c7f6786e.js +1 -0
- package/web/.next/{static/chunks/c5dd884b71007965.js → standalone/web/.next/static/static/chunks/a839c83078c56476.js} +1 -1
- package/web/.next/standalone/web/.next/static/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
- package/web/.next/standalone/web/package-lock.json +21 -21
- package/web/.next/standalone/web/runtime-config.json +2 -1
- package/web/.next/standalone/web/src/app/(main)/page.tsx +2 -2
- package/web/.next/standalone/web/src/app/(main)/settings/page.tsx +111 -11
- package/web/.next/standalone/web/src/app/__sfapi/[...path]/route.ts +96 -0
- package/web/.next/standalone/web/src/app/api/config/route.ts +5 -12
- package/web/.next/standalone/web/src/app/docs/installation/page.mdx +2 -2
- package/web/.next/standalone/web/src/app/docs/page.mdx +1 -1
- package/web/.next/standalone/web/src/components/sessions-sidebar.tsx +1 -1
- package/web/.next/standalone/web/src/lib/config.ts +26 -16
- package/web/.next/static/chunks/185f69f6478ba713.js +1 -0
- package/web/.next/static/chunks/20ca4e35e9bb3e94.js +3 -0
- package/web/.next/static/chunks/{a7d5d0791c8c6223.css → 34d933785a17edf3.css} +1 -1
- package/web/.next/static/chunks/7549a5b7c7f6786e.js +1 -0
- package/web/.next/{standalone/web/.next/static/chunks/c5dd884b71007965.js → static/chunks/a839c83078c56476.js} +1 -1
- package/web/.next/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
- package/web/.next/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
- package/web/.next/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
- package/web/.next/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/chunks/9b88f148788e4504.js +0 -3
- package/web/.next/standalone/web/.next/static/chunks/b203b9aa975135d3.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/ea89ca7892d8c557.js +0 -1
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/chunks/9b88f148788e4504.js +0 -3
- package/web/.next/standalone/web/.next/static/static/chunks/b203b9aa975135d3.js +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/ea89ca7892d8c557.js +0 -1
- package/web/.next/standalone/web/.next/static/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- package/web/.next/static/chunks/9b88f148788e4504.js +0 -3
- package/web/.next/static/chunks/b203b9aa975135d3.js +0 -1
- package/web/.next/static/chunks/ea89ca7892d8c557.js +0 -1
- package/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
- package/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
- package/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
- package/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
- /package/web/.next/standalone/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_ssgManifest.js +0 -0
- /package/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_buildManifest.js +0 -0
- /package/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Build Context and Solve Issue
|
|
3
|
+
description: Two-phase workflow that builds a complete, evidence-backed map of a feature before fixing a bug. Load when the user asks to "build context and solve issue", to deeply understand a feature before changing it, or to root-cause a tricky bug instead of patching symptoms.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Build Context and Solve Issue
|
|
7
|
+
|
|
8
|
+
A two-phase flow: **first build context, then solve.** Resist the urge to jump straight to a fix. Most bad fixes come from an incomplete mental model of the feature. This skill is repo-agnostic — begin by discovering the project's stack (CLI, HTTP/RPC API, web frontend, background worker, library, etc.) and adapt the terms below to it.
|
|
9
|
+
|
|
10
|
+
## Phase 1: Build Context
|
|
11
|
+
|
|
12
|
+
Build a complete, evidence-backed map of the feature surface. Use the `explore_agent` tool to investigate, and prefer launching a few **independent** explorations against the same surface, then reconciling them, rather than a single shallow pass. Each exploration has zero context, so pass it the relevant files, the symptom, and concrete questions.
|
|
13
|
+
|
|
14
|
+
### What to investigate
|
|
15
|
+
|
|
16
|
+
1. **Entry points.** Every way the feature is triggered: CLI commands, HTTP/RPC routes, UI pages/components, event or queue consumers, scheduled jobs, webhooks. Capture request/response shape and auth path for each.
|
|
17
|
+
2. **Core logic & shared code.** The functions, modules, and components that implement the behavior, plus the shared helpers/libraries they depend on. Use `code_graph` and `search` to follow references up and down the call stack.
|
|
18
|
+
3. **Data layer.** The tables/models/schemas, caches, and files the feature reads and writes — including relations and constraints. If the repo has more than one backend (local vs remote, cache vs DB, multiple services), map **each** and note where they can diverge.
|
|
19
|
+
4. **Runtime & async behavior.** Streaming/SSE/websockets, background jobs, queues, child processes, timers, retries, and cleanup that the feature relies on.
|
|
20
|
+
5. **States & UX.** For UI or interactive surfaces, walk loading, empty, populated, error, permission-denied, streaming, reconnect, and disabled states the user can perceive.
|
|
21
|
+
6. **Intended behavior & regression source.** If a ticket, PR, prior conversation, or branch diff is involved, use it to pin down what changed, what regressed, and the exact expected end-to-end behavior.
|
|
22
|
+
|
|
23
|
+
### Per-exploration report shape
|
|
24
|
+
|
|
25
|
+
Ask each `explore_agent` exploration to return only:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
## Entry Points In Scope
|
|
29
|
+
- <trigger> — why it's reachable / what it touches
|
|
30
|
+
|
|
31
|
+
## Reuse / Regression Surfaces
|
|
32
|
+
- <shared module/component> — used by: <callers/pages>. Regression risk: ...
|
|
33
|
+
|
|
34
|
+
## States & Behavior
|
|
35
|
+
- <entry point> — state: <X> → user sees <Y>; state: <error> → ...
|
|
36
|
+
|
|
37
|
+
## Data Touched
|
|
38
|
+
- <store.table/model> — fields/relations read or written; which backend; divergence risk
|
|
39
|
+
|
|
40
|
+
## API / CLI Surface
|
|
41
|
+
- <handler/command> — request/response, auth, validation, data writes, external calls
|
|
42
|
+
|
|
43
|
+
## Runtime / Async Surface
|
|
44
|
+
- <module> — what it starts, streams, persists, or cleans up
|
|
45
|
+
|
|
46
|
+
## Intended Behavior
|
|
47
|
+
- step-by-step of how it should work
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Reconcile
|
|
51
|
+
|
|
52
|
+
After the explorations return: keep overlapping findings, investigate disagreements with your own `read_file` / `search` / `code_graph`, and fill gaps. Produce one consolidated understanding covering:
|
|
53
|
+
|
|
54
|
+
- **Feature surface**: the full set of entry points, core/shared code, data, runtime/async behavior, and UI states involved.
|
|
55
|
+
- **Expected result**: what should happen.
|
|
56
|
+
- **Current result**: what actually happens, with the concrete entry point, state, function call, response, query, or async step where behavior diverges.
|
|
57
|
+
|
|
58
|
+
## Phase 2: Solve the Issue
|
|
59
|
+
|
|
60
|
+
Only after the context is consolidated:
|
|
61
|
+
|
|
62
|
+
1. **Pinpoint the root cause** at the exact step where expected and current diverge. Name the file, function, state, route, query, or async step — not a vague area.
|
|
63
|
+
2. **Devise a plan.** When multiple approaches exist, briefly weigh them against the repo's existing patterns.
|
|
64
|
+
3. **Prefer the smallest change** that preserves the project's boundaries and invariants: API/CLI contracts, data integrity (and parity across multiple backends), auth/permission model, streaming/async semantics, and resource lifecycle.
|
|
65
|
+
4. **Present the plan and rationale before implementing** anything non-trivial.
|
|
66
|
+
|
|
67
|
+
## Guardrails
|
|
68
|
+
|
|
69
|
+
- Always build context first; never skip straight to a fix on a non-trivial bug.
|
|
70
|
+
- Back every claim with a concrete reference: file path, command, route, table/model, state name, function, response, or async step.
|
|
71
|
+
- Discover and respect the repo's actual layout and conventions before proposing changes — do not assume a structure that isn't there.
|
|
72
|
+
- Watch for **multiple data backends or environments**: bugs frequently hide where two stores or two code paths are supposed to agree but don't.
|
|
73
|
+
- Check auth and scope carefully: identify how the feature authenticates and what it is scoped to (user, tenant, session, device), and make sure the fix preserves those checks.
|
|
74
|
+
- Prefer the smallest correct change, then verify with targeted tests, type checks, and a manual run of the affected flow.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Doublecheck
|
|
3
|
+
description: Flow-by-flow review that finds bugs by tracing real user and system flows before running tests. Load when the user says "/doublecheck", asks you to double-check implementation behavior, sanity-check a change, or find regressions in recently edited code.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Doublecheck
|
|
7
|
+
|
|
8
|
+
Find bugs by reasoning through real flows **before** reaching for the test suite. Do not start by running all the tests. First walk the changed surface end to end — the entry point a user or system hits, the functions and routes invoked, the data read and written, the events/streams produced, and what the user actually perceives at each step. Tests come last, scoped to what the flow review reveals.
|
|
9
|
+
|
|
10
|
+
This skill is repo-agnostic. Start by discovering what kind of project you are in (CLI, HTTP/RPC API, web frontend, background worker, library, mobile app, etc.) and adapt the terms below to that stack.
|
|
11
|
+
|
|
12
|
+
## Required Process
|
|
13
|
+
|
|
14
|
+
1. **Identify the touched surface.** Find the changed files and everything they reach: affected entry points (CLI commands, route/RPC handlers, UI pages, event/queue consumers, cron jobs), the functions and modules they call, the data layer (DB tables/models, caches, files), external services, and the parent/child relationships of any shared code or components.
|
|
15
|
+
2. **Map the reachable entry points.** List each distinct way the changed surface can be triggered — every URL/page, API endpoint, CLI invocation, webhook, scheduled job, or message handler. Include auth-gated, empty, and error variants.
|
|
16
|
+
3. **Build the reuse / regression map.** For every shared function, module, or component touched, find every *other* caller or consumer. Those are regression surfaces and must be walked too — not just the one call site you edited.
|
|
17
|
+
4. **Explore in parallel.** Use the `explore_agent` tool to investigate the touched surface. Prefer launching a few independent explorations (e.g. one for entry points/routes, one for the data layer, one for shared-component reuse) and reconciling their findings, rather than one shallow pass. Each exploration has zero context, so pass it the changed files and concrete questions.
|
|
18
|
+
5. **Reconcile.** Keep overlapping findings, investigate disagreements with your own `read_file` / `search` / `code_graph`, and fill gaps the explorations missed.
|
|
19
|
+
6. **Produce flow paths** (format below) showing, per step: entry point, state, function call → return, API/route behavior, data effect, runtime/stream effect, and what the user sees.
|
|
20
|
+
7. **List potential issues**, ordered by likely user impact. Call out regressions in code shared with untouched features.
|
|
21
|
+
8. **Fix issues that are clear and safely actionable.** Do not fix speculative issues without evidence.
|
|
22
|
+
9. **Only then decide on verification** — targeted tests, type checks, lints, or a manual run. Prefer focused checks over broad test runs unless the blast radius is large.
|
|
23
|
+
|
|
24
|
+
## What every step of a flow path MUST make visible
|
|
25
|
+
|
|
26
|
+
Each step is a single user- or system-perceivable moment. For that moment, surface all of:
|
|
27
|
+
|
|
28
|
+
- **Entry point**: the exact trigger — URL + params, API method + path, CLI command + flags, event/message, webhook, or scheduled fire. Show it changing on navigation.
|
|
29
|
+
- **State**: concrete in-memory and UI state — loading, empty, error, streaming, reconnecting, disabled, selected item, form draft, optimistic update, lock/concurrency state.
|
|
30
|
+
- **Function calls → returns**: which functions run and what they return, including shared helpers and library calls.
|
|
31
|
+
- **API / route behavior**: request shape, response/status shape, auth/permission decision, and validation.
|
|
32
|
+
- **Data effect**: which store and which table/model/key is read or written, and any transaction or consistency concern. If the repo has more than one backend (e.g. local vs remote, cache vs DB), say *which* one and watch for divergence between them.
|
|
33
|
+
- **Runtime / async effect**: streams/SSE/websocket events, background jobs, queue messages, child processes, timers, retries, and cleanup.
|
|
34
|
+
- **What the user sees**: visible text, spinner, disabled control, stream/terminal output, toast, redirect, focus, or stale/missing data. State explicitly what the *correct* perception should be.
|
|
35
|
+
|
|
36
|
+
If any required detail is unknown for a step, say so. An unknown is itself a likely bug to investigate.
|
|
37
|
+
|
|
38
|
+
## Per-exploration prompt shape
|
|
39
|
+
|
|
40
|
+
Ask each `explore_agent` exploration to return only:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## Entry Points In Scope
|
|
44
|
+
- <trigger> — why it's reachable / what it touches
|
|
45
|
+
|
|
46
|
+
## Flow Paths
|
|
47
|
+
(one step-by-step path per journey, using the Path Format below)
|
|
48
|
+
|
|
49
|
+
## Reuse / Regression Surfaces
|
|
50
|
+
- <shared module/component> — used by: <callers/pages>. Regression risk: ...
|
|
51
|
+
|
|
52
|
+
## API / Data / Runtime Surface
|
|
53
|
+
- <handler/module> — request/response, auth, data reads/writes, external calls, async effects
|
|
54
|
+
|
|
55
|
+
## Potential Issues
|
|
56
|
+
- ... (ordered by user impact)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Path Format
|
|
60
|
+
|
|
61
|
+
Write each path as a concrete step-by-step progression.
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
### Path: <who> does <action>
|
|
65
|
+
|
|
66
|
+
**Step 1: <moment>**
|
|
67
|
+
- Entry point: <URL / endpoint / command / event>
|
|
68
|
+
- Function calls → returns: <fn> → <result>
|
|
69
|
+
- API / route: <request> → <status + shape>; auth: <decision>
|
|
70
|
+
- Data effect: reads/writes <store.table/model>; <transaction/consistency note>
|
|
71
|
+
- Runtime effect: <stream/job/process/timer>
|
|
72
|
+
- State: <concrete state values>
|
|
73
|
+
- User sees: <perception>. Correct: <what it should be>.
|
|
74
|
+
|
|
75
|
+
**Step 2: <next moment / failure branch>**
|
|
76
|
+
- API: returns <4xx/5xx> / emits error event
|
|
77
|
+
- State: pending state clears, optimistic changes roll back, retry possible
|
|
78
|
+
- Data effect: no partial/inconsistent write; failed async state cleaned up
|
|
79
|
+
- User sees: specific error/empty state, no stale success UI.
|
|
80
|
+
|
|
81
|
+
Potential issues:
|
|
82
|
+
- <missing auth/scope check, partial write, stuck lock, leaked process, stale UI, ...>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Guardrails
|
|
86
|
+
|
|
87
|
+
- Walk **step by step**. Do not collapse multiple pages/commands into one vague "the user flows through the app" step.
|
|
88
|
+
- Trace both server-side and client-side behavior when a flow crosses that boundary, and show the call/return on each side.
|
|
89
|
+
- Always make these explicit per step: entry point, state, function call → return, API/route behavior, data effect, runtime/async effect, user-perceived output.
|
|
90
|
+
- If the repo has multiple data backends or environments, name **which one** each step uses; bugs love to hide in the divergence between them.
|
|
91
|
+
- For every shared function/component touched, prove the change is safe in **every** caller/consumer, not just the one you edited.
|
|
92
|
+
- Include alternate paths: loading, empty data, auth denied, permission denied, failed network request, duplicate click, back/forward, refresh, streaming interruption/reconnect, timeout, retry, and concurrent access.
|
|
93
|
+
- Use concrete references (file, function, route, table, state name). Avoid generic "could fail" notes.
|
|
94
|
+
- Do not use doublecheck as a substitute for tests. Use it to decide what targeted tests should cover afterward.
|
|
95
|
+
- If you find and fix issues, run the doublecheck flow again on the changed surface to confirm the fix introduced no new regression.
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { ToolSet } from 'ai';
|
|
3
|
-
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from '../search-
|
|
4
|
-
export { b as BashToolOptions, d as SearchToolOptions, e as WriteFileToolOptions, c as createBashTool, f as createSearchTool, a as createWriteFileTool } from '../search-
|
|
3
|
+
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from '../search-CVVfuBPZ.js';
|
|
4
|
+
export { b as BashToolOptions, d as SearchToolOptions, e as WriteFileToolOptions, c as createBashTool, f as createSearchTool, a as createWriteFileTool } from '../search-CVVfuBPZ.js';
|
|
5
5
|
|
|
6
6
|
interface TaskCompletionSignal {
|
|
7
7
|
status: 'completed' | 'failed';
|
|
@@ -110,7 +110,7 @@ interface TodoToolOptions {
|
|
|
110
110
|
workingDirectory: string;
|
|
111
111
|
}
|
|
112
112
|
declare function createTodoTool(options: TodoToolOptions): ai.Tool<{
|
|
113
|
-
action: "
|
|
113
|
+
action: "clear" | "add" | "list" | "mark" | "save_plan" | "list_plans" | "get_plan" | "delete_plan";
|
|
114
114
|
status?: "completed" | "pending" | "in_progress" | "cancelled" | undefined;
|
|
115
115
|
items?: {
|
|
116
116
|
content: string;
|
package/dist/tools/index.js
CHANGED
|
@@ -145,8 +145,8 @@ var init_types = __esm({
|
|
|
145
145
|
authKey: z.string().optional()
|
|
146
146
|
}).optional();
|
|
147
147
|
SparkcoderConfigSchema = z.object({
|
|
148
|
-
// Default model to use (
|
|
149
|
-
defaultModel: z.string().default("
|
|
148
|
+
// Default model to use (LiteLLM model id)
|
|
149
|
+
defaultModel: z.string().default("gpt-5.5"),
|
|
150
150
|
// Working directory for file operations
|
|
151
151
|
workingDirectory: z.string().optional(),
|
|
152
152
|
// Tool approval settings
|
|
@@ -185,6 +185,14 @@ var init_types = __esm({
|
|
|
185
185
|
webhooks: z.object({
|
|
186
186
|
token: z.string().optional()
|
|
187
187
|
}).optional(),
|
|
188
|
+
// Self-update: when running as the managed service, periodically check
|
|
189
|
+
// npm for a newer published version and, if found, re-run the hosted
|
|
190
|
+
// installer (full upgrade + restart). Disabled automatically when not
|
|
191
|
+
// running from a global install (e.g. dev/source checkouts).
|
|
192
|
+
autoUpdate: z.object({
|
|
193
|
+
enabled: z.boolean().optional().default(true),
|
|
194
|
+
intervalHours: z.number().positive().optional().default(6)
|
|
195
|
+
}).optional().default({}),
|
|
188
196
|
// Database path (used for local SQLite - ignored if remoteServer is configured)
|
|
189
197
|
databasePath: z.string().optional().default("./sparkecoder.db"),
|
|
190
198
|
// Remote server configuration (for centralized storage)
|
|
@@ -296,6 +304,7 @@ var init_config = __esm({
|
|
|
296
304
|
openai: "OPENAI_API_KEY",
|
|
297
305
|
google: "GOOGLE_GENERATIVE_AI_API_KEY",
|
|
298
306
|
xai: "XAI_API_KEY",
|
|
307
|
+
litellm: "LITELLM_API_KEY",
|
|
299
308
|
"ai-gateway": "AI_GATEWAY_API_KEY"
|
|
300
309
|
};
|
|
301
310
|
SUPPORTED_PROVIDERS = Object.keys(PROVIDER_ENV_MAP);
|