spawnpack 0.1.7 → 0.1.8
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/spawnpack.js +4 -27
- package/package.json +1 -1
- package/templates/AGENTS.md +12 -54
- package/templates/CLAUDE.md +12 -54
package/dist/spawnpack.js
CHANGED
|
@@ -1897,16 +1897,9 @@ function generateReadme(config) {
|
|
|
1897
1897
|
const aiDocFilename = getAiDocFilename(config.aiSetup);
|
|
1898
1898
|
const aiSection = aiDocFilename !== null ? `## AI Tooling
|
|
1899
1899
|
|
|
1900
|
-
Spawnpack generated \`${aiDocFilename}\` and \`.mcp.json\` for AI-assisted development.
|
|
1900
|
+
Spawnpack generated \`${aiDocFilename}\` and \`.mcp.json\` for AI-assisted development. The configured MCP servers work out of the box — no API keys required.
|
|
1901
1901
|
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
- Exa API keys: https://dashboard.exa.ai/api-keys
|
|
1905
|
-
- Exa API key docs: https://exa.ai/docs/reference/team-management/create-api-key
|
|
1906
|
-
- Browser Use API keys: https://cloud.browser-use.com/settings?tab=api-keys&new=1
|
|
1907
|
-
- Browser Use MCP docs: https://docs.browser-use.com/cloud/guides/mcp-server
|
|
1908
|
-
|
|
1909
|
-
Update the placeholder values in \`.mcp.json\` with your own tokens.
|
|
1902
|
+
Exa's hosted MCP runs on a rate-limited free tier. If you need higher limits, you can add your own Exa API key to \`.mcp.json\` (optional): https://dashboard.exa.ai/api-keys
|
|
1910
1903
|
|
|
1911
1904
|
` : "";
|
|
1912
1905
|
const scriptPackageSection = config.scripting !== "none" ? `## Script Packages
|
|
@@ -2120,21 +2113,7 @@ import { join as join2 } from "node:path";
|
|
|
2120
2113
|
function buildMcpServers() {
|
|
2121
2114
|
return {
|
|
2122
2115
|
exa: {
|
|
2123
|
-
|
|
2124
|
-
args: ["-y", "exa-mcp-server"],
|
|
2125
|
-
env: {
|
|
2126
|
-
EXA_API_KEY: "YOUR_EXA_API_KEY"
|
|
2127
|
-
}
|
|
2128
|
-
},
|
|
2129
|
-
"browser-use": {
|
|
2130
|
-
url: "https://api.browser-use.com/v3/mcp",
|
|
2131
|
-
headers: {
|
|
2132
|
-
"x-browser-use-api-key": "YOUR_BROWSER_USE_API_KEY"
|
|
2133
|
-
}
|
|
2134
|
-
},
|
|
2135
|
-
"sequential-thinking": {
|
|
2136
|
-
command: "npx",
|
|
2137
|
-
args: ["-y", "@modelcontextprotocol/server-sequential-thinking"]
|
|
2116
|
+
url: "https://mcp.exa.ai/mcp"
|
|
2138
2117
|
},
|
|
2139
2118
|
grep_app: {
|
|
2140
2119
|
command: "npx",
|
|
@@ -2502,9 +2481,7 @@ function showPostGeneration(config) {
|
|
|
2502
2481
|
}
|
|
2503
2482
|
if (config.aiSetup !== "none") {
|
|
2504
2483
|
usefulCommands.push("");
|
|
2505
|
-
usefulCommands.push(`${teal(import_picocolors.default.bold("Note"))} ${import_picocolors.default.dim("
|
|
2506
|
-
usefulCommands.push(` ${import_picocolors.default.dim("Exa:")} ${import_picocolors.default.cyan("https://dashboard.exa.ai/api-keys")}`);
|
|
2507
|
-
usefulCommands.push(` ${import_picocolors.default.dim("Browser Use:")} ${import_picocolors.default.cyan("https://cloud.browser-use.com/settings?tab=api-keys&new=1")}`);
|
|
2484
|
+
usefulCommands.push(`${teal(import_picocolors.default.bold("Note"))} ${import_picocolors.default.dim(".mcp.json is ready to use — the configured MCP servers need no API keys.")}`);
|
|
2508
2485
|
}
|
|
2509
2486
|
O2.message([...nextSteps, "", ...usefulCommands].join(`
|
|
2510
2487
|
`), {
|
package/package.json
CHANGED
package/templates/AGENTS.md
CHANGED
|
@@ -36,45 +36,6 @@ The governing loop for all work: **gather context → take action → verify wor
|
|
|
36
36
|
VIOLATION CHECK: If you wrote library/framework code from memory without searching Exa first, you violated this rule.
|
|
37
37
|
</rule>
|
|
38
38
|
|
|
39
|
-
<rule name="browser_use_mcp_for_web" priority="high">
|
|
40
|
-
**The Rule:** When you need to interact with live web pages beyond simple doc lookups, use Browser Use MCP. It provides Browser Use Cloud automation via MCP (`https://api.browser-use.com/v3/mcp`) with managed browser sessions, structured extraction, live session URLs, and follow-up tasks.
|
|
41
|
-
|
|
42
|
-
**Browser Use MCP tools:**
|
|
43
|
-
|
|
44
|
-
| Tool | Purpose |
|
|
45
|
-
|---|---|
|
|
46
|
-
| `run_session` | Create a browser session and run a natural-language web automation/extraction task |
|
|
47
|
-
| `get_session` | Poll session status/output, step count, cost breakdown, and live URL |
|
|
48
|
-
| `send_task` | Send a follow-up task to an idle keep-alive session |
|
|
49
|
-
| `stop_session` | Stop the current task or destroy the browser session sandbox |
|
|
50
|
-
| `get_session_messages` | Inspect browser actions, reasoning, and results from a session |
|
|
51
|
-
| `list_sessions` | List recent Browser Use sessions |
|
|
52
|
-
| `list_browser_profiles` | List available authenticated browser profiles |
|
|
53
|
-
|
|
54
|
-
**When to use Browser Use MCP (NOT Exa):**
|
|
55
|
-
- Scraping full page content, not just searching for it
|
|
56
|
-
- Extracting structured data (JSON) from complex/messy HTML (e.g. Minecraft wiki tables, addon schemas)
|
|
57
|
-
- Crawling or traversing multiple linked pages on a site (e.g. crawling all Script API event pages)
|
|
58
|
-
- Interacting with pages: clicking buttons, filling forms, navigating flows
|
|
59
|
-
- Accessing protected/anti-bot sites where managed browser infrastructure helps
|
|
60
|
-
- Taking screenshots or using live browser session evidence
|
|
61
|
-
- Any task that requires a real browser session
|
|
62
|
-
|
|
63
|
-
**When to use Exa instead:**
|
|
64
|
-
- Quick doc lookups for `@minecraft/server`, `@minecraft/math`, etc.
|
|
65
|
-
- Finding the right URL or page for a topic
|
|
66
|
-
- Lightweight search queries
|
|
67
|
-
|
|
68
|
-
**Workflow — Exa finds it, Browser Use MCP reads/interacts with it:**
|
|
69
|
-
1. `web_search_exa` → find the right URL
|
|
70
|
-
2. `run_session` → extract deep content, automate navigation, or collect structured data
|
|
71
|
-
3. `get_session` / `get_session_messages` → inspect completion, output, live URL, and action trace
|
|
72
|
-
4. `send_task` → continue in the same keep-alive browser session if follow-up interaction is needed
|
|
73
|
-
5. `stop_session` → cleanly stop/destroy the Browser Use session when finished
|
|
74
|
-
|
|
75
|
-
VIOLATION CHECK: If you manually scraped or parsed HTML when Browser Use MCP could have done it cleanly, you violated this rule.
|
|
76
|
-
</rule>
|
|
77
|
-
|
|
78
39
|
<rule name="no_comments" priority="high">
|
|
79
40
|
DO NOT WRITE ANY COMMENTS OR JSDOCS unless explicitly requested.
|
|
80
41
|
</rule>
|
|
@@ -606,12 +567,11 @@ POTENTIAL CONCERNS:
|
|
|
606
567
|
13. Editing files from stale context without re-reading first
|
|
607
568
|
14. Duplicating state instead of fixing the real problem
|
|
608
569
|
15. Writing library/framework code from memory without searching Exa for current docs first
|
|
609
|
-
16.
|
|
610
|
-
17.
|
|
611
|
-
18.
|
|
612
|
-
19.
|
|
613
|
-
20.
|
|
614
|
-
21. Adding attribution or AI-style report trailers to Git commit messages
|
|
570
|
+
16. Using try-catch in Minecraft Script API code
|
|
571
|
+
17. Creating custom math functions when @minecraft/math has them available
|
|
572
|
+
18. Using raw strings instead of @minecraft/vanilla-data typed identifiers
|
|
573
|
+
19. Writing BP/RP JSON files without schema validation
|
|
574
|
+
20. Adding attribution or AI-style report trailers to Git commit messages
|
|
615
575
|
</failure_modes_to_avoid>
|
|
616
576
|
|
|
617
577
|
<meta>
|
|
@@ -621,18 +581,16 @@ You have unlimited stamina. The human does not. Use your persistence wisely —
|
|
|
621
581
|
|
|
622
582
|
**Priority Hierarchy:**
|
|
623
583
|
1. **EXA FOR DOCS** — Always search library/framework docs via Exa before implementing
|
|
624
|
-
2. **
|
|
625
|
-
3. **
|
|
626
|
-
4. **
|
|
627
|
-
5. **
|
|
628
|
-
6. **
|
|
629
|
-
7. **
|
|
630
|
-
8. **
|
|
631
|
-
9. **NATURAL COMMITS** - Write human commit messages; no attribution or AI-style report trailers
|
|
584
|
+
2. **VERIFY BEFORE DONE** — Type-check, lint, test before claiming success
|
|
585
|
+
3. **PLAN BEFORE BUILD** — Spec and approval before implementation
|
|
586
|
+
4. **GUARD CLAUSES** — Never use try-catch in Minecraft code
|
|
587
|
+
5. **VANILLA-DATA** — Use typed identifiers from @minecraft/vanilla-data
|
|
588
|
+
6. **MINECRAFT-MATH** — Use @minecraft/math library for math operations
|
|
589
|
+
7. **JSON SCHEMAS** — Validate BP/RP JSONs with Rockide/schemas
|
|
590
|
+
8. **NATURAL COMMITS** - Write human commit messages; no attribution or AI-style report trailers
|
|
632
591
|
|
|
633
592
|
**Violation Checks:**
|
|
634
593
|
- ❌ Wrote library/framework code without searching Exa first? → Violated Exa-for-docs rule
|
|
635
|
-
- ❌ Manually scraped/parsed HTML when Browser Use MCP could do it? → Violated Browser-Use-MCP-for-web rule
|
|
636
594
|
- ❌ Said "Done!" without running type-check/lint/tests? → Violated forced verification rule
|
|
637
595
|
- ❌ Edited a file from memory after 10+ messages without re-reading? → Violated context decay rule
|
|
638
596
|
- ❌ Started building without plan approval on a non-trivial task? → Violated plan-build separation
|
package/templates/CLAUDE.md
CHANGED
|
@@ -36,45 +36,6 @@ The governing loop for all work: **gather context → take action → verify wor
|
|
|
36
36
|
VIOLATION CHECK: If you wrote library/framework code from memory without searching Exa first, you violated this rule.
|
|
37
37
|
</rule>
|
|
38
38
|
|
|
39
|
-
<rule name="browser_use_mcp_for_web" priority="high">
|
|
40
|
-
**The Rule:** When you need to interact with live web pages beyond simple doc lookups, use Browser Use MCP. It provides Browser Use Cloud automation via MCP (`https://api.browser-use.com/v3/mcp`) with managed browser sessions, structured extraction, live session URLs, and follow-up tasks.
|
|
41
|
-
|
|
42
|
-
**Browser Use MCP tools:**
|
|
43
|
-
|
|
44
|
-
| Tool | Purpose |
|
|
45
|
-
|---|---|
|
|
46
|
-
| `run_session` | Create a browser session and run a natural-language web automation/extraction task |
|
|
47
|
-
| `get_session` | Poll session status/output, step count, cost breakdown, and live URL |
|
|
48
|
-
| `send_task` | Send a follow-up task to an idle keep-alive session |
|
|
49
|
-
| `stop_session` | Stop the current task or destroy the browser session sandbox |
|
|
50
|
-
| `get_session_messages` | Inspect browser actions, reasoning, and results from a session |
|
|
51
|
-
| `list_sessions` | List recent Browser Use sessions |
|
|
52
|
-
| `list_browser_profiles` | List available authenticated browser profiles |
|
|
53
|
-
|
|
54
|
-
**When to use Browser Use MCP (NOT Exa):**
|
|
55
|
-
- Scraping full page content, not just searching for it
|
|
56
|
-
- Extracting structured data (JSON) from complex/messy HTML (e.g. Minecraft wiki tables, addon schemas)
|
|
57
|
-
- Crawling or traversing multiple linked pages on a site (e.g. crawling all Script API event pages)
|
|
58
|
-
- Interacting with pages: clicking buttons, filling forms, navigating flows
|
|
59
|
-
- Accessing protected/anti-bot sites where managed browser infrastructure helps
|
|
60
|
-
- Taking screenshots or using live browser session evidence
|
|
61
|
-
- Any task that requires a real browser session
|
|
62
|
-
|
|
63
|
-
**When to use Exa instead:**
|
|
64
|
-
- Quick doc lookups for `@minecraft/server`, `@minecraft/math`, etc.
|
|
65
|
-
- Finding the right URL or page for a topic
|
|
66
|
-
- Lightweight search queries
|
|
67
|
-
|
|
68
|
-
**Workflow — Exa finds it, Browser Use MCP reads/interacts with it:**
|
|
69
|
-
1. `web_search_exa` → find the right URL
|
|
70
|
-
2. `run_session` → extract deep content, automate navigation, or collect structured data
|
|
71
|
-
3. `get_session` / `get_session_messages` → inspect completion, output, live URL, and action trace
|
|
72
|
-
4. `send_task` → continue in the same keep-alive browser session if follow-up interaction is needed
|
|
73
|
-
5. `stop_session` → cleanly stop/destroy the Browser Use session when finished
|
|
74
|
-
|
|
75
|
-
VIOLATION CHECK: If you manually scraped or parsed HTML when Browser Use MCP could have done it cleanly, you violated this rule.
|
|
76
|
-
</rule>
|
|
77
|
-
|
|
78
39
|
<rule name="no_comments" priority="high">
|
|
79
40
|
DO NOT WRITE ANY COMMENTS OR JSDOCS unless explicitly requested.
|
|
80
41
|
</rule>
|
|
@@ -606,12 +567,11 @@ POTENTIAL CONCERNS:
|
|
|
606
567
|
13. Editing files from stale context without re-reading first
|
|
607
568
|
14. Duplicating state instead of fixing the real problem
|
|
608
569
|
15. Writing library/framework code from memory without searching Exa for current docs first
|
|
609
|
-
16.
|
|
610
|
-
17.
|
|
611
|
-
18.
|
|
612
|
-
19.
|
|
613
|
-
20.
|
|
614
|
-
21. Adding attribution or AI-style report trailers to Git commit messages
|
|
570
|
+
16. Using try-catch in Minecraft Script API code
|
|
571
|
+
17. Creating custom math functions when @minecraft/math has them available
|
|
572
|
+
18. Using raw strings instead of @minecraft/vanilla-data typed identifiers
|
|
573
|
+
19. Writing BP/RP JSON files without schema validation
|
|
574
|
+
20. Adding attribution or AI-style report trailers to Git commit messages
|
|
615
575
|
</failure_modes_to_avoid>
|
|
616
576
|
|
|
617
577
|
<meta>
|
|
@@ -621,18 +581,16 @@ You have unlimited stamina. The human does not. Use your persistence wisely —
|
|
|
621
581
|
|
|
622
582
|
**Priority Hierarchy:**
|
|
623
583
|
1. **EXA FOR DOCS** — Always search library/framework docs via Exa before implementing
|
|
624
|
-
2. **
|
|
625
|
-
3. **
|
|
626
|
-
4. **
|
|
627
|
-
5. **
|
|
628
|
-
6. **
|
|
629
|
-
7. **
|
|
630
|
-
8. **
|
|
631
|
-
9. **NATURAL COMMITS** - Write human commit messages; no attribution or AI-style report trailers
|
|
584
|
+
2. **VERIFY BEFORE DONE** — Type-check, lint, test before claiming success
|
|
585
|
+
3. **PLAN BEFORE BUILD** — Spec and approval before implementation
|
|
586
|
+
4. **GUARD CLAUSES** — Never use try-catch in Minecraft code
|
|
587
|
+
5. **VANILLA-DATA** — Use typed identifiers from @minecraft/vanilla-data
|
|
588
|
+
6. **MINECRAFT-MATH** — Use @minecraft/math library for math operations
|
|
589
|
+
7. **JSON SCHEMAS** — Validate BP/RP JSONs with Rockide/schemas
|
|
590
|
+
8. **NATURAL COMMITS** - Write human commit messages; no attribution or AI-style report trailers
|
|
632
591
|
|
|
633
592
|
**Violation Checks:**
|
|
634
593
|
- ❌ Wrote library/framework code without searching Exa first? → Violated Exa-for-docs rule
|
|
635
|
-
- ❌ Manually scraped/parsed HTML when Browser Use MCP could do it? → Violated Browser-Use-MCP-for-web rule
|
|
636
594
|
- ❌ Said "Done!" without running type-check/lint/tests? → Violated forced verification rule
|
|
637
595
|
- ❌ Edited a file from memory after 10+ messages without re-reading? → Violated context decay rule
|
|
638
596
|
- ❌ Started building without plan approval on a non-trivial task? → Violated plan-build separation
|