@korallis/k-pi 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/CHANGELOG.md +5619 -0
- package/LICENSE +21 -0
- package/NOTICE +66 -0
- package/README.md +723 -0
- package/dist/bundle/chunks/anthropic-messages-IBCPCIJO.js +45 -0
- package/dist/bundle/chunks/anthropic.js +75 -0
- package/dist/bundle/chunks/azure-openai-responses-GUUG57CZ.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +74 -0
- package/dist/bundle/chunks/chunk-4L3WN2XY.js +2 -0
- package/dist/bundle/chunks/chunk-6CYCI3EJ.js +12 -0
- package/dist/bundle/chunks/chunk-6R7UI4IY.js +2 -0
- package/dist/bundle/chunks/chunk-AXIIZGTV.js +2 -0
- package/dist/bundle/chunks/chunk-CO7LIZG5.js +2 -0
- package/dist/bundle/chunks/chunk-DRQDKNXA.js +2 -0
- package/dist/bundle/chunks/chunk-GMWCTUPB.js +2 -0
- package/dist/bundle/chunks/chunk-HOFU6X66.js +50 -0
- package/dist/bundle/chunks/chunk-JUUC5AZY.js +2 -0
- package/dist/bundle/chunks/chunk-L2ZPNLYD.js +2 -0
- package/dist/bundle/chunks/chunk-MNAIPA3J.js +2 -0
- package/dist/bundle/chunks/chunk-NBBFIJUL.js +11 -0
- package/dist/bundle/chunks/chunk-NUHFSC37.js +25 -0
- package/dist/bundle/chunks/chunk-PGXDEOVV.js +2 -0
- package/dist/bundle/chunks/chunk-PJACZCIR.js +2 -0
- package/dist/bundle/chunks/chunk-PRRNXB7S.js +2 -0
- package/dist/bundle/chunks/chunk-TEPMHNKQ.js +2 -0
- package/dist/bundle/chunks/chunk-TRDNDS6A.js +4 -0
- package/dist/bundle/chunks/chunk-UAQELI3K.js +2 -0
- package/dist/bundle/chunks/chunk-X5QHCKY4.js +1653 -0
- package/dist/bundle/chunks/chunk-XDUWOHPL.js +6 -0
- package/dist/bundle/chunks/github-copilot.js +2 -0
- package/dist/bundle/chunks/google-generative-ai-YRXF7C4I.js +2 -0
- package/dist/bundle/chunks/google-vertex-BVZ6VBRQ.js +2 -0
- package/dist/bundle/chunks/https-proxy-agent-2VXB7436.js +13 -0
- package/dist/bundle/chunks/image-resize-worker.js +2 -0
- package/dist/bundle/chunks/kimi-coding.js +2 -0
- package/dist/bundle/chunks/lib-HGQMNYVT.js +9 -0
- package/dist/bundle/chunks/mistral-conversations-Q3AWZJAZ.js +5 -0
- package/dist/bundle/chunks/multipart-parser-SQ6GDJL7.js +3 -0
- package/dist/bundle/chunks/openai-codex-responses-GJVBJXLB.js +8 -0
- package/dist/bundle/chunks/openai-codex.js +75 -0
- package/dist/bundle/chunks/openai-completions-OICQQ5JB.js +7 -0
- package/dist/bundle/chunks/openai-responses-P5LIZTXX.js +2 -0
- package/dist/bundle/chunks/openrouter-images-XTKS2AS3.js +2 -0
- package/dist/bundle/chunks/openrouter.js +75 -0
- package/dist/bundle/chunks/pi-messages-TPFH44NP.js +8 -0
- package/dist/bundle/chunks/radius.js +75 -0
- package/dist/bundle/chunks/src-UK77SYZE.js +4 -0
- package/dist/bundle/chunks/xai.js +2 -0
- package/dist/bundle/cli.js +3 -0
- package/dist/bundle/client.js +2 -0
- package/dist/bundle/index.js +2 -0
- package/dist/bundle/rpc-entry.js +3 -0
- package/dist/core/export-html/template.css +1066 -0
- package/dist/core/export-html/template.html +55 -0
- package/dist/core/export-html/template.js +1864 -0
- package/dist/core/export-html/vendor/highlight.min.js +1213 -0
- package/dist/core/export-html/vendor/marked.min.js +78 -0
- package/dist/kpi/graphs/coding-loop.auto.json +377 -0
- package/dist/kpi/graphs/coding-loop.gated.json +417 -0
- package/dist/kpi/graphs/spec-first.json +40 -0
- package/dist/kpi/kstack/NOTICE +5 -0
- package/dist/kpi/kstack/UPSTREAM.md +23 -0
- package/dist/kpi/kstack/generated/LICENSE +21 -0
- package/dist/kpi/kstack/generated/skills/architect/SKILL.md +83 -0
- package/dist/kpi/kstack/generated/skills/architect/references/design-red-flags.md +33 -0
- package/dist/kpi/kstack/generated/skills/architect/references/rationale-template.md +35 -0
- package/dist/kpi/kstack/generated/skills/architect/references/runner-prompt.md +20 -0
- package/dist/kpi/kstack/generated/skills/arena/SKILL.md +29 -0
- package/dist/kpi/kstack/generated/skills/blast-radius/SKILL.md +50 -0
- package/dist/kpi/kstack/generated/skills/bro/SKILL.md +7 -0
- package/dist/kpi/kstack/generated/skills/create-verification-skill/SKILL.md +44 -0
- package/dist/kpi/kstack/generated/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/dist/kpi/kstack/generated/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/dist/kpi/kstack/generated/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/dist/kpi/kstack/generated/skills/figure-it-out/SKILL.md +55 -0
- package/dist/kpi/kstack/generated/skills/how/SKILL.md +135 -0
- package/dist/kpi/kstack/generated/skills/how/references/critic-prompt.md +59 -0
- package/dist/kpi/kstack/generated/skills/how/references/critique-rubric.md +58 -0
- package/dist/kpi/kstack/generated/skills/how/references/explainer-prompt.md +55 -0
- package/dist/kpi/kstack/generated/skills/how/references/explorer-prompt.md +52 -0
- package/dist/kpi/kstack/generated/skills/interrogate/SKILL.md +113 -0
- package/dist/kpi/kstack/generated/skills/interrogate/references/code-quality-review.md +47 -0
- package/dist/kpi/kstack/generated/skills/interrogate/references/lead-judgment.md +58 -0
- package/dist/kpi/kstack/generated/skills/interrogate/references/reviewer-prompt.md +72 -0
- package/dist/kpi/kstack/generated/skills/interrogate/references/rubric.md +77 -0
- package/dist/kpi/kstack/generated/skills/k-agent/SKILL.md +17 -0
- package/dist/kpi/kstack/generated/skills/k-mode/SKILL.md +64 -0
- package/dist/kpi/kstack/generated/skills/k-stack-principles/SKILL.md +24 -0
- package/dist/kpi/kstack/generated/skills/maintain-verification-skill/SKILL.md +39 -0
- package/dist/kpi/kstack/generated/skills/no-comments/SKILL.md +24 -0
- package/dist/kpi/kstack/generated/skills/playbook-arena/SKILL.md +20 -0
- package/dist/kpi/kstack/generated/skills/playbook-autonomous-run/SKILL.md +22 -0
- package/dist/kpi/kstack/generated/skills/playbook-autopilot-full/SKILL.md +20 -0
- package/dist/kpi/kstack/generated/skills/playbook-autopilot-stack/SKILL.md +20 -0
- package/dist/kpi/kstack/generated/skills/playbook-bug-fix/SKILL.md +21 -0
- package/dist/kpi/kstack/generated/skills/playbook-feature/SKILL.md +22 -0
- package/dist/kpi/kstack/generated/skills/playbook-investigation/SKILL.md +21 -0
- package/dist/kpi/kstack/generated/skills/playbook-shipping/SKILL.md +18 -0
- package/dist/kpi/kstack/generated/skills/playbook-swarm/SKILL.md +20 -0
- package/dist/kpi/kstack/generated/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/dist/kpi/kstack/generated/skills/principle-build-the-lever/SKILL.md +23 -0
- package/dist/kpi/kstack/generated/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
- package/dist/kpi/kstack/generated/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/dist/kpi/kstack/generated/skills/principle-experience-first/SKILL.md +19 -0
- package/dist/kpi/kstack/generated/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/dist/kpi/kstack/generated/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/dist/kpi/kstack/generated/skills/principle-guard-the-context-window/SKILL.md +17 -0
- package/dist/kpi/kstack/generated/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/dist/kpi/kstack/generated/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/dist/kpi/kstack/generated/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/dist/kpi/kstack/generated/skills/principle-minimize-reader-load/SKILL.md +23 -0
- package/dist/kpi/kstack/generated/skills/principle-model-the-domain/SKILL.md +26 -0
- package/dist/kpi/kstack/generated/skills/principle-never-block-on-the-human/SKILL.md +23 -0
- package/dist/kpi/kstack/generated/skills/principle-outcome-oriented-execution/SKILL.md +22 -0
- package/dist/kpi/kstack/generated/skills/principle-prove-it-works/SKILL.md +33 -0
- package/dist/kpi/kstack/generated/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/dist/kpi/kstack/generated/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/dist/kpi/kstack/generated/skills/principle-sequence-verifiable-units/SKILL.md +22 -0
- package/dist/kpi/kstack/generated/skills/principle-subtract-before-you-add/SKILL.md +22 -0
- package/dist/kpi/kstack/generated/skills/principle-type-system-discipline/SKILL.md +31 -0
- package/dist/kpi/kstack/generated/skills/recall/SKILL.md +35 -0
- package/dist/kpi/kstack/generated/skills/reflect/SKILL.md +77 -0
- package/dist/kpi/kstack/generated/skills/reflect/references/divergent-reviewer.md +43 -0
- package/dist/kpi/kstack/generated/skills/reflect/references/judgment-reviewer.md +42 -0
- package/dist/kpi/kstack/generated/skills/reflect/references/synthesizer.md +56 -0
- package/dist/kpi/kstack/generated/skills/reflect/references/tooling-reviewer.md +57 -0
- package/dist/kpi/kstack/generated/skills/setup-kstack/SKILL.md +48 -0
- package/dist/kpi/kstack/generated/skills/show-me-your-work/SKILL.md +82 -0
- package/dist/kpi/kstack/generated/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/dist/kpi/kstack/generated/skills/show-me-your-work/scripts/log.sh +40 -0
- package/dist/kpi/kstack/generated/skills/swarm/SKILL.md +27 -0
- package/dist/kpi/kstack/generated/skills/tdd/SKILL.md +44 -0
- package/dist/kpi/kstack/generated/skills/teach/SKILL.md +21 -0
- package/dist/kpi/kstack/generated/skills/technical-writing/SKILL.md +130 -0
- package/dist/kpi/kstack/generated/skills/typescript-best-practices/SKILL.md +30 -0
- package/dist/kpi/kstack/generated/skills/typescript-best-practices/references/patterns.md +313 -0
- package/dist/kpi/kstack/generated/skills/unslop/SKILL.md +81 -0
- package/dist/kpi/kstack/generated/skills/why/SKILL.md +230 -0
- package/dist/kpi/kstack/generated/skills/why/references/epistemics.md +144 -0
- package/dist/kpi/kstack/generated/skills/why/references/investigator-prompt.md +103 -0
- package/dist/kpi/kstack/generated/skills/why/references/source-playbook.md +17 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/code-archaeology.md +88 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/databricks.md +70 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/datadog.md +99 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/incident-postmortem.md +15 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/linear.md +48 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/notion.md +55 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/sentry.md +100 -0
- package/dist/kpi/kstack/generated/skills/why/references/sources/slack.md +54 -0
- package/dist/kpi/kstack/generated/skills/why/references/synthesizer-prompt.md +135 -0
- package/dist/kpi/kstack/model-ladder.md +50 -0
- package/dist/kpi/kstack/provenance.json +17 -0
- package/dist/kpi/prompts/implement.md +6 -0
- package/dist/kpi/prompts/plan.md +6 -0
- package/dist/kpi/prompts/review.md +6 -0
- package/dist/kpi/prompts/ship.md +6 -0
- package/dist/kpi/prompts/specify.md +6 -0
- package/dist/kpi/prompts/verify.md +6 -0
- package/dist/kpi/schemas/event.schema.json +1314 -0
- package/dist/kpi/schemas/evidence.schema.json +43 -0
- package/dist/kpi/schemas/stack.schema.json +102 -0
- package/dist/kpi/schemas/task.schema.json +165 -0
- package/dist/kpi/schemas/verdict.schema.json +44 -0
- package/dist/kpi/skills/concise-output/SKILL.md +10 -0
- package/dist/kpi/skills/context-pack/SKILL.md +10 -0
- package/dist/kpi/skills/conventional-commit/SKILL.md +12 -0
- package/dist/kpi/skills/isolated-review/SKILL.md +10 -0
- package/dist/kpi/skills/kg-claim/SKILL.md +26 -0
- package/dist/kpi/skills/minimalist/SKILL.md +24 -0
- package/dist/kpi/skills/quality-gates/SKILL.md +10 -0
- package/dist/kpi/skills/spec-first/SKILL.md +10 -0
- package/dist/kpi/skills/tdd-cycle/SKILL.md +10 -0
- package/dist/kpi/templates/AGENTS.md +31 -0
- package/dist/kpi/templates/APPEND_SYSTEM.md +13 -0
- package/dist/kpi/templates/context-pack/product.md +7 -0
- package/dist/kpi/templates/context-pack/structure.md +7 -0
- package/dist/kpi/templates/context-pack/tech.md +9 -0
- package/dist/kpi/templates/policy.json +17 -0
- package/dist/kpi/themes/loop-amber.json +82 -0
- package/dist/kpi/themes/protocol-blue.json +82 -0
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/theme/dark.json +90 -0
- package/dist/modes/interactive/theme/light.json +89 -0
- package/dist/modes/interactive/theme/theme-schema.json +352 -0
- package/docs/compaction.md +418 -0
- package/docs/containerization.md +111 -0
- package/docs/custom-provider.md +777 -0
- package/docs/development.md +71 -0
- package/docs/docs.json +156 -0
- package/docs/environment-variables.md +97 -0
- package/docs/extensions.md +3020 -0
- package/docs/images/doom-extension.png +0 -0
- package/docs/images/exy.png +0 -0
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/index.md +84 -0
- package/docs/json.md +98 -0
- package/docs/keybindings.md +236 -0
- package/docs/llama-cpp.md +101 -0
- package/docs/models.md +571 -0
- package/docs/packages.md +228 -0
- package/docs/prompt-templates.md +96 -0
- package/docs/providers.md +317 -0
- package/docs/quickstart.md +167 -0
- package/docs/rpc.md +1618 -0
- package/docs/sdk.md +1219 -0
- package/docs/security.md +59 -0
- package/docs/session-format.md +438 -0
- package/docs/sessions.md +145 -0
- package/docs/settings.md +369 -0
- package/docs/shell-aliases.md +13 -0
- package/docs/skills.md +232 -0
- package/docs/terminal-setup.md +177 -0
- package/docs/termux.md +127 -0
- package/docs/themes.md +320 -0
- package/docs/tmux.md +63 -0
- package/docs/tui.md +942 -0
- package/docs/usage.md +311 -0
- package/docs/windows.md +39 -0
- package/examples/README.md +25 -0
- package/examples/extensions/README.md +213 -0
- package/examples/extensions/auto-commit-on-exit.ts +49 -0
- package/examples/extensions/bash-spawn-hook.ts +30 -0
- package/examples/extensions/bookmark.ts +50 -0
- package/examples/extensions/border-status-editor.ts +150 -0
- package/examples/extensions/built-in-tool-renderer.ts +249 -0
- package/examples/extensions/claude-rules.ts +86 -0
- package/examples/extensions/commands.ts +72 -0
- package/examples/extensions/confirm-destructive.ts +59 -0
- package/examples/extensions/custom-compaction.ts +117 -0
- package/examples/extensions/custom-footer.ts +64 -0
- package/examples/extensions/custom-header.ts +73 -0
- package/examples/extensions/custom-provider-anthropic/index.ts +611 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +24 -0
- package/examples/extensions/custom-provider-anthropic/package.json +19 -0
- package/examples/extensions/custom-provider-gitlab-duo/index.ts +405 -0
- package/examples/extensions/custom-provider-gitlab-duo/package.json +16 -0
- package/examples/extensions/custom-provider-gitlab-duo/test.ts +82 -0
- package/examples/extensions/dirty-repo-guard.ts +56 -0
- package/examples/extensions/doom-overlay/README.md +46 -0
- package/examples/extensions/doom-overlay/doom/build/doom.js +21 -0
- package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
- package/examples/extensions/doom-overlay/doom/build.sh +152 -0
- package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +72 -0
- package/examples/extensions/doom-overlay/doom-component.ts +132 -0
- package/examples/extensions/doom-overlay/doom-engine.ts +173 -0
- package/examples/extensions/doom-overlay/doom-keys.ts +104 -0
- package/examples/extensions/doom-overlay/index.ts +74 -0
- package/examples/extensions/doom-overlay/wad-finder.ts +55 -0
- package/examples/extensions/dynamic-resources/SKILL.md +8 -0
- package/examples/extensions/dynamic-resources/dynamic.json +79 -0
- package/examples/extensions/dynamic-resources/dynamic.md +5 -0
- package/examples/extensions/dynamic-resources/index.ts +15 -0
- package/examples/extensions/dynamic-tools.ts +74 -0
- package/examples/extensions/entry-renderer.ts +41 -0
- package/examples/extensions/event-bus.ts +43 -0
- package/examples/extensions/file-trigger.ts +41 -0
- package/examples/extensions/git-checkpoint.ts +53 -0
- package/examples/extensions/git-merge-and-resolve.ts +115 -0
- package/examples/extensions/github-issue-autocomplete.ts +185 -0
- package/examples/extensions/gondolin/index.ts +531 -0
- package/examples/extensions/gondolin/package-lock.json +185 -0
- package/examples/extensions/gondolin/package.json +19 -0
- package/examples/extensions/handoff.ts +190 -0
- package/examples/extensions/hello.ts +26 -0
- package/examples/extensions/hidden-thinking-label.ts +53 -0
- package/examples/extensions/inline-bash.ts +94 -0
- package/examples/extensions/input-transform-streaming.ts +39 -0
- package/examples/extensions/input-transform.ts +43 -0
- package/examples/extensions/interactive-shell.ts +196 -0
- package/examples/extensions/kimi-deferred-tools.ts +61 -0
- package/examples/extensions/mac-system-theme.ts +47 -0
- package/examples/extensions/message-renderer.ts +59 -0
- package/examples/extensions/minimal-mode.ts +426 -0
- package/examples/extensions/modal-editor.ts +85 -0
- package/examples/extensions/model-status.ts +31 -0
- package/examples/extensions/notify.ts +57 -0
- package/examples/extensions/overlay-qa-tests.ts +1450 -0
- package/examples/extensions/overlay-test.ts +153 -0
- package/examples/extensions/permission-gate.ts +34 -0
- package/examples/extensions/pirate.ts +47 -0
- package/examples/extensions/plan-mode/README.md +66 -0
- package/examples/extensions/plan-mode/index.ts +390 -0
- package/examples/extensions/plan-mode/utils.ts +168 -0
- package/examples/extensions/preset.ts +436 -0
- package/examples/extensions/project-trust.ts +64 -0
- package/examples/extensions/prompt-customizer.ts +97 -0
- package/examples/extensions/protected-paths.ts +30 -0
- package/examples/extensions/provider-payload.ts +18 -0
- package/examples/extensions/qna.ts +118 -0
- package/examples/extensions/question.ts +286 -0
- package/examples/extensions/questionnaire.ts +448 -0
- package/examples/extensions/rainbow-editor.ts +88 -0
- package/examples/extensions/reload-runtime.ts +37 -0
- package/examples/extensions/rpc-demo.ts +118 -0
- package/examples/extensions/sandbox/index.ts +321 -0
- package/examples/extensions/sandbox/package-lock.json +92 -0
- package/examples/extensions/sandbox/package.json +19 -0
- package/examples/extensions/send-user-message.ts +97 -0
- package/examples/extensions/session-name.ts +27 -0
- package/examples/extensions/shutdown-command.ts +63 -0
- package/examples/extensions/snake.ts +343 -0
- package/examples/extensions/space-invaders.ts +560 -0
- package/examples/extensions/ssh.ts +220 -0
- package/examples/extensions/status-line.ts +32 -0
- package/examples/extensions/structured-output.ts +65 -0
- package/examples/extensions/subagent/README.md +177 -0
- package/examples/extensions/subagent/agents/planner.md +37 -0
- package/examples/extensions/subagent/agents/reviewer.md +35 -0
- package/examples/extensions/subagent/agents/scout.md +50 -0
- package/examples/extensions/subagent/agents/worker.md +24 -0
- package/examples/extensions/subagent/agents.ts +157 -0
- package/examples/extensions/subagent/index.ts +1038 -0
- package/examples/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/examples/extensions/subagent/prompts/implement.md +10 -0
- package/examples/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/examples/extensions/summarize.ts +199 -0
- package/examples/extensions/system-prompt-header.ts +17 -0
- package/examples/extensions/tic-tac-toe.ts +1008 -0
- package/examples/extensions/timed-confirm.ts +70 -0
- package/examples/extensions/titlebar-spinner.ts +58 -0
- package/examples/extensions/todo.ts +297 -0
- package/examples/extensions/tool-override.ts +144 -0
- package/examples/extensions/tools.ts +146 -0
- package/examples/extensions/trigger-compact.ts +50 -0
- package/examples/extensions/truncated-tool.ts +195 -0
- package/examples/extensions/widget-placement.ts +9 -0
- package/examples/extensions/with-deps/index.ts +32 -0
- package/examples/extensions/with-deps/package-lock.json +31 -0
- package/examples/extensions/with-deps/package.json +22 -0
- package/examples/extensions/working-indicator.ts +123 -0
- package/examples/extensions/working-message-test.ts +25 -0
- package/examples/rpc-extension-ui.ts +641 -0
- package/examples/sdk/01-minimal.ts +26 -0
- package/examples/sdk/02-custom-model.ts +49 -0
- package/examples/sdk/03-custom-prompt.ts +75 -0
- package/examples/sdk/04-skills.ts +55 -0
- package/examples/sdk/05-tools.ts +48 -0
- package/examples/sdk/06-extensions.ts +99 -0
- package/examples/sdk/07-context-files.ts +47 -0
- package/examples/sdk/08-prompt-templates.ts +51 -0
- package/examples/sdk/09-api-keys-and-oauth.ts +34 -0
- package/examples/sdk/10-settings.ts +53 -0
- package/examples/sdk/11-sessions.ts +52 -0
- package/examples/sdk/12-full-control.ts +74 -0
- package/examples/sdk/13-session-runtime.ts +67 -0
- package/examples/sdk/README.md +140 -0
- package/package.json +55 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Synthesizer Prompt Template
|
|
2
|
+
|
|
3
|
+
Build the synthesizer's prompt from this template; fill in the placeholders.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are answering a "why" question about a piece of code by synthesizing findings from multiple investigators who searched different historical sources (source control, issue / ticket tracker, long-form documents, real-time team chat, infrastructure observability, error / exception tracking, product analytics warehouse, and code comments). Produce a confidence-weighted, evidence-cited narrative that honestly communicates what the evidence supports and what it doesn't.
|
|
8
|
+
|
|
9
|
+
## The Question
|
|
10
|
+
|
|
11
|
+
> {QUESTION}
|
|
12
|
+
|
|
13
|
+
## The Code Anchor
|
|
14
|
+
|
|
15
|
+
**Target files:** {FILES_WITH_LINE_RANGES}
|
|
16
|
+
|
|
17
|
+
**Key symbols:** {SYMBOLS}
|
|
18
|
+
|
|
19
|
+
## Investigator Findings
|
|
20
|
+
|
|
21
|
+
{ALL_INVESTIGATOR_FINDINGS}
|
|
22
|
+
|
|
23
|
+
## Sources That Weren't Searched
|
|
24
|
+
|
|
25
|
+
{SKIPPED_SOURCES_WITH_REASONS}
|
|
26
|
+
|
|
27
|
+
## Epistemics Framework
|
|
28
|
+
|
|
29
|
+
You MUST follow the framework in `references/epistemics.md`. Read it in full before writing the output. The key rules:
|
|
30
|
+
|
|
31
|
+
1. Every claim sits in one of these tiers: **Direct**, **Supported**, **Inferred**, **Speculative**, **Unknown**. The tier determines what section the claim goes in and how it's phrased.
|
|
32
|
+
2. Every Direct/Supported claim must have a citation (PR #, ticket ID, doc URL, chat permalink, commit hash, or file:line).
|
|
33
|
+
3. Inferred and Speculative claims must use hedged language ("appears to", "likely", "suggests", "one possibility is").
|
|
34
|
+
4. Never cite code as evidence for its own intent.
|
|
35
|
+
5. Gaps in the evidence must be documented. Don't fill them with plausible-sounding guesses.
|
|
36
|
+
6. If the user's question embedded a hypothesis, treat it as a candidate, not a conclusion. Check the evidence independently.
|
|
37
|
+
|
|
38
|
+
## Instructions
|
|
39
|
+
|
|
40
|
+
1. **Read all investigator findings.** They gathered raw evidence, not conclusions. You weigh it.
|
|
41
|
+
2. **Reconcile overlapping findings.** Multiple investigators may have cited the same PR, ticket, or doc. Merge into a single, authoritative reference.
|
|
42
|
+
3. **Identify contradictions.** If two items of evidence disagree, don't pick one. Surface both.
|
|
43
|
+
4. **Calibrate confidence.** For each claim, identify the evidence and the tier. State Direct claims plainly with a citation. Hedge Inferred claims and explain the inference. Mark Speculative claims explicitly. Put claims with no evidence in the gaps section.
|
|
44
|
+
5. **Verify citations by spot-checking.** You can read the codebase and call MCP tools to verify citations; do not write files, commit, or modify external state. If you're uncertain a cited item exists or says what's claimed, check it. Don't propagate errors.
|
|
45
|
+
6. **Don't overreach.** The user will act on your output. Better to leave an open question open than to fill it with a confident-sounding guess.
|
|
46
|
+
|
|
47
|
+
## Output Format
|
|
48
|
+
|
|
49
|
+
Write the output for the user. Use this exact structure:
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### The Question
|
|
54
|
+
|
|
55
|
+
Restate the user's question in one or two sentences so the answer is anchored.
|
|
56
|
+
|
|
57
|
+
### The Code in Question
|
|
58
|
+
|
|
59
|
+
File paths, line ranges, key symbols. Two or three lines to orient a reader who lands here cold.
|
|
60
|
+
|
|
61
|
+
### What We Found
|
|
62
|
+
|
|
63
|
+
**Claims with direct evidence**, one per bullet. Quote or paraphrase the source and cite precisely. Format each finding like:
|
|
64
|
+
|
|
65
|
+
- **[Direct]** {Claim}. Source: [PR #123](url) / ticket ID / file:line. {Brief quote or paraphrase.}
|
|
66
|
+
- **[Supported]** {Claim}. Evidence: {list of items and what each contributes}.
|
|
67
|
+
|
|
68
|
+
Use `[Direct]` for single-source, explicit evidence. Use `[Supported]` when multiple indirect items converge on a conclusion.
|
|
69
|
+
|
|
70
|
+
### What We Can Reasonably Infer
|
|
71
|
+
|
|
72
|
+
**Claims that aren't explicitly stated anywhere but are well-supported by indirect evidence.** Make the inference chain visible: "Given A and B, it's likely that C." Use hedged language ("appears to", "likely", "suggests", "is consistent with"). Format:
|
|
73
|
+
|
|
74
|
+
- **[Inferred]** {Hedged claim}. Reasoning: {the specific evidence and the inference step}.
|
|
75
|
+
|
|
76
|
+
If there's nothing to infer, skip this section.
|
|
77
|
+
|
|
78
|
+
### Competing Hypotheses
|
|
79
|
+
|
|
80
|
+
**If the evidence fits multiple stories, present them.** Don't force a winner when the record doesn't support one. For each hypothesis:
|
|
81
|
+
|
|
82
|
+
- **Hypothesis:** {one-sentence statement}
|
|
83
|
+
- **Evidence for:** {specific items}
|
|
84
|
+
- **Evidence against or missing:** {what would need to be true but isn't, or what counter-signals exist}
|
|
85
|
+
|
|
86
|
+
Skip this section if there's a single clear answer.
|
|
87
|
+
|
|
88
|
+
### What We Don't Know
|
|
89
|
+
|
|
90
|
+
**Explicit gaps.** Things the user asked that the evidence didn't answer. Sources searched that came up empty. Sources that weren't searchable at all, such as a missing real-time team chat MCP.
|
|
91
|
+
|
|
92
|
+
Be specific. "We searched the issue tracker for [query1], [query2], [query3] and found no issue discussing the rate-limit threshold" is useful. "We don't know why" is not. Include:
|
|
93
|
+
|
|
94
|
+
- Specific questions that went unanswered
|
|
95
|
+
- Searches that returned nothing
|
|
96
|
+
- Sources that were unavailable (and why)
|
|
97
|
+
- People who would likely know but who you can't ask
|
|
98
|
+
|
|
99
|
+
### Sources Consulted
|
|
100
|
+
|
|
101
|
+
Bulleted list of what was actually searched, so the user can judge coverage and redirect. Format:
|
|
102
|
+
|
|
103
|
+
- **Source control history**: {file paths}, {number of commits reviewed}, PRs #{numbers}, and code comments searched. Or "Not searched. This should not happen because git and `gh` are always expected."
|
|
104
|
+
- **Issue / ticket tracker**: {ticket IDs and keyword searches}. Or "Not searched. No matching MCP available in this environment."
|
|
105
|
+
- **Long-form documents**: {page titles and search queries}. Or "Not searched. No matching MCP available in this environment."
|
|
106
|
+
- **Real-time team chat**: {channels searched, date ranges, queries}. Or "Not searched. No matching MCP available in this environment."
|
|
107
|
+
- **Infrastructure observability**: {dashboards, monitors, metrics, logs, traces, or incidents searched}. Or "Not searched. No matching MCP available in this environment."
|
|
108
|
+
- **Error / exception tracking**: {issues, events, or releases searched}. Or "Not searched. No matching MCP available in this environment."
|
|
109
|
+
- **Product analytics warehouse**: {fully-qualified tables queried, the time windows, and the numeric summaries (counts, percentiles, first/last-seen timestamps) that bore on the question}. Or "Not searched. No matching MCP available in this environment."
|
|
110
|
+
|
|
111
|
+
### Confidence Summary
|
|
112
|
+
|
|
113
|
+
One or two sentences summarizing your overall confidence. E.g.:
|
|
114
|
+
|
|
115
|
+
> "The core rationale (A) is well-supported by direct PR and ticket evidence. The specific threshold value (100) is inferred from the surrounding context but not explicitly documented. The question of whether this was driven by a customer request could not be answered. No relevant issue tracker or long-form doc content surfaced, and real-time team chat search was unavailable."
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Quality Check Before Returning
|
|
120
|
+
|
|
121
|
+
Before finalizing, review your output against this checklist:
|
|
122
|
+
|
|
123
|
+
1. Does every claim in "What We Found" have a citation? If not, add one or move the claim to "Inferred" or "Hypotheses."
|
|
124
|
+
2. Is the phrasing tier-appropriate? (Direct claims can use "because"; Inferred claims cannot.)
|
|
125
|
+
3. Did you surface any contradictions you noticed, or did you quietly pick one?
|
|
126
|
+
4. Does the "What We Don't Know" section exist and name specific gaps? If it's empty or missing, be suspicious. Historical investigations almost always have gaps.
|
|
127
|
+
5. If the user embedded a hypothesis in their question, did you check it against the evidence rather than rubber-stamping it?
|
|
128
|
+
6. Did you cite any code as evidence for its own intent? Remove those. Code is mechanics, not motivation.
|
|
129
|
+
7. Is the overall tone calibrated? A confident-sounding answer with weak evidence is the exact failure mode this skill exists to prevent.
|
|
130
|
+
|
|
131
|
+
If any item fails, revise before returning.
|
|
132
|
+
|
|
133
|
+
## A Final Note
|
|
134
|
+
|
|
135
|
+
The value of this output comes from its honesty, not its authority. A reader who takes your answer to the original author, an engineering lead, or a product manager should be well-positioned to ask the right follow-up questions. Be clear about what's known, what's inferred, and what's missing. Don't optimize for looking decisive. Optimize for being useful.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# K-stack model ladder
|
|
2
|
+
|
|
3
|
+
Used by `/setup-kstack` to **suggest** a mapping. Operator applies or edits. Never
|
|
4
|
+
written as a required default.
|
|
5
|
+
|
|
6
|
+
Cut date: 2026-08-31.
|
|
7
|
+
|
|
8
|
+
The order below is a starting point for this harness, not a benchmark result and
|
|
9
|
+
not a claim about any model. `/setup-kstack` intersects it with the live registry
|
|
10
|
+
and the operator's own configured pools, so an entry that is not available is
|
|
11
|
+
simply skipped.
|
|
12
|
+
|
|
13
|
+
## Role suggest lists
|
|
14
|
+
|
|
15
|
+
First live slug that matches a pattern wins. Patterns are substring match on `provider/id` after `getAvailable()` ∩ healthy pools.
|
|
16
|
+
|
|
17
|
+
| Role | Prefer, in order | Why | Confidence |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| implementer | `gpt-5.6-sol`, `glm-5.3` (not flash), `opus-5`, `kimi-k3`, `grok-4.6`, `glm-5.2` | General implementation. Second and third entries are value and UI-heavy alternates. | Medium |
|
|
20
|
+
| frontend | `kimi-k3`, `fable-5`, `opus-5`, `glm-5.3` | Frontend and design work. | Medium-high |
|
|
21
|
+
| judgment | `opus-5`, `fable-5`, `gpt-5.6-terra`, `gpt-5.6-sol`, `kimi-k3` | Review and judgment. | Medium |
|
|
22
|
+
| precise | `gpt-5.6-sol`, `gpt-5.6-terra`, `opus-5`, `glm-5.3` | Exact contracts. | Medium |
|
|
23
|
+
| fast | `gpt-5.6-luna`, `glm-5.3-flash`, `grok-4.6`, any local | Cheap movers, including any configured local pool. | Medium |
|
|
24
|
+
| review_panel | Prefer `opus-5` + `gpt-5.6-sol`. If the job is UI, `kimi-k3` + `fable-5`. Cap 3. | Cross-family review; capped at three. | Medium |
|
|
25
|
+
|
|
26
|
+
If a role has no match: `inherit-parent`.
|
|
27
|
+
|
|
28
|
+
Do not suggest Cursor Cloud slugs. Do not require a named id that is not in the live registry.
|
|
29
|
+
|
|
30
|
+
## Overall working order
|
|
31
|
+
|
|
32
|
+
Use only as a tie-break when two candidates match the same role pattern.
|
|
33
|
+
|
|
34
|
+
1. GPT-5.6 Sol — general implementation
|
|
35
|
+
2. GLM-5.3 — general implementation
|
|
36
|
+
3. Claude Opus 5 — review and judgment
|
|
37
|
+
4. Kimi K3 — frontend, official pool `kimi-coding`
|
|
38
|
+
5. Claude Fable 5 — review and frontend
|
|
39
|
+
6. GPT-5.6 Terra — exploration and long review
|
|
40
|
+
7. Grok 4.6 — fast movers
|
|
41
|
+
8. GLM-5.3 Flash — fast movers
|
|
42
|
+
9. Claude Opus 4.8 — review and judgment
|
|
43
|
+
10. GLM-5.2 — general implementation
|
|
44
|
+
11. GPT-5.6 Luna — fast movers
|
|
45
|
+
12. Grok 4.5 — fast movers
|
|
46
|
+
13. GLM-5.1 — general implementation
|
|
47
|
+
|
|
48
|
+
## Refresh rule
|
|
49
|
+
|
|
50
|
+
Bump this file in a dated commit. `/setup-kstack` reads the committed lists. No network scrape at setup time.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"origin": {
|
|
3
|
+
"repository": "https://github.com/cursor/plugins.git",
|
|
4
|
+
"path": "pstack/",
|
|
5
|
+
"commit": "efa2a531985e0a8084d36ff3cf87233be8a9f34b",
|
|
6
|
+
"treeOid": "1c625329e71538629f087374daa71293a498089f"
|
|
7
|
+
},
|
|
8
|
+
"transformVersion": "1b86ea71f862661208be21916b5a12aa9024b96253890da40dd8e1ff677aa1c2",
|
|
9
|
+
"patches": [],
|
|
10
|
+
"license": {
|
|
11
|
+
"path": "LICENSE",
|
|
12
|
+
"spdx": "MIT",
|
|
13
|
+
"holder": "Lauren Tan",
|
|
14
|
+
"sha256": "bc957ca6bee02792566a1a028d105e02e247c6e77cf057061674273da77b200e"
|
|
15
|
+
},
|
|
16
|
+
"overlayVersion": 1
|
|
17
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Implement the current frozen task with TDD
|
|
3
|
+
argument-hint: "[task-or-slice]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Implement `$ARGUMENTS` or the current run task. Apply the `tdd-cycle` skill: capture red evidence before non-trivial production changes, stay inside frozen write bounds, and make the smallest complete change. Never write `verdict.json`, `release.approved`, or broaden acceptance criteria.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Plan a frozen task without implementing it
|
|
3
|
+
argument-hint: "<goal-or-spec-path>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Plan `$ARGUMENTS` from repository evidence and the frozen task or specification. Research first. Define ordered vertical slices, exact paths, acceptance checks, write bounds, risks, and `stack.json` module boundaries. Keep planner tools read-only and do not implement.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the current candidate in an isolated read-only context
|
|
3
|
+
argument-hint: "[job-id]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Apply the `isolated-review` skill to `$ARGUMENTS` or the active run. Read the frozen task, diff, candidate, and fresh evidence. Check every required criterion and bound. Do not modify files. Return only JSON matching `schemas/verdict.schema.json`.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Commit an approved gated run without pushing
|
|
3
|
+
argument-hint: "[job-id]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Ship `$ARGUMENTS` or the active run only after human approval. Apply the `conventional-commit` skill and create exactly one local commit whose subject matches `^(feat|fix|docs|refactor|test|chore)(\(.+\))?: `. Include only the approved candidate. Never push, deploy, or amend unrelated history.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Specify a task without implementing it
|
|
3
|
+
argument-hint: "<goal>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Apply the `spec-first` skill to `$ARGUMENTS`. Research existing behavior and conventions first. Produce requirements, design, ordered vertical tasks, executable acceptance criteria, constraints, non-goals, and `stack.json` boundaries. Do not implement production code or claim narrative criteria are executable.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run acceptance checks and project quality gates
|
|
3
|
+
argument-hint: "[job-id]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Apply the `quality-gates` skill to `$ARGUMENTS` or the active run. Execute every required acceptance check and each exact command in `task.json.quality_gates`. Bind receipts to current HEAD and report red for any failure or stale evidence. Do not substitute proxy commands.
|