@konductro/cursor-plugin 1.0.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/README.md ADDED
@@ -0,0 +1,89 @@
1
+ # @konductro/cursor-plugin
2
+
3
+ Cursor IDE plugin for the Konductro delivery platform. Enables technical analysis, story decomposition, ticket management, prototype delivery, and ticket-to-PR workflows directly from Cursor.
4
+
5
+ ## Prerequisites
6
+
7
+ - **Node.js** 18+
8
+ - **Cursor IDE** (any plan — MCP works on free tier)
9
+ - **Konductro CLI token** (generated in Konductro → Settings → CLI Access)
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g @konductro/cursor-plugin
15
+ ```
16
+
17
+ ## Setup
18
+
19
+ ```bash
20
+ konductro-cursor-setup --url https://platform.konductro.com --token YOUR_CLI_TOKEN
21
+ ```
22
+
23
+ This will:
24
+ 1. Configure the Konductro MCP server in `~/.cursor/mcp.json`
25
+ 2. Install Cursor Rules to `~/.cursor/rules/`
26
+
27
+ After setup, reload Cursor (Cmd+Shift+P → "Developer: Reload Window").
28
+
29
+ ### Options
30
+
31
+ | Flag | Description | Default |
32
+ |------|-------------|---------|
33
+ | `--url` | Konductro platform URL | Required |
34
+ | `--token` | Your personal CLI token | Required |
35
+ | `--project` | Install to `.cursor/` in current directory instead of global | `false` |
36
+ | `--env-refs` | Use `${env:...}` references instead of inline values (for git-committed configs) | `false` |
37
+
38
+ ## Rules (Workflows)
39
+
40
+ Rules are guided workflows that Cursor invokes based on context:
41
+
42
+ | Rule | Description |
43
+ |------|-------------|
44
+ | `start-ticket` | Pick up a Konductro ticket, create branch, and start work |
45
+ | `decompose` | Decompose a story into technical implementation tasks |
46
+ | `technical-analysis` | Perform a technical analysis for a project phase |
47
+ | `profile-repository` | Scan repository and submit its tech profile |
48
+ | `prototype` | Build a UX prototype and publish to S3 |
49
+ | `find-prototype` | Find and download approved prototypes |
50
+ | `bug-enrich` | Enrich a bug report with codebase context |
51
+
52
+ ## MCP Tools
53
+
54
+ Tools are called automatically by Cursor's agent based on your requests:
55
+
56
+ | Tool | What it does |
57
+ |------|-------------|
58
+ | `list_my_tickets` | List all tickets assigned to you |
59
+ | `get_ticket_context` | Load full context for a ticket |
60
+ | `start_work` | Create branch and start a ticket |
61
+ | `create_pr` | Create a pull request for a ticket |
62
+ | `list_tech_analysis_tasks` | List tech analysis assignments |
63
+ | `get_task_context` | Load tech analysis context |
64
+ | `submit_tech_analysis` | Submit analysis document |
65
+ | `list_decomposition_tasks` | List story decomposition assignments |
66
+ | `get_decomposition_context` | Load story context |
67
+ | `submit_decomposition_task` | Submit a decomposed task |
68
+ | `complete_decomposition` | Mark decomposition complete |
69
+ | `list_prototype_tasks` | List prototype assignments |
70
+ | `get_prototype_context` | Load prototype context |
71
+ | `start_prototype_work` | Mark prototype in progress |
72
+ | `request_upload_credentials` | Get S3 upload credentials |
73
+ | `submit_prototype` | Submit completed prototype |
74
+ | `profile_repository` | Submit repository profile |
75
+ | `find_project_prototypes` | Find UX prototypes for a project |
76
+
77
+ ## Updating Your Token
78
+
79
+ Run the setup command again with the new token:
80
+
81
+ ```bash
82
+ konductro-cursor-setup --url https://platform.konductro.com --token NEW_TOKEN
83
+ ```
84
+
85
+ ## Troubleshooting
86
+
87
+ - **MCP server not connecting:** Reload Cursor after config changes (Cmd+Shift+P → "Developer: Reload Window")
88
+ - **Tools not showing:** Check Cursor Settings → MCP tab for connection status and errors
89
+ - **Rules not activating:** Ensure rules are in `~/.cursor/rules/` or `.cursor/rules/` and mention Konductro in your prompt
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+
3
+ console.log('');
4
+ console.log('╔═══════════════════════════════════════════════════════╗');
5
+ console.log('║ Konductro Cursor Plugin installed ║');
6
+ console.log('║ ║');
7
+ console.log('║ Run setup to configure: ║');
8
+ console.log('║ konductro-cursor-setup --url <URL> --token <TOKEN> ║');
9
+ console.log('║ ║');
10
+ console.log('║ Get your CLI token from: ║');
11
+ console.log('║ Konductro → Settings → CLI Access ║');
12
+ console.log('╚═══════════════════════════════════════════════════════╝');
13
+ console.log('');
package/bin/setup.js ADDED
@@ -0,0 +1,146 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'fs';
4
+ import { homedir } from 'os';
5
+ import { dirname, join, resolve } from 'path';
6
+ import { fileURLToPath } from 'url';
7
+
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
10
+
11
+ function parseArgs(args) {
12
+ const parsed = {};
13
+ for (let i = 0; i < args.length; i++) {
14
+ const arg = args[i];
15
+ if (arg === '--url' && args[i + 1]) {
16
+ parsed.url = args[++i].replace(/\/$/, '');
17
+ } else if (arg === '--token' && args[i + 1]) {
18
+ parsed.token = args[++i];
19
+ } else if (arg === '--project') {
20
+ parsed.project = true;
21
+ } else if (arg === '--env-refs') {
22
+ parsed.envRefs = true;
23
+ } else if (arg === '--help' || arg === '-h') {
24
+ parsed.help = true;
25
+ }
26
+ }
27
+ return parsed;
28
+ }
29
+
30
+ function printHelp() {
31
+ console.log(`
32
+ Konductro Cursor Plugin Setup
33
+
34
+ Usage:
35
+ konductro-cursor-setup --url <konductro-url> --token <cli-token>
36
+
37
+ Options:
38
+ --url Konductro platform URL
39
+ --token Personal CLI token from Konductro Settings -> CLI Access
40
+ --project Install to .cursor/ in current directory instead of global ~/.cursor/
41
+ --env-refs Use \${env:...} references instead of inline values (for git-committed configs)
42
+ --help Show this help message
43
+
44
+ Example:
45
+ konductro-cursor-setup --url https://platform.konductro.com --token <your-cli-token>
46
+ `);
47
+ }
48
+
49
+ function main() {
50
+ const args = parseArgs(process.argv.slice(2));
51
+
52
+ if (args.help) {
53
+ printHelp();
54
+ process.exit(0);
55
+ }
56
+
57
+ if (!args.url || !args.token) {
58
+ console.error('Error: Both --url and --token are required.\n');
59
+ printHelp();
60
+ process.exit(1);
61
+ }
62
+
63
+ // Find the MCP server path (absolute, so Cursor can resolve it from any cwd)
64
+ const serverPath = resolve(join(__dirname, '..', 'servers', 'konductro-api.js'));
65
+ if (!existsSync(serverPath)) {
66
+ console.error('Error: MCP server not found at', serverPath);
67
+ process.exit(1);
68
+ }
69
+
70
+ // Determine config base directory
71
+ const baseDir = args.project ? join(process.cwd(), '.cursor') : join(homedir(), '.cursor');
72
+
73
+ // --- MCP config ---
74
+ const mcpConfigPath = join(baseDir, 'mcp.json');
75
+ mkdirSync(baseDir, { recursive: true });
76
+
77
+ let config = {};
78
+ if (existsSync(mcpConfigPath)) {
79
+ try {
80
+ config = JSON.parse(readFileSync(mcpConfigPath, 'utf8'));
81
+ } catch {
82
+ console.warn('Warning: Could not parse existing mcp.json, will add Konductro config.');
83
+ config = {};
84
+ }
85
+ }
86
+
87
+ if (!config.mcpServers) config.mcpServers = {};
88
+
89
+ // Add/update Konductro server
90
+ const pluginDir = resolve(join(__dirname, '..'));
91
+ config.mcpServers.konductro = {
92
+ command: 'node',
93
+ args: [serverPath],
94
+ cwd: pluginDir,
95
+ env: args.envRefs
96
+ ? { KONDUCTRO_URL: '${env:KONDUCTRO_URL}', KONDUCTRO_CLI_TOKEN: '${env:KONDUCTRO_CLI_TOKEN}' }
97
+ : { KONDUCTRO_URL: args.url, KONDUCTRO_CLI_TOKEN: args.token },
98
+ };
99
+
100
+ writeFileSync(mcpConfigPath, JSON.stringify(config, null, 2) + '\n');
101
+
102
+ // --- Rules ---
103
+ const rulesDir = join(baseDir, 'rules');
104
+ mkdirSync(rulesDir, { recursive: true });
105
+
106
+ const sourceRulesDir = join(__dirname, '..', 'skills');
107
+ if (existsSync(sourceRulesDir)) {
108
+ const ruleFiles = readdirSync(sourceRulesDir).filter((f) => f.endsWith('.mdc'));
109
+ for (const file of ruleFiles) {
110
+ const srcPath = join(sourceRulesDir, file);
111
+ const destPath = join(rulesDir, file);
112
+ copyFileSync(srcPath, destPath);
113
+ }
114
+ }
115
+
116
+ // --- Output ---
117
+ console.log('');
118
+ console.log('✓ Konductro plugin configured for Cursor');
119
+ console.log('');
120
+ console.log(' MCP server: ' + serverPath);
121
+ console.log(' MCP config: ' + mcpConfigPath);
122
+ console.log(' Rules: ' + rulesDir);
123
+ console.log(' Konductro: ' + args.url);
124
+ console.log('');
125
+ if (args.envRefs) {
126
+ console.log(' ⚠ Using env var references. Set these in your shell profile:');
127
+ console.log(' export KONDUCTRO_URL=' + args.url);
128
+ console.log(' export KONDUCTRO_CLI_TOKEN=<your-token>');
129
+ console.log('');
130
+ }
131
+ console.log('Rules (workflows):');
132
+ console.log(' start-ticket — pick up a ticket and start work');
133
+ console.log(' decompose — decompose a story into tasks');
134
+ console.log(' technical-analysis — perform codebase analysis');
135
+ console.log(' profile-repository — scan and submit repo profile');
136
+ console.log(' prototype — build a UX prototype');
137
+ console.log(' find-prototype — find and download prototypes');
138
+ console.log(' bug-enrich — enrich a bug report');
139
+ console.log('');
140
+ console.log('Reload Cursor to activate (Cmd+Shift+P → "Developer: Reload Window").');
141
+ console.log('');
142
+ console.log('To update your token later, run this command again.');
143
+ console.log('');
144
+ }
145
+
146
+ main();
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@konductro/cursor-plugin",
3
+ "version": "1.0.0",
4
+ "description": "Cursor IDE plugin for the Konductro platform: technical analysis, delivery tasks, repository profiling, and prototype workflows.",
5
+ "license": "UNLICENSED",
6
+ "type": "module",
7
+ "homepage": "https://platform.konductro.com",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+ssh://git@ssh.dev.azure.com:v3/idealsolution/Conductor/konductro-cursor-plugin"
11
+ },
12
+ "keywords": [
13
+ "cursor",
14
+ "konductro",
15
+ "mcp",
16
+ "technical-analysis",
17
+ "delivery",
18
+ "tickets",
19
+ "prototype"
20
+ ],
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "bin": {
25
+ "konductro-cursor-setup": "bin/setup.js"
26
+ },
27
+ "files": [
28
+ "bin/",
29
+ "servers/",
30
+ "skills/",
31
+ "README.md"
32
+ ],
33
+ "scripts": {
34
+ "postinstall": "node bin/postinstall.js",
35
+ "setup": "node bin/setup.js",
36
+ "check": "node --check servers/konductro-api.js && node --check bin/setup.js && node --check bin/postinstall.js",
37
+ "prepublishOnly": "npm run check"
38
+ },
39
+ "dependencies": {
40
+ "@modelcontextprotocol/sdk": "^1.0.0"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ }
45
+ }