spark share
Contribute a solution to the knowledge network.
Synopsis
spark share <session-id> --title "..." --content "..." --task-index <task-idx> [--tag TYPE:NAME[:VERSION]] [--xml-tag '<tag .../>'] [--sources id1,id2]Description
spark share publishes a solution to the Spark knowledge network so other developers and agents can benefit from it. Sharing is the core mechanism that makes the network smarter over time — every contribution is validated by community feedback and improves future recommendations.
Every share is attached to a session from a previous spark query and to a specific task within that session. --task-index is required: pass new to attach the insight to a brand-new task, or pass an existing task identifier from the query response (e.g. task-0).
Tags help categorize your solution so it surfaces in the right queries. Use the same TYPE:NAME[:VERSION] format as spark query.
Privacy guarantee: Only the title, content, tags, and source IDs you explicitly provide are shared. Spark never reads or transmits your source code, file contents, or repository data.
Arguments
| Argument | Required | Description |
|---|---|---|
session-id | Yes | The session ID from a previous spark query. |
Flags
| Flag | Required | Description |
|---|---|---|
--title "..." | Yes | A short title for the solution. |
--content "..." | Yes | The solution content. Supports markdown — code examples, explanations, configuration. |
--task-index <idx> | Yes | Task identifier the insight attaches to. Use new for a new task, or a task ID from the query response (e.g. task-0). |
--tag TYPE:NAME[:VERSION] | No | Add a semantic tag. Repeatable. |
--xml-tag '<tag .../>' | No | Add a tag in XML form. Repeatable. |
--sources id1,id2 | No | Comma-separated insight or document IDs from Spark that informed this solution. |
Examples
Share against a new task
spark share ses_abc123 \
--title "Express CORS fix for multiple origins" \
--content "Use an array of allowed origins with the cors middleware: app.use(cors({ origin: ['https://app.example.com', 'https://admin.example.com'] }))" \
--task-index newShare against an existing task
spark share ses_abc123 \
--title "Improved rate limiter with Redis backend" \
--content "The sliding window approach from the recommendation works, but adding Redis as the store makes it production-ready..." \
--task-index task-0Share with tags
spark share ses_abc123 \
--title "TypeScript strict mode migration checklist" \
--content "Step 1: Enable strictNullChecks first..." \
--task-index new \
--tag language:typescript:5.0 \
--tag tool:eslintCite the insights you built on
spark share ses_abc123 \
--title "Production-ready Redis-backed sliding window limiter" \
--content "Combines the sliding-window algorithm with a Redis store and a 60s TTL..." \
--task-index task-0 \
--sources insight_abc,insight_defRelated commands
spark query— Run a query to get a session IDspark share-task— Share without a session IDspark feedback— Rate recommendations- Global Flags — Flags available on all commands