@prajwolkc/stk 0.8.0 → 0.9.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/dist/mcp/server.js +3 -1
- package/dist/mcp/tools/automation.d.ts +2 -0
- package/dist/mcp/tools/automation.js +1877 -0
- package/dist/mcp/tools/brain.js +27 -13
- package/package.json +1 -1
package/dist/mcp/tools/brain.js
CHANGED
|
@@ -156,7 +156,7 @@ export function registerBrainTools(server) {
|
|
|
156
156
|
// ──────────────────────────────────────────
|
|
157
157
|
// Tool: stk_brain_check (PROACTIVE — call before writing code)
|
|
158
158
|
// ──────────────────────────────────────────
|
|
159
|
-
server.tool("stk_brain_check", "
|
|
159
|
+
server.tool("stk_brain_check", "ALWAYS call this BEFORE implementing a feature or making changes. Searches the brain for known gotchas, past bugs, and patterns. Returns warnings that prevent mistakes. Never start coding without checking the brain first.", {
|
|
160
160
|
task: z.string().describe("What you're about to implement (e.g., 'add email verification', 'update user model', 'add webhook endpoint')"),
|
|
161
161
|
}, async ({ task }) => {
|
|
162
162
|
const results = brainCheck(task);
|
|
@@ -195,7 +195,7 @@ export function registerBrainTools(server) {
|
|
|
195
195
|
// ──────────────────────────────────────────
|
|
196
196
|
// Tool: stk_brain_diagnose (REACTIVE — call when you hit an error)
|
|
197
197
|
// ──────────────────────────────────────────
|
|
198
|
-
server.tool("stk_brain_diagnose", "
|
|
198
|
+
server.tool("stk_brain_diagnose", "ALWAYS call this when you encounter an error or bug. Searches the brain for matching past solutions. Call this BEFORE debugging from scratch — the answer may already exist.", {
|
|
199
199
|
error: z.string().describe("The error message, bug description, or unexpected behavior you're seeing"),
|
|
200
200
|
}, async ({ error }) => {
|
|
201
201
|
const results = brainDiagnose(error);
|
|
@@ -475,17 +475,31 @@ export function registerBrainTools(server) {
|
|
|
475
475
|
lines.push(`npm start # Start production server`);
|
|
476
476
|
lines.push("```\n");
|
|
477
477
|
}
|
|
478
|
-
// stk
|
|
479
|
-
lines.push(`## stk
|
|
480
|
-
lines.push(`This project uses stk for infrastructure
|
|
478
|
+
// stk Automation Rules (CRITICAL)
|
|
479
|
+
lines.push(`## stk Automation Rules\n`);
|
|
480
|
+
lines.push(`This project uses stk (MCP server) for infrastructure automation. Follow these rules AUTOMATICALLY — do NOT wait for the user to ask:\n`);
|
|
481
|
+
lines.push(`### ALWAYS do these:`);
|
|
482
|
+
lines.push(`1. **Before implementing ANY feature or fix:** Call \`stk_autopilot\` with the task description. This catches gotchas before you waste time.`);
|
|
483
|
+
lines.push(`2. **When ANY error occurs:** Call \`stk_auto_diagnose\` with the error. The brain may already have the solution.`);
|
|
484
|
+
lines.push(`3. **Before committing:** Call \`stk_precommit\` to scan for secrets and known anti-patterns.`);
|
|
485
|
+
lines.push(`4. **After fixing a bug or building a feature:** Call \`stk_autolearn\` to save the pattern. This grows the collective brain.`);
|
|
486
|
+
lines.push(`5. **After deploying:** Call \`stk_postdeploy\` to verify health and catch issues early.`);
|
|
487
|
+
lines.push(`6. **When production is broken:** Call \`stk_incident\` to capture full state and create a GitHub issue.`);
|
|
488
|
+
lines.push(`7. **Before adding a dependency:** Call \`stk_dep_intel\` to check for conflicts and known issues.`);
|
|
489
|
+
lines.push(`8. **When reviewing changes:** Call \`stk_diff_explain\` to understand what changed and spot risks.`);
|
|
490
|
+
lines.push("");
|
|
491
|
+
lines.push(`### Key tools:`);
|
|
492
|
+
lines.push(`- \`stk_mission_control\` — Full stack overview (god mode)`);
|
|
493
|
+
lines.push(`- \`stk_guardian\` — Security + reliability audit with risk score`);
|
|
494
|
+
lines.push(`- \`stk_smart_deploy\` — Safe deploy pipeline (checks → push → verify)`);
|
|
495
|
+
lines.push(`- \`stk_sweep\` — Full maintenance sweep with prioritized actions`);
|
|
496
|
+
lines.push(`- \`stk_context\` — Instant project context for new conversations`);
|
|
497
|
+
lines.push(`- \`stk_time_travel\` — Reconstruct what happened in a time window`);
|
|
498
|
+
lines.push(`- \`stk_changelog\` — Auto-generate changelog from git + brain`);
|
|
499
|
+
lines.push(`- \`stk_brain_search\` — Search knowledge base`);
|
|
481
500
|
lines.push(`- \`stk_health\` — Check service health`);
|
|
482
|
-
lines.push(`- \`stk_status\` — Full project overview`);
|
|
483
501
|
lines.push(`- \`stk_logs\` — Production logs`);
|
|
484
502
|
lines.push(`- \`stk_db\` — Query database`);
|
|
485
|
-
lines.push(`- \`stk_alerts\` — Check for problems`);
|
|
486
|
-
lines.push(`- \`stk_deploy\` — Deploy to production`);
|
|
487
|
-
lines.push(`- \`stk_brain_search\` — Search knowledge base`);
|
|
488
|
-
lines.push(`- \`stk_brain_learn\` — Save patterns for future use`);
|
|
489
503
|
lines.push("");
|
|
490
504
|
// Conventions
|
|
491
505
|
lines.push(`## Conventions\n`);
|
|
@@ -493,9 +507,9 @@ export function registerBrainTools(server) {
|
|
|
493
507
|
lines.push(`- TypeScript strict mode enabled`);
|
|
494
508
|
}
|
|
495
509
|
lines.push(`- Use existing patterns in the codebase before introducing new ones`);
|
|
496
|
-
lines.push(`-
|
|
497
|
-
lines.push(`-
|
|
498
|
-
lines.push(`-
|
|
510
|
+
lines.push(`- ALWAYS use stk tools proactively — don't wait for the user to ask`);
|
|
511
|
+
lines.push(`- When you learn something new, save it with \`stk_autolearn\``);
|
|
512
|
+
lines.push(`- Check the brain before debugging from scratch`);
|
|
499
513
|
lines.push("");
|
|
500
514
|
// Environment
|
|
501
515
|
lines.push(`## Environment Variables\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prajwolkc/stk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "One CLI to deploy, monitor, debug, and learn about your entire stack. Infrastructure monitoring, knowledge base brain, deploy watching, and GitHub issues — all from one command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|